Bill Allombert on Wed, 20 Jun 2007 16:36:24 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Compilation for debugging |
On Wed, Jun 20, 2007 at 03:52:22PM +0200, Xavier-Francois Roblot wrote: > Hi, > > I have a C-file called series.c that contains a certain number of > functions that I use in GP files using install. Previously, when it did > not work properly, I was able to compile it in debug mode and run it > with dbg to find out what was going on. But when I try to do that now, I > get the following error: > > gcc -c -g -o series.o -Wall -fPIC -I/home/roblot/pari/installed/include series.c -L/home/roblot/pari/Olinux-i686.dbg -L/usr/lib && gcc -o series.so -shared -Wall -fPIC -fomit-frame-pointer -Wl,-shared series.o -L/home/roblot/pari/Olinux-i686.dbg -lc -ldl -lm -L/usr/lib -lpari > /usr/lib/gcc/i686-pc-linux-gnu/4.1.2/../../../../i686-pc-linux-gnu/bin/ld: avma: TLS reference in series.o mismatches non-TLS definition in /home/roblot/pari/Olinux-i686.dbg/libpari.so section .bss > /home/roblot/pari/Olinux-i686.dbg/libpari.so: could not read symbols: Bad value > collect2: ld returned 1 exit status > make: *** [debug] Error 1 > > For information, I am using GCC v.4.1.2. > > If anybody can help, I would be very grateful since it is quite > difficult to debug a big program without using gdb :o) I wonder whether you have used the option --enable-tls when configuring PARI. This breaks the ABI, so you have to do it also for the debugging build. You cannot use the TLS headers with a non-TLS libpari. However, I would advise to install the debugging build somewhere and using the headers and the library from the debugging build. This would avoid this kind of issues entirely. Of course , you can use gp2c-dbg to compile your module. Cheers, Bill.