static linking of current CVS gdb failed
Andreas Jaeger
aj@arthur.rhein-neckar.de
Sat Sep 11 06:09:00 GMT 1999
I'm running glibc 2.1.2 on Linux 2.2.12 (i486) with gcc 2.95.1.
Trying to build a static gdb, I got the following error message:
$ make LDFLAGS=-static
rm -f gdb
/opt/gcc-2.95/bin/gcc -g -static -o gdb main.o libgdb.a ../bfd/libbfd.a ../readline/libreadline.a ../opcodes/libopcodes.a ../libiberty/libiberty.a -lncurses -lm ../libiberty/libiberty.a
/usr/lib/libc.a(regex.o): In function `regex_compile':
/usr/glibc/src/glibc-2-1-branch/posix/regex.c:1905: multiple definition of `re_max_failures'
libgdb.a(gnu-regex.o):/mnt/binutils/build-gdb/gdb/../../gdb/gdb/gnu-regex.c:178: first defined here
/usr/lib/libc.a(regex.o): In function `__regerror':
/usr/glibc/src/glibc-2-1-branch/posix/regex.c:5815: multiple definition of `__regerror'
libgdb.a(gnu-regex.o):/mnt/binutils/build-gdb/gdb/../../gdb/gdb/gnu-regex.c:5738: first defined here
/usr/bin/ld: Warning: size of symbol `__regerror' changed from 167 to 183 in regex.o
collect2: ld returned 1 exit status
make: *** [gdb] Error 1
The problem is that both gdb (in gnu-regex.c) and glibc define the
regex functions. Is it possible for configure to check for glibc
regex functions and don't link with gnu-regex.c in that case?
Andreas
--
Andreas Jaeger aj@arthur.rhein-neckar.de jaeger@informatik.uni-kl.de
for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de
More information about the Gdb
mailing list