Greg Marks on Fri, 12 May 2023 23:25:26 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: library .tbss mismatches |
> > On a computer on which, years ago, I installed Pari-GP both from the > > source tarball and from the Debian Linux repositories, I am unable to > > compile C programs such as the extgcd.c program in the Pari examples. > > I get these errors: > > > > $gcc -Wall -O3 -o extgcd extgcd.c -lpari > > /usr/bin/ld: PARI_SIGINT_block: TLS definition in /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libpari.so section .tbss mismatches non-TLS reference in /tmp/ccQUa8Wh.o > > /usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libpari.so: error adding symbols: bad value > > collect2: error: ld returned 1 exit status > > > > Is there some simple solution to this problem? > > Dear Greg, > > I suggest: > > gcc -Wall -O3 -o extgcd -I/usr/include/`gcc -print-multiarch`/ extgcd.c -L/usr/lib/ -lpari > or simply > gcc -Wall -O3 -o extgcd -I/usr/include/x86_64-linux-gnu/ extgcd.c -L/usr/lib/ -lpari > > (but as a rule, avoid installing complex software in /usr/local/, > one day or another they will interfer with you distribution) > > Cheers, > Bill. Thank you for the suggestion. Unfortunately, the command gcc -Wall -O3 -o extgcd -I/usr/include/`gcc -print-multiarch`/ extgcd.c -L/usr/lib/ -lpari produced the same error. I then tried reinstalling from source, as follows: $cd /usr/local/Math_Software/ $wget http://pari.math.u-bordeaux.fr/pub/pari/unix/pari-2.15.3.tar.gz $gunzip pari-2.15.3.tar.gz $tar -xvf pari-2.15.3.tar $cd pari-2.15.3/ $./Configure --prefix=/usr/local/ $make all $sudo make install $sudo find / -name pari.h /usr/local/lib/pari.h /usr/local/include/pari/pari.h /usr/local/Math_Software/pari-2.15.3/src/headers/pari.h /usr/local/Math_Software/pari-2.13.2/src/headers/pari.h /usr/local/Math_Software/sage-9.4/local/include/pari/pari.h /usr/local/Math_Software/sage-9.4/local/include/giac/pari.h /usr/include/giac/pari.h /usr/include/x86_64-linux-gnu/pari/pari.h $sudo find / -name libpari.so /usr/local/lib/libpari.so /usr/local/Math_Software/pari-2.15.3/Olinux-x86_64/libpari.so /usr/local/Math_Software/sage-9.4/local/lib/libpari.so /usr/lib/x86_64-linux-gnu/libpari.so $sudo find / -name libpari.a /usr/local/lib/libpari.a /usr/lib/x86_64-linux-gnu/libpari.a $cd examples/ $make TARGET=extgcd /usr/bin/gcc -c -O3 -Wall -ffp-contract=off -fno-strict-aliasing -I. -I/usr/local//include -fPIC extgcd.c /usr/bin/gcc -o extgcd -O3 -Wall -ffp-contract=off -fno-strict-aliasing -Wl,--export-dynamic extgcd.o -Wl,-rpath "/usr/local//lib" -lm -L/usr/local//lib -lpari /usr/bin/ld: /usr/local//lib/libpari.a(ispower.o): in function `logintall': ispower.c:(.text+0xa42): undefined reference to `log2' /usr/bin/ld: /usr/local//lib/libpari.a(ispower.o): in function `logint0': ispower.c:(.text+0x1453): undefined reference to `floor' [about 800 similar lines followed here] /usr/bin/ld: /usr/local//lib/libpari.a(polclass.o):polclass.c:(.text+0xb926): more undefined references to `log' follow /usr/bin/ld: /usr/local//lib/libpari.a(polclass.o): in function `polclass0': polclass.c:(.text+0xba0e): undefined reference to `sqrt' /usr/bin/ld: polclass.c:(.text+0xba18): undefined reference to `sqrt' collect2: error: ld returned 1 exit status make: *** [Makefile:49: extgcd] Error 1 $cd .. $sudo make install-bin-sta $cd examples/ $make TARGET=extgcd [same error messages] Anything else I might try? Best regards, Greg Marks
Attachment:
signature.asc
Description: PGP signature