| Bill Allombert on Fri, 12 May 2023 13:55:15 +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 > > 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.