Bug 8731 - build failure, gdb 5.1, native alphaev68-dec-osf5.1, -ltermcap -lm -lncurses
Summary: build failure, gdb 5.1, native alphaev68-dec-osf5.1, -ltermcap -lm -lncurses
Status: RESOLVED DUPLICATE of bug 8923
Alias: None
Product: gdb
Classification: Unclassified
Component: build (show other bugs)
Version: 6.1
: P1 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-04-24 08:48 UTC by Michael Elizabeth Chastain
Modified: 2011-11-18 15:54 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Elizabeth Chastain 2004-04-24 08:48:01 UTC
[Converted from Gnats 1626]

The build log says:

rm -f gdb
gcc -g -O2       \
        -o gdb gdb.o libgdb.a \
           ../bfd/libbfd.a ../readline/libreadline.a ../opcodes/libopcodes.a ./../intl/libintl.a ../libiberty/libiberty.a     -ltermcap -lm -lncurses  ../libiberty/libiberty.a
keypad
cbreak
_setecho
nodelay
_setnonl
LINES
COLS
def_prog_mode
def_shell_mode
stdscr
_acs_map
curscr
getcury
getcurx
_ring
savetty
resetty
napms
collect2: ld returned 1 exit status
make[1]: *** [gdb] Error 1
make[1]: Leaving directory `/cluster/members/member0/tmp/chastain/build/alphaev68-dec-osf5.1/vanilla/target/native/gdb-6.1/gdb'
make: *** [all-gdb] Error 2

The problem is simple.  In the library list, -lncurses appears after -ltermcap; it needs to appear before.

gdb 6.0 built on this platform   The library list for gdb 6.0 does not include -lncurses, so there is no ordering problem.

Release:
gdb 6.1

Environment:
native alphaev68-dec-osf5.1
building with gcc 3.3.3, binutils 2.14

How-To-Repeat:
Build gdb on native alphaev68-dec-osf5.1.
Comment 1 Michael Elizabeth Chastain 2004-04-24 08:48:01 UTC
Fix:
The problem is in configure.in.  The autoconf test for ncurses is before the autoconf test for termlib.  But the various autoconf macros build the library list in reverse order (lowest libraries first), so the the test for ncurses needs to come *after* the test for termlib.
Comment 2 Tom Tromey 2011-11-18 15:54:23 UTC
Probably a duplicate.
There have been fixes here in the last 7 years, please try a newer release.

*** This bug has been marked as a duplicate of bug 8923 ***