Hi,
I’m using macOS Monterey version 12.6, make version 3.81, clang version 13.1.6, cmake version 3.24.2
The compiler was working perfectly, and executables of example files could be built without any problem. But now, when I try to build files by calling “make”, it throws errors regarding linker command.
[ 73%] Linking CXX executable ../../bin/examples/pke/depth-bgvrns
Undefined symbols for architecture x86_64:
"void lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<unsigned int> > > >::CheckKey<std::__1::shared_ptr<lbcrypto::PublicKeyImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<unsigned int> > > > > >(std::__1::shared_ptr<lbcrypto::PublicKeyImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<unsigned int> > > > > const&, char const*, char const*, unsigned long) const", referenced from:
lbcrypto::CryptoContextImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<unsigned int> > > >::Encrypt(std::__1::shared_ptr<lbcrypto::PlaintextImpl>, std::__1::shared_ptr<lbcrypto::PublicKeyImpl<lbcrypto::DCRTPolyImpl<bigintdyn::mubintvec<bigintdyn::ubint<unsigned int> > > > >) const in depth-bgvrns.cpp.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [bin/examples/pke/depth-bgvrns] Error 1
make[1]: *** [src/pke/CMakeFiles/depth-bgvrns.dir/all] Error 2
[ 73%] Building CXX object src/pke/CMakeFiles/pke_tests.dir/unittest/UnitTestMultihopPRE.cpp.o
When BUILD_UNITTESTS=ON, it detects more error.
/Users/weideng/openFHE/openfhe-development/src/pke/unittest/utbfvrns/UnitTestBFVrnsCRTOperations.cpp:92:19: error: conversion from 'long' to 'NativeInteger' (aka 'NativeIntegerT<unsigned long long>') is ambiguous
NativeInteger modulus0 = 1152921504606846577;
^ ~~~~~~~~~~~~~~~~~~~
/Users/weideng/openFHE/openfhe-development/src/core/include/math/hal/intnat/ubintnat.h:219:5: note: candidate constructor [with T = long, $1 = true]
NativeIntegerT(T val) : m_value(val) { // NOLINT
^
/Users/weideng/openFHE/openfhe-development/src/core/include/math/hal/intnat/ubintnat.h:242:5: note: candidate constructor [with T = long, $1 = true]
NativeIntegerT(T val) : m_value(val.ConvertToInt()) { // NOLINT
I also tried pervious version v0.9.3 and v0.9.0, but none of them works as well.
Any advice helps.
Thank you.
Hi @dsuponitskiy-duality
I am stil getting the same errors. I also tried to run it on my friend’s MacOS Monterey 12.6 with clang version 14.0.0, cmake version 3.24.2, make version 3.81, but it still encountered above errors at around 70% completion. Thank you for your time.
Hi, I have the same errors, tried the dev build but doesn’t work fails starting here, [ 71%] Linking CXX executable …/…/bin/examples/pke/advanced-ckks-bootstrapping
I did use the dev branch and had updated clang to v14. I’m now getting other errors with cmake so looking at trying to fix those errors now. I did notice in the log file it says ‘M1’ was detected not sure if that matters (I’m on an M2).
Hi. it should be the latest version I downloaded it a few hours ago to retry, but I’m getting cmake errors so not sure if it’s something unrelated with my system configuration or a compatibility issue?
Maybe something with this error from the CMakeError.log file, OpenMPCheckVersion.c:3:10: fatal error: ‘omp.h’ file not found #include <omp.h>
^~~~~~~
1 error generated.
make[1]: *** [CMakeFiles/cmTC_dab4f.dir/OpenMPCheckVersion.c.o] Error 1
make: *** [cmTC_dab4f/fast] Error 2
And this error from cmake output,
CMake Error at CMakeLists.txt:686 (add_subdirectory):
The source directory
I confirmed the SHA matches. I removed everything and started again, it’s building. Thanks so much for your support. I’m not sure what happened, but when I removed the clone and restarted again and reconfirmed everything (again) it worked. Greatly appreciate it