microsoft / SEAL

Microsoft SEAL is an easy-to-use and powerful homomorphic encryption library.
https://www.microsoft.com/en-us/research/group/cryptography-research/
MIT License
3.55k stars 706 forks source link

Build error: multiple definition of `std::placeholders::_1` and `std::placeholders::_2` #681

Open taqtiqa-mark opened 7 months ago

taqtiqa-mark commented 7 months ago

Thanks for all the work put into SEAL library.

FYI: I encounter the following error when building:

note: /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(placeholders.o):(.rodata._ZNSt12placeholders2_2E+0x0): multiple definition of `std::placeholders::_2'; /home/user/src/zno-fhe-src/target/x86_64-unknown-linux-gnu/debug/build/zno-seal-src-test-f04cc592cd967030/out/install/lib/libseal-4.1.a(ciphertext.cpp.o):/usr/include/c++/13/functional:295: first defined here
          /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/13/libstdc++.a(placeholders.o):(.rodata._ZNSt12placeholders2_1E+0x0): multiple definition of `std::placeholders::_1'; /home/user/src/zno-fhe-src/target/x86_64-unknown-linux-gnu/debug/build/zno-seal-src-test-f04cc592cd967030/out/install/lib/libseal-4.1.a(ciphertext.cpp.o):/usr/include/c++/13/functional:294: first defined here
          collect2: error: ld returned 1 exit status
taqtiqa-mark commented 7 months ago

This is resolved by building with Clang++ 16.0.6

The error is observed by building with G++ 13.2.0