<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">Hello,<br><br>I am installing NTL on debian. The installation is ok until the "make check" command:<br><br>sana@debian:/usr/lib/ntl-5.5.2/src$ sudo ./configure PREFIX=/usr/local/<br>writing makefile<br>writing ../include/NTL/config.h<br>sana@debian:/usr/lib/ntl-5.5.2/src$ sudo ./configure PREFIX=/usr/local/lib<br>writing makefile<br>writing ../include/NTL/config.h<br>sana@debian:/usr/lib/ntl-5.5.2/src$ sudo ./configure NTL_GMP_LIP=on GMP_PREFIX=/usr<br>writing makefile<br>writing ../include/NTL/config.h<br>sana@debian:/usr/lib/ntl-5.5.2/src$ sudo ./configure NTL_GF2X_LIB=on GF2X_PREFIX=/usr/local<br>writing makefile<br>writing ../include/NTL/config.h<br>sana@debian:/usr/lib/ntl-5.5.2/src$ sudo make<br>make: `all' is up to date.<br>sana@debian:/usr/lib/ntl-5.5.2/src$ sudo make check<br>sh RemoveProg QuickTest BerlekampTest CanZassTest ZZXFacTest MoreFacTest
LLLTest BitMatTest MatrixTest CharPolyTest RRTest QuadTest GF2XTest GF2EXTest subset ZZ_pEXTest lzz_pEXTest<br>make QuickTest<br>make[1]: Entering directory `/usr/lib/ntl-5.5.2/src'<br>g++ -I../include -I. -O2 -o QuickTest QuickTest.c ntl.a -L/usr/local/lib -lgf2x -lm #LSTAT<br>/tmp/ccSg27mb.o: In function `main':<br>QuickTest.c:(.text+0x811): undefined reference to `_ntl_ziszero'<br>QuickTest.c:(.text+0x9df): undefined reference to `_ntl_zfree'<br>QuickTest.c:(.text+0xa35): undefined reference to `_ntl_zfree'<br>QuickTest.c:(.text+0xbeb): undefined reference to `_ntl_zmul'<br>QuickTest.c:(.text+0xc18): undefined reference to `_ntl_zmul'<br>QuickTest.c:(.text+0xca3): undefined reference to `_ntl_zmul'<br>QuickTest.c:(.text+0xcd0): undefined reference to `_ntl_zmul'<br>QuickTest.c:(.text+0xd5c): undefined reference to `_ntl_zmod'<br>QuickTest.c:(.text+0xd82): undefined reference to
`_ntl_zmod'<br>QuickTest.c:(.text+0xe07): undefined reference to `_ntl_zmod'<br>QuickTest.c:(.text+0xe2a): undefined reference to `_ntl_zmod'<br>QuickTest.c:(.text+0xed8): undefined reference to `_ntl_ziszero'<br>QuickTest.c:(.text+0xee7): undefined reference to `_ntl_zone'<br>QuickTest.c:(.text+0xefd): undefined reference to `_ntl_zinvmod'<br>QuickTest.c:(.text+0xf22): undefined reference to `_ntl_zinvmod'<br>QuickTest.c:(.text+0xfa7): undefined reference to `_ntl_zinvmod'<br>QuickTest.c:(.text+0xfd2): undefined reference to `_ntl_zinvmod'<br>QuickTest.c:(.text+0x1288): undefined reference to `_ntl_zfree'<br>QuickTest.c:(.text+0x1296): undefined reference to `_ntl_zfree'<br>QuickTest.c:(.text+0x129e): undefined reference to `_ntl_zfree'<br>QuickTest.c:(.text+0x12a9): undefined reference to `_ntl_zfree'<br>QuickTest.c:(.text+0x1300): undefined reference to `_ntl_zfree'<br>/tmp/ccSg27mb.o:QuickTest.c:(.text+0x130e): more undefined references to
`_ntl_zfree' follow<br>ntl.a(lip.o): In function `redc':<br>lip.c:(.text+0xa45): undefined reference to `__gmpn_addmul_1'<br>lip.c:(.text+0xb22): undefined reference to `__gmpn_sub_n'<br>ntl.a(lip.o): In function `_ntl_gsmod':<br>lip.c:(.text+0xc04): undefined reference to `__gmpn_mod_1'<br>ntl.a(lip.o): In function `_ntl_gsqrts':<br>lip.c:(.text+0x11e4): undefined reference to `__gmpn_sqrtrem'<br>ntl.a(lip.o): In function `_ntl_gsmul':<br>lip.c:(.text+0x1600): undefined reference to `__gmpn_mul_1'<br>lip.c:(.text+0x1692): undefined reference to `__gmpn_lshift'<br>ntl.a(lip.o): In function `gmod_simple':<br>lip.c:(.text+0x1bcf): undefined reference to `__gmpn_tdiv_qr'<br>ntl.a(lip.o): In function `_ntl_grem_struct_eval':<br>lip.c:(.text+0x1cfb): undefined reference to `__gmpn_mod_1'<br>lip.c:(.text+0x1fc2): undefined reference to `__gmpn_mod_1'<br>lip.c:(.text+0x2162): undefined reference to `__gmpn_mod_1'<br>ntl.a(lip.o): In function
`_ntl_gsqrt':<br>lip.c:(.text+0x2261): undefined reference to `__gmpn_sqrtrem'<br>ntl.a(lip.o): In function `_ntl_gmul':<br>lip.c:(.text+0x23cd): undefined reference to `__gmpn_mul'<br>lip.c:(.text+0x2424): undefined reference to `__gmpn_mul'<br>ntl.a(lip.o): In function `_ntl_gsubpos':<br>lip.c:(.text+0x3561): undefined reference to `__gmpn_sub_n'<br>ntl.a(lip.o): In function `_ntl_gsub':<br>lip.c:(.text+0x3979): undefined reference to `__gmpn_add_n'<br>lip.c:(.text+0x3a94): undefined reference to `__gmpn_sub_n'<br>lip.c:(.text+0x3af4): undefined reference to `__gmpn_sub_n'<br>ntl.a(lip.o): In function `_ntl_gadd':<br>lip.c:(.text+0x3d2e): undefined reference to `__gmpn_sub_n'<br>lip.c:(.text+0x3e95): undefined reference to `__gmpn_add_n'<br>lip.c:(.text+0x3fb1): undefined reference to `__gmpn_sub_n'<br>ntl.a(lip.o): In function `_ntl_gaorsmul_1':<br>lip.c:(.text+0x441e): undefined reference to `__gmpn_addmul_1'<br>lip.c:(.text+0x4457): undefined
reference to `__gmpn_mul_1'<br>lip.c:(.text+0x455c): undefined reference to `__gmpn_submul_1'<br>lip.c:(.text+0x4630): undefined reference to `__gmpn_mul_1'<br>ntl.a(lip.o): In function `_ntl_gdiv':<br>lip.c:(.text+0x4b76): undefined reference to `__gmpn_tdiv_qr'<br>ntl.a(lip.o): In function `_ntl_gcrt_struct_eval':<br>lip.c:(.text+0x4e59): undefined reference to `__gmpn_addmul_1'<br>lip.c:(.text+0x50c9): undefined reference to `__gmpn_addmul_1'<br>ntl.a(lip.o): In function `_ntl_ginv':<br>lip.c:(.text+0x53c8): undefined reference to `__gmpn_gcdext'<br>ntl.a(lip.o): In function `_ntl_gsdiv':<br>lip.c:(.text+0x565b): undefined reference to `__gmpn_divrem_1'<br>lip.c:(.text+0x56f2): undefined reference to `__gmpn_rshift'<br>ntl.a(lip.o): In function `_ntl_gcrt_struct_init':<br>lip.c:(.text+0x5c80): undefined reference to `__gmpn_mod_1'<br>ntl.a(lip.o): In function `_ntl_grshift':<br>lip.c:(.text+0x5fb8): undefined reference to
`__gmpn_rshift'<br>ntl.a(lip.o): In function `_ntl_glshift':<br>lip.c:(.text+0x61b8): undefined reference to `__gmpn_lshift'<br>ntl.a(lip.o): In function `_ntl_gexteucl':<br>lip.c:(.text+0x7147): undefined reference to `__gmpn_gcdext'<br>ntl.a(lip.o): In function `_ntl_ggcd':<br>lip.c:(.text+0x798f): undefined reference to `__gmpn_gcd'<br>collect2: ld returned 1 exit status<br>make[1]: *** [QuickTest] Error 1<br>make[1]: Leaving directory `/usr/lib/ntl-5.5.2/src'<br>make: *** [check] Error 2<br>sana@debian:/usr/lib/ntl-5.5.2/src$ <br><br>I have looked for the libraries and they are all there:<br>libgf2x.a and libntl.a in /usr/local/lib <br>libgmp.a in /usr/lib<br><br><br>Any feedback on how to resolve this problem is welcome<br><br>Regards<br>Sana <br><br>p.s. not sure if the following information will help:<br>After getting stuck with the error above, I continued with:<br>sana@debian:/usr/lib/ntl-5.5.2/src$ sudo make install<br>mkdir -p -m 755
/usr/local/include<br>rm -rf /usr/local/include/NTL<br>mkdir -m 755 /usr/local/include/NTL<br>cp -p ../include/NTL/*.h /usr/local/include/NTL<br>chmod -R a+r /usr/local/include/NTL<br>mkdir -p -m 755 /usr/local/share/doc<br>rm -rf /usr/local/share/doc/NTL<br>mkdir -m 755 /usr/local/share/doc/NTL<br>cp -p ../doc/*.txt /usr/local/share/doc/NTL<br>cp -p ../doc/*.html /usr/local/share/doc/NTL<br>cp -p ../doc/*.gif /usr/local/share/doc/NTL<br>chmod -R a+r /usr/local/share/doc/NTL<br>mkdir -p -m 755 /usr/local/lib<br>cp -p ntl.a /usr/local/lib/libntl.a #LSTAT<br>chmod a+r /usr/local/lib/libntl.a #LSTAT<br>sana@debian:/usr/lib/ntl-5.5.2/src$ <br><br>I then tried the first example at http://www.shoup.net/ntl/doc/tour-ex1.html:<br>sana@debian:/usr/lib/ntl-5.5.2/src$ sudo g++ -I../include foo.c -o foo -L/usr/local/lib -lntl -L/usr/lib -lgmp -L/usr/local/lib -lgf2x -lm<br>/tmp/ccLabAMg.o: In function `NTL::add(NTL::ZZ&, NTL::ZZ const&,
long)':<br>foo.c:(.text._ZN3NTL3addERNS_2ZZERKS0_l[NTL::add(NTL::ZZ&, NTL::ZZ const&, long)]+0x1d): undefined reference to `_ntl_zsadd'<br>/tmp/ccLabAMg.o: In function `NTL::mul(NTL::ZZ&, NTL::ZZ const&, NTL::ZZ const&)':<br>foo.c:(.text._ZN3NTL3mulERNS_2ZZERKS0_S3_[NTL::mul(NTL::ZZ&, NTL::ZZ const&, NTL::ZZ const&)]+0x1f): undefined reference to `_ntl_zmul'<br>/tmp/ccLabAMg.o: In function `NTL::ZZ::operator=(NTL::ZZ const&)':<br>foo.c:(.text._ZN3NTL2ZZaSERKS0_[NTL::ZZ::operator=(NTL::ZZ const&)]+0x16): undefined reference to `_ntl_zcopy1'<br>/tmp/ccLabAMg.o: In function `NTL::ZZ::~ZZ()':<br>foo.c:(.text._ZN3NTL2ZZD1Ev[NTL::ZZ::~ZZ()]+0xd): undefined reference to `_ntl_zfree'<br>collect2: ld returned 1 exit status<br>sana@debian:/usr/lib/ntl-5.5.2/src$ <br><br></td></tr></table>