[Converted from Gnats 2536] make fails with the following error: make[1]: Leaving directory `/src/gnu/gdb-6.8.50.20081014/obj/solaris9/gdb' rm -f gdb gcc -g -O2 \ -o gdb gdb.o libgdb.a \ ../readline/libreadline.a ../opcodes/libopcodes.a ../bfd/libbfd.a ./../intl/libintl.a ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a -ldl -lcurses -lz -lsocket -lnsl -lm ../libiberty/libiberty.a gnulib/libgnu.a Undefined first referenced symbol in file elfcore_write_prpsinfo libgdb.a(procfs.o) elfcore_write_prstatus libgdb.a(procfs.o) ld: fatal: Symbol referencing errors. No output written to gdb collect2: ld returned 1 exit status make: *** [gdb] Error 1 gcc is 4.2.4 Source code is in /src/gnu/gdb-6.8.50.20081014/src. I'm building in /src/gnu/gdb-6.8.50.20081014/obj/solaris9/gdb since I build for multiple architectures from a single source tree. Release: gdb-6.8.50.20081014 Environment: Solaris 9/sparc How-To-Repeat: $ ../../src/configure --prefix=/opt/gdb-6.8.50.20081014 $ make
From: Pedro Alves <pedro@codesourcery.com> To: gdb-prs@sourceware.org, selsky@columbia.edu Cc: gdb-gnats@sources.redhat.com Subject: Re: build/2536: Undefined symbols: elfcore_write_prpsinfo, elfcore_write_prstatus Date: Wed, 15 Oct 2008 12:26:23 +0100 This seems to be related to a recend bfd change. From here: http://sourceware.org/ml/gdb-patches/2008-10/msg00283.html I wrote: "Something (seems to have) changed in the bfd side, maybe related to the recent libtool update, which triggers this while configuring bfd: configure:18672: checking sys/procfs.h usability configure:18684: gcc -c -g -O2 conftest.c >&5 In file included from /usr/include/sys/procfs.h:50, from conftest.c:104: /usr/include/sys/old_procfs.h:57:2: #error "Cannot use procfs in the large file compilation environment" With the end result being that HAVE_PRPSINFO_T and HAVE_PSINFO_T end up undefined in bfd's config.h, thus skipping including elfcore_write_prpsinfo and elfcore_write_prstatus in libbfd.a (from bfd/elf.c). bfd's configure is tripping on this in /usr/include/sys/old_procfs.h: #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 #error "Cannot use procfs in the large file compilation environment" #endif Because bfd's configure is now noticing that _FILE_OFFSET_BITS is 64, while it didn't a few weeks ago. target/host/build: i386-pc-solaris2.11-gcc $uname -a SunOS opensolaris 5.11 snv_86 i86pc i386 i86pc Solaris $gcc -v Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs Configured with: /builds/sfwnv-86/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc --enable-shared Thread model: posix gcc version 3.4.3 (csl-sol210-3_4-20050802)"
From: Daniel Jacobowitz <drow@false.org> To: Pedro Alves <pedro@codesourcery.com> Cc: gdb-gnats@sourceware.org Subject: Re: build/2536: Undefined symbols: elfcore_write_prpsinfo, elfcore_write_prstatus Date: Wed, 15 Oct 2008 11:50:57 -0400 On Wed, Oct 15, 2008 at 11:28:01AM -0000, Pedro Alves wrote: > I wrote: > "Something (seems to have) changed in the bfd side, maybe related to the recent libtool update, > which triggers this while configuring bfd: I suggest sending mail to the binutils list about this, then. -- Daniel Jacobowitz CodeSourcery
Fixed by: 2008-11-13 Joel Brobecker <brobecker@adacore.com> * configure.in: Deactivate large-file support on native 32bit sparc-solaris unless the user explicitly requested it. * configure: Regenerate. 2008-11-25 Joel Brobecker <brobecker@adacore.com> * configure.in: Deactivate large-file support on native x86-solaris as well unless the user explicitly requested it. * configure: Regenerate. Thanks Joel!