| Bill Allombert on Fri, 12 May 2023 11:00:38 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: library .tbss mismatches |
On Thu, May 11, 2023 at 09:05:41PM -0500, Greg Marks wrote: > 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 Hello Greg, This error is caused by a mismatch between the library and the header files. you are using /usr/lib/libpari.so, so you need to use the headers files in /usr/include. Probably you have a copy of the old headers in /usr/local/include/pari (and probably other PARI files in /usr/local) you can do find / -name pari.h to find old pari.h files note: /usr/lib/gcc/x86_64-linux-gnu/10/../../../x86_64-linux-gnu/libpari.so is actually /usr/lib/libpari.so which is the version provided by Debian. the files /usr/lib/x86_64-linux-gnu/libpari.so and /usr/include/x86_64-linux-gnu/pari/pari.h are in the libpari-dev Debian package. Now if you want to compile PARI by yourself, you need set --prefix to some directory in Configure, do 'make install' and then set -I and -L to that directory in gcc. See examples/Makefile and examples/EXPLAIN If you are unsure follow the installation instruction, page 8. <https://pari.math.u-bordeaux.fr/Events/PARIday2021/talks/sources.pdf> cd to examples and do make TARGET=extgcd Cheers, Bill