Loïc Grenié on Fri, 12 May 2023 07:31:22 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: library .tbss mismatches


On Fri 12 may 2023 at 04:06, 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

     You are trying to mix threaded pari with non-threaded program. I think

gcc -Wall -fPIC -O3 -o extgcd extgcd.c -lpari

    should do the trick.
 
        Have a good day,

              Loïc