This is the mail archive of the gdb@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compile error on solaris 8 and 2.6


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]