Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when building native/examples. #680

Open
GaoSimon opened this issue Feb 17, 2024 · 1 comment
Open

Error when building native/examples. #680

GaoSimon opened this issue Feb 17, 2024 · 1 comment

Comments

@GaoSimon
Copy link

When I build native/examples, I get the following errors:

cinwa@ROG8:~/SEAL-main/native/examples$ cmake --build build
[ 10%] Linking CXX executable bin/sealexamples
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o): in function seal::BatchEncoder::reverse_bits(unsigned long*)': batchencoder.cpp:(.text+0x5bd): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o): in function seal::BatchEncoder::encode(std::vector<unsigned long, std::allocator<unsigned long> > const&, seal::Plaintext&) const': batchencoder.cpp:(.text+0x892): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o): in function seal::BatchEncoder::encode(std::vector<long, std::allocator<long> > const&, seal::Plaintext&) const': batchencoder.cpp:(.text+0xd8b): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o): in function seal::BatchEncoder::encode(gsl::span<unsigned long const, 18446744073709551615ul>, seal::Plaintext&) const': batchencoder.cpp:(.text+0x12fe): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o): in function seal::BatchEncoder::encode(gsl::span<long const, 18446744073709551615ul>, seal::Plaintext&) const': batchencoder.cpp:(.text+0x18ba): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o):batchencoder.cpp:(.text+0x1ec7): more undefined references to __libc_single_threaded' follow /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(mempool.cpp.o): in function seal::util::MemoryPoolHeadST::get()':
mempool.cpp:(.text+0x79e): undefined reference to aligned_alloc' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(mempool.cpp.o): in function seal::util::MemoryPoolHeadST::MemoryPoolHeadST(unsigned long, bool)':
mempool.cpp:(.text+0x992): undefined reference to aligned_alloc' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(mempool.cpp.o): in function seal::util::MemoryPoolHeadMT::MemoryPoolHeadMT(unsigned long, bool)':
mempool.cpp:(.text+0xa92): undefined reference to aligned_alloc' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(mempool.cpp.o): in function seal::util::MemoryPoolHeadMT::get()':
mempool.cpp:(.text+0xc97): undefined reference to aligned_alloc' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(rlwe.cpp.o): in function seal::util::sample_poly_normal(std::shared_ptrseal::UniformRandomGenerator, seal::EncryptionParameters const&, unsigned long*)':
rlwe.cpp:(.text+0x8c0): undefined reference to __libc_single_threaded' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: rlwe.cpp:(.text+0xc23): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(rlwe.cpp.o): in function seal::util::sample_poly_uniform_seal_3_5(std::shared_ptr<seal::UniformRandomGenerator>, seal::EncryptionParameters const&, unsigned long*)': rlwe.cpp:(.text+0xf4d): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: rlwe.cpp:(.text+0x10b8): undefined reference to __libc_single_threaded' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(rlwe.cpp.o): in function seal::util::sample_poly_uniform_seal_3_4(std::shared_ptrseal::UniformRandomGenerator, seal::EncryptionParameters const&, unsigned long*)':
rlwe.cpp:(.text+0x13bd): undefined reference to __libc_single_threaded' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(rlwe.cpp.o):rlwe.cpp:(.text+0x153a): more undefined references to __libc_single_threaded' follow
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(common.cpp.o): in function seal::util::seal_memzero(void*, unsigned long)': common.cpp:(.text+0xc): undefined reference to __explicit_bzero_chk'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/sealexamples.dir/build.make:226: bin/sealexamples] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/sealexamples.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

@GaoSimon
Copy link
Author

Sorry, this should be the first outputs:

cinwa@ROG8:~/SEAL-main/native/examples$ cmake --build build
[ 10%] Building CXX object CMakeFiles/sealexamples.dir/examples.cpp.o
[ 20%] Building CXX object CMakeFiles/sealexamples.dir/1_bfv_basics.cpp.o
[ 30%] Building CXX object CMakeFiles/sealexamples.dir/2_encoders.cpp.o
[ 40%] Building CXX object CMakeFiles/sealexamples.dir/3_levels.cpp.o
[ 50%] Building CXX object CMakeFiles/sealexamples.dir/4_bgv_basics.cpp.o
[ 60%] Building CXX object CMakeFiles/sealexamples.dir/5_ckks_basics.cpp.o
[ 70%] Building CXX object CMakeFiles/sealexamples.dir/6_rotation.cpp.o
[ 80%] Building CXX object CMakeFiles/sealexamples.dir/7_serialization.cpp.o
[ 90%] Building CXX object CMakeFiles/sealexamples.dir/8_performance.cpp.o
[100%] Linking CXX executable bin/sealexamples
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o): in function seal::BatchEncoder::reverse_bits(unsigned long*)': batchencoder.cpp:(.text+0x5bd): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o): in function seal::BatchEncoder::encode(std::vector<unsigned long, std::allocator<unsigned long> > const&, seal::Plaintext&) const': batchencoder.cpp:(.text+0x892): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o): in function seal::BatchEncoder::encode(std::vector<long, std::allocator<long> > const&, seal::Plaintext&) const': batchencoder.cpp:(.text+0xd8b): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o): in function seal::BatchEncoder::encode(gsl::span<unsigned long const, 18446744073709551615ul>, seal::Plaintext&) const': batchencoder.cpp:(.text+0x12fe): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o): in function seal::BatchEncoder::encode(gsl::span<long const, 18446744073709551615ul>, seal::Plaintext&) const': batchencoder.cpp:(.text+0x18ba): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(batchencoder.cpp.o):batchencoder.cpp:(.text+0x1ec7): more undefined references to __libc_single_threaded' follow /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(mempool.cpp.o): in function seal::util::MemoryPoolHeadST::get()':
mempool.cpp:(.text+0x79e): undefined reference to aligned_alloc' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(mempool.cpp.o): in function seal::util::MemoryPoolHeadST::MemoryPoolHeadST(unsigned long, bool)':
mempool.cpp:(.text+0x992): undefined reference to aligned_alloc' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(mempool.cpp.o): in function seal::util::MemoryPoolHeadMT::MemoryPoolHeadMT(unsigned long, bool)':
mempool.cpp:(.text+0xa92): undefined reference to aligned_alloc' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(mempool.cpp.o): in function seal::util::MemoryPoolHeadMT::get()':
mempool.cpp:(.text+0xc97): undefined reference to aligned_alloc' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(rlwe.cpp.o): in function seal::util::sample_poly_normal(std::shared_ptrseal::UniformRandomGenerator, seal::EncryptionParameters const&, unsigned long*)':
rlwe.cpp:(.text+0x8c0): undefined reference to __libc_single_threaded' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: rlwe.cpp:(.text+0xc23): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(rlwe.cpp.o): in function seal::util::sample_poly_uniform_seal_3_5(std::shared_ptr<seal::UniformRandomGenerator>, seal::EncryptionParameters const&, unsigned long*)': rlwe.cpp:(.text+0xf4d): undefined reference to __libc_single_threaded'
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: rlwe.cpp:(.text+0x10b8): undefined reference to __libc_single_threaded' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(rlwe.cpp.o): in function seal::util::sample_poly_uniform_seal_3_4(std::shared_ptrseal::UniformRandomGenerator, seal::EncryptionParameters const&, unsigned long*)':
rlwe.cpp:(.text+0x13bd): undefined reference to __libc_single_threaded' /home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(rlwe.cpp.o):rlwe.cpp:(.text+0x153a): more undefined references to __libc_single_threaded' follow
/home/cinwa/anaconda3/envs/sage/bin/../lib/gcc/x86_64-conda-linux-gnu/13.2.0/../../../../x86_64-conda-linux-gnu/bin/ld: /usr/local/lib/libseal-4.1.a(common.cpp.o): in function seal::util::seal_memzero(void*, unsigned long)': common.cpp:(.text+0xc): undefined reference to __explicit_bzero_chk'
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/sealexamples.dir/build.make:226: bin/sealexamples] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/sealexamples.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant