This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: another libc1 compiling error
- To: 3diff at gnu dot org
- Subject: Re: another libc1 compiling error
- From: Mark Kettenis <kettenis at wins dot uva dot nl>
- Date: Fri, 12 May 2000 16:36:41 +0200 (MET DST)
- CC: gdb-patches at sourceware dot cygnus dot com
- References: <200005121357.JAA04893@crapple-jacks.gnu.ai.mit.edu>
Date: Fri, 12 May 2000 09:57:11 -0400
From: Brian Youmans <3diff@gnu.org>
Once again attempting to compile the latest
snapshot on delysid.gnu.org, it failed as follows:
gcc -c -g -O2 -I. -I. -I./config -DHAVE_CONFIG_H -I./../include/opcode -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../intl -I./../intl -I./tui -DUSE_INCLUDED_REGEX os9kread.c
gcc -c -g -O2 -I. -I. -I./config -DHAVE_CONFIG_H -I./../include/opcode -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../intl -I./../intl -I./tui -DUSE_INCLUDED_REGEX top.c
gcc -c -g -O2 -I. -I. -I./config -DHAVE_CONFIG_H -I./../include/opcode -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../intl -I./../intl -I./tui -DUSE_INCLUDED_REGEX utils.c
In file included from utils.c:31:
/usr/include/term.h:44: conflicting types for `ttytype'
/usr/include/curses.h:177: previous declaration of `ttytype'
/usr/include/term.h:565: conflicting types for `tgetent'
/usr/include/termcap.h:31: previous declaration of `tgetent'
/usr/include/term.h:574: conflicting types for `tputs'
/usr/include/termcap.h:39: previous declaration of `tputs'
make[1]: *** [utils.o] Error 1
make[1]: Leaving directory `/gnu/fsf/fsf/3diff/gdb+dejagnu-20000511/gdb'
make: *** [all-gdb] Error 2
Hmm. The GDB configure script fails to recognize the somewhat broken
curses instalation on delysid. The problem is that delysid has both
ncurses and the old BSD curses installed, where /usr/include/curses.h
is the BSD header, and /usr/include/ncurses/curses.h is the ncurses
header. In addition there is /usr/include/ncurses/term.h, but somehow
the same file is also installed as /usr/include/term.h. So the
compiler is using the ncurses <term.h> together with the BSD
<curses.h>, which obviously doesn't work. The solution is to make GDB
use the headers in /usr/include/ncurses. Running configure with
CPPFLAGS=-I/usr/include/ncurses should work:
$ CPPFLAGS=-I/usr/include/ncurses ./configure ...
Note that GDB is prefers -lncurses over -lcurses, so using the BSD
header wouldn't work anyway.
There isn't much we can do in GDB to detect this lossage. I suppose
there aren't that many machines out there with that have both BSD
curses and ncurses installed in /usr.
Mark