LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   errno: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS reference (https://www.linuxquestions.org/questions/programming-9/errno-tls-definition-in-lib64-libc-so-6-section-tbss-mismatches-non-tls-reference-528681/)

johnpaulodonnell 02-13-2007 10:41 AM

errno: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS reference
 
Hi.

Running Suse10.1 on an x86_64 machine. Trying to install a program in vain. The program is called ms2sac. It's used to convert between two specific formats (miniseed & SAC) used to store seismic data.

The ms2sac program requires qlib2 stuff. Here is the relevant part of the Makefile:

########################################################################
TARGET = ms2sac

SRCS = $(TARGET).c read_mseed_data.c get_stn_evt_info.c \
init_sac_header.c write_sac.c

OBJS = $(SRCS:%.c=%.o)

COORD_FILE = \"/usr/contrib/data/bdsn/bdsn.coord\"
IQLIB2 = -I../qlib2
QLIB2 = ../qlib2/libqlib2.a
LIBS = $(QLIB2) -lm

.PRECIOUS: $(QLIB2)

BINDIR = /usr/local/bin
MANDIR = /usr/local/man
MANEXT = 1

CC = cc
COPT = -g
CFLAGS = $(COPT) $(IQLIB2) -DDEFAULT_COORD_FILE=$(COORD_FILE)

######################################################################

I haven't set the COORD_FILE path yet but don't think this has any bearing on the error message that I'm getting...

The complete error message is as shown below, and I have no idea what it means. I'm still very much a newbie when it comes to this stuff - rubbish debugging skills! Google isn't helping me out too much either.


linux:/usr/local/ms2sac/ms2sac # make
(cd ../qlib2; make)
make[1]: Entering directory `/usr/local/ms2sac/qlib2'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/usr/local/ms2sac/qlib2'
cc -g -I../qlib2 -DDEFAULT_COORD_FILE=\"/usr/contrib/data/bdsn/bdsn.coord\" -o ms2sac ms2sac.o read_mseed_data.o get_stn_evt_info.o init_sac_header.o write_sac.o ../qlib2/libqlib2.a -lm
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: Warning: alignment 4 of symbol `qlib2_version' in ../qlib2/libqlib2.a(qlib2_version.o) is smaller than 8 in ms2sac.o
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: Warning: size of symbol `qlib2_version' changed from 8 in ms2sac.o to 4 in ../qlib2/libqlib2.a(qlib2_version.o)
/usr/lib64/gcc/x86_64-suse-linux/4.1.0/../../../../x86_64-suse-linux/bin/ld: errno: TLS definition in /lib64/libc.so.6 section .tbss mismatches non-TLS reference in ../qlib2/libqlib2.a(qutils.o)
/lib64/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [ms2sac] Error 1


Any suggestions would be very welcome!
Thanks a lot.

codedr 05-21-2008 09:46 PM

remove int errno decl
 
In the code I was compiling, the following line was the offender:

extern int errno;

I replaced this line with #include <errno.h>
and the problem went away.

sarilm 07-25-2008 04:37 AM

Yep, that worked for iptotal as well.

Thank you very much codedr.


All times are GMT -5. The time now is 02:20 AM.