ph4r05 / Whitebox-crypto-AES

Whitebox AES implementation in C++. Chow, Karroumi.
https://is.muni.cz/th/325219/fi_m/
337 stars 112 forks source link

Build fails and "undefined reference" error on Ubuntu #29

Closed Yulatu closed 4 years ago

Yulatu commented 4 years ago

Hi, I'm trying to build the project on Ubuntu. When I run "cmake -DCMAKE_BUILD_TYPE=Debug .." or "cmake -DCMAKE_BUILD_TYPE=Release ..", I notice that there is a little "Failed" word but I don't know what it means and I tried to search it on google but failed. -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed And if I then directly run "make", I will get follwing error, could you please tell me what's going on here and how can I solve it? I'm not very good at building process on Linux, thank you very much.

Scanning dependencies of target gtest
[  1%] Creating directories for 'gtest'
[  2%] Performing download step (download, verify and extract) for 'gtest'
-- Downloading...
   dst='/mnt/d/WSL/Whitebox-crypto-AES-master/build-release/gtest/src/master.zip'
   timeout='none'
-- Using src='https://github.com/google/googletest/archive/master.zip'
-- [download 100% complete]
-- Downloading... done
-- extracting...
     src='/mnt/d/WSL/Whitebox-crypto-AES-master/build-release/gtest/src/master.zip'
     dst='/mnt/d/WSL/Whitebox-crypto-AES-master/build-release/gtest/src/gtest'
-- extracting... [tar xfz]
-- extracting... [analysis]
-- extracting... [rename]
-- extracting... [clean up]
-- extracting... done
[  4%] No patch step for 'gtest'
[  5%] No update step for 'gtest'
[  7%] Performing configure step for 'gtest'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/bin/python (found version "2.7.17")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Configuring done
-- Generating done
-- Build files have been written to: /mnt/d/WSL/Whitebox-crypto-AES-master/build-release/gtest/src/gtest-build
[  8%] Performing build step for 'gtest'
Scanning dependencies of target gtest
[ 12%] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 25%] Linking CXX static library ../lib/libgtest.a
[ 25%] Built target gtest
Scanning dependencies of target gmock
[ 37%] Building CXX object googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
[ 50%] Linking CXX static library ../lib/libgmock.a
[ 50%] Built target gmock
Scanning dependencies of target gmock_main
[ 62%] Building CXX object googlemock/CMakeFiles/gmock_main.dir/src/gmock_main.cc.o
[ 75%] Linking CXX static library ../lib/libgmock_main.a
[ 75%] Built target gmock_main
Scanning dependencies of target gtest_main
[ 87%] Building CXX object googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[100%] Linking CXX static library ../lib/libgtest_main.a
[100%] Built target gtest_main
[ 10%] No install step for 'gtest'
[ 11%] Completed 'gtest'
[ 11%] Built target gtest
Scanning dependencies of target gtesting
[ 13%] Building CXX object CMakeFiles/gtesting.dir/base.cpp.o
[ 14%] Building CXX object CMakeFiles/gtesting.dir/BGEAttack.cpp.o
[ 15%] Building CXX object CMakeFiles/gtesting.dir/GenericAES.cpp.o
[ 17%] Building CXX object CMakeFiles/gtesting.dir/LinearAffineEq.cpp.o
[ 18%] Building CXX object CMakeFiles/gtesting.dir/LinearAffineEq_test.cpp.o
[ 20%] Building C object CMakeFiles/gtesting.dir/md5.c.o
[ 21%] Building CXX object CMakeFiles/gtesting.dir/MixingBijections.cpp.o
[ 23%] Building CXX object CMakeFiles/gtesting.dir/NTLUtils.cpp.o
[ 24%] Building CXX object CMakeFiles/gtesting.dir/WBAES.cpp.o
[ 26%] Building CXX object CMakeFiles/gtesting.dir/WBAESGenerator.cpp.o
[ 27%] Building CXX object CMakeFiles/gtesting.dir/RingBuffer.cpp.o
[ 28%] Building CXX object CMakeFiles/gtesting.dir/EncTools.cpp.o
[ 30%] Building CXX object CMakeFiles/gtesting.dir/InputObject.cpp.o
[ 31%] Building CXX object CMakeFiles/gtesting.dir/InputObjectBuffer.cpp.o
[ 33%] Building CXX object CMakeFiles/gtesting.dir/InputObjectIstream.cpp.o
[ 34%] Building CXX object CMakeFiles/gtesting.dir/InputObjectOstream.cpp.o
[ 36%] Building CXX object CMakeFiles/gtesting.dir/InputObjectIOstream.cpp.o
[ 37%] Building CXX object CMakeFiles/gtesting.dir/tests/WBAes.cpp.o
[ 39%] Building CXX object CMakeFiles/gtesting.dir/tests/tester.cpp.o
[ 40%] Building CXX object CMakeFiles/gtesting.dir/tests/Commons.cpp.o
[ 42%] Building CXX object CMakeFiles/gtesting.dir/tests/RingBufferTest.cpp.o
[ 43%] Building CXX object CMakeFiles/gtesting.dir/tests/EncToolsTest.cpp.o
[ 44%] Linking CXX executable gtesting
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `redc(_ntl_gbigint_body*, _ntl_gbigint_body*, long, unsigned long, _ntl_gbigint_body*)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5497: undefined reference to `__gmpn_addmul_1'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5509: undefined reference to `__gmpn_sub_n'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_rem_struct_basic::eval(long*, _ntl_gbigint_body*, _ntl_tmp_vec*)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:7962: undefined reference to `__gmpn_mod_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_reduce_struct_montgomery::eval(_ntl_gbigint_body**, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5581: undefined reference to `__gmpn_addmul_1'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5593: undefined reference to `__gmpn_sub_n'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_crt_struct_basic::eval(_ntl_gbigint_body**, long const*, _ntl_tmp_vec*)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:6790: undefined reference to `__gmpn_addmul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `gmod_simple(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3521: undefined reference to `__gmpn_tdiv_qr'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_rem_struct_fast::eval(long*, _ntl_gbigint_body*, _ntl_tmp_vec*)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:8002: undefined reference to `__gmpn_mod_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_rem_struct_medium::eval(long*, _ntl_gbigint_body*, _ntl_tmp_vec*)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:8046: undefined reference to `__gmpn_mod_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_grshift(_ntl_gbigint_body*, long, _ntl_gbigint_body**)': /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2428: undefined reference to `__gmpn_rshift'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_glshift(_ntl_gbigint_body*, long, _ntl_gbigint_body**)': /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2363: undefined reference to `__gmpn_lshift'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gadd(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/usr/local/include/gmp.h:2190: undefined reference to `__gmpn_sub_n'
/usr/bin/ld: /usr/local/include/gmp.h:2135: undefined reference to `__gmpn_add_n'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `__gmpn_sub':
/usr/local/include/gmp.h:2190: undefined reference to `__gmpn_sub_n'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gadd(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/usr/local/include/gmp.h:2190: undefined reference to `__gmpn_sub_n'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gsub(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/usr/local/include/gmp.h:2135: undefined reference to `__gmpn_add_n'
/usr/bin/ld: /usr/local/include/gmp.h:2190: undefined reference to `__gmpn_sub_n'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `__gmpn_sub':
/usr/local/include/gmp.h:2190: undefined reference to `__gmpn_sub_n'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gsub(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/usr/local/include/gmp.h:2190: undefined reference to `__gmpn_sub_n'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gsubpos(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/usr/local/include/gmp.h:2190: undefined reference to `__gmpn_sub_n'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gmul(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2903: undefined reference to `__gmpn_mul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `base_mul':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2908: undefined reference to `__gmpn_addmul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gmul(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2903: undefined reference to `__gmpn_mul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `base_mul':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2908: undefined reference to `__gmpn_addmul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gmul(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2903: undefined reference to `__gmpn_mul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `base_mul':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2908: undefined reference to `__gmpn_addmul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gmul(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2903: undefined reference to `__gmpn_mul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `base_mul':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2908: undefined reference to `__gmpn_addmul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gmul(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3042: undefined reference to `__gmpn_mul'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2976: undefined reference to `__gmpn_mul'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3018: undefined reference to `__gmpn_sqr'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2952: undefined reference to `__gmpn_sqr'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3036: undefined reference to `__gmpn_mul'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:2970: undefined reference to `__gmpn_mul'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gsq(_ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3151: undefined reference to `__gmpn_sqr'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3182: undefined reference to `__gmpn_sqr'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gsmul(_ntl_gbigint_body*, long, _ntl_gbigint_body**)':   /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3243: undefined reference to `__gmpn_mul_1'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3241: undefined reference to `__gmpn_lshift'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gsdiv(_ntl_gbigint_body*, long, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3303: undefined reference to `__gmpn_divrem_1'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3301: undefined reference to `__gmpn_rshift'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gsmod(_ntl_gbigint_body*, long)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3367: undefined reference to `__gmpn_mod_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gdiv(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3443: undefined reference to `__gmpn_tdiv_qr'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_crt_struct_fast::eval(_ntl_gbigint_body**, long const*, _ntl_tmp_vec*)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:7114: undefined reference to `__gmpn_addmul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gsqrts(long)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3555: undefined reference to `__gmpn_sqrtrem'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gsqrt(_ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3643: undefined reference to `__gmpn_sqrtrem'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_ggcd(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3787: undefined reference to `__gmpn_gcd'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:3789: undefined reference to `__gmpn_gcd'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gexteucl(_ntl_gbigint_body*, _ntl_gbigint_body**, _ntl_gbigint_body*, _ntl_gbigint_body**, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:4207: undefined reference to `__gmpn_gcdext'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_ginv(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:4328: undefined reference to `__gmpn_gcdext'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gaorsmul_1(_ntl_gbigint_body*, long, long, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:8325: undefined reference to `__gmpn_submul_1'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:8300: undefined reference to `__gmpn_addmul_1'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:8117: undefined reference to `__gmpn_mul_1'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:8309: undefined reference to `__gmpn_mul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_quick_accum_muladd(_ntl_gbigint_body*, _ntl_gbigint_body*, long)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:9078: undefined reference to `__gmpn_addmul_1'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_leftrotate(_ntl_gbigint_body**, _ntl_gbigint_body* const*, long, _ntl_gbigint_body*, long, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:9193: undefined reference to `__gmpn_lshift'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:9206: undefined reference to `__gmpn_lshift'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_leftrotate(_ntl_gbigint_body**, _ntl_gbigint_body* const*, long, _ntl_gbigint_body*, long, _ntl_gbigint_body**)':
/usr/local/include/gmp.h:2226: undefined reference to `__gmpn_com'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_ss_submod(_ntl_gbigint_body**, _ntl_gbigint_body* const*, _ntl_gbigint_body* const*, _ntl_gbigint_body*, long)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:9327: undefined reference to `__gmpn_sub_n'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_ss_submod(_ntl_gbigint_body**, _ntl_gbigint_body* const*, _ntl_gbigint_body* const*, _ntl_gbigint_body*, long)':
/usr/local/include/gmp.h:2190: undefined reference to `__gmpn_sub_n'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `wrapped_mpz::wrapped_mpz()':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5666: undefined reference to `__gmpz_init'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5666: undefined reference to `__gmpz_init'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5666: undefined reference to `__gmpz_init'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5666: undefined reference to `__gmpz_init'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gpowermod(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5679: undefined reference to `__gmpz_import'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gmp_powermod':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5680: undefined reference to `__gmpz_import'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5681: undefined reference to `__gmpz_import'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5683: undefined reference to `__gmpz_powm'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `wrapped_mpz::~wrapped_mpz()':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gmp_powermod':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5696: undefined reference to `__gmpz_export'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `wrapped_mpz::~wrapped_mpz()':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gpowermod(_ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body*, _ntl_gbigint_body**)':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5713: undefined reference to `__gmpz_import'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `_ntl_gmp_powermod_alt':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5714: undefined reference to `__gmpz_import'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5715: undefined reference to `__gmpz_import'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5717: undefined reference to `__gmpz_powm'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5730: undefined reference to `__gmpz_export'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `wrapped_mpz::wrapped_mpz()':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5666: undefined reference to `__gmpz_init'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5666: undefined reference to `__gmpz_init'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5666: undefined reference to `__gmpz_init'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5666: undefined reference to `__gmpz_init'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o): in function `wrapped_mpz::~wrapped_mpz()':
/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: undefined reference to `__gmpz_clear'
/usr/bin/ld: /usr/local/lib/libntl.a(lip.o):/mnt/d/WSL/ntl-11.4.3/src/lip.cpp:5667: more undefined references to `__gmpz_clear' follow
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/gtesting.dir/build.make:408: gtesting] Error 1
make[1]: *** [CMakeFiles/Makefile2:109: CMakeFiles/gtesting.dir/all] Error 2
make: *** [Makefile:84: all] Error 2
ph4r05 commented 4 years ago

Do you have all depemdencies installed?

Yulatu commented 4 years ago

Yes, I have installed gmp-6.1.2, ntl-11.4.3 and all the C++ boost libraries.

Yulatu commented 4 years ago

Thank you for your very fast reply, the problem has been solved. I have uninstalled ntl-11.4.3 and then install ntl-9.6.2 using the script in project directory, then everything is ok.