This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: compile error on solaris 8 and 2.6
- From: Joel Brobecker <brobecker at gnat dot com>
- To: Andrew Hall <halla3 at corp dot earthlink dot net>
- Cc: gdb at sources dot redhat dot com
- Date: Wed, 20 Oct 2004 10:44:38 -0700
- Subject: Re: compile error on solaris 8 and 2.6
- References: <1098287184.27340.41.camel@flagg>
> While trying to compile gdb on Solaris 8 and 2.6 I get the following
> error:
>
> rm -f gdb
> gcc -g -O2 \
> -o gdb gdb.o libgdb.a \
> ../bfd/libbfd.a ../readline/libreadline.a
> ../opcodes/libopcodes.a ../libiberty/libiberty.a -ldl -ltermcap
> -lsocket -lnsl -lm -liconv ../libiberty/libiberty.a
> Undefined first referenced
> symbol in file
> wattr_on libgdb.a(tui-wingeneral.o)
> wattr_off libgdb.a(tui-wingeneral.o)
> ld: fatal: Symbol referencing errors. No output written to gdb
> collect2: ld returned 1 exit status
> make[1]: *** [gdb] Error 1
> make[1]: Leaving directory `/netapp/home/halla3/gdb-6.2.1/gdb'
> make: *** [all-gdb] Error 2
> bash-2.03$
I am not sure exactly what the problem is, but I'll give you some
ideas: These symbols are used for TUI, a text-based interface for
GDB. As a temporary measure, you should be able to get rid of this
error by configuring GDB without TUI: --disable-tui.
I remember having experienced some problems building TUI myself
on sparc-solaris or mips-irix, because I use a local installation
of ncurses. So the configure script sort of picks up ncurses library,
but still uses the .h files in /usr/include. So I get a discrepancy
between what the compiler thinks is available in my ncurses library,
and what is actually there. And I also get undefined symbols. I don't
know if it's possible to make it work or not (I think Michael Chastain
tried on Tru64), but you could try by adding -I/path/to/ncurses/include
to your CFLAGS (make CFLAGS='-g -O2 -I/blablabla).
Maybe it's a bona fide omission in our configure script. It's hard to
tell without knowing more about your environment. But since I don't use
TUI, I never spent the time looking into this. I just build without TUI.
Good luck,
--
Joel