gdb-6.8 build error with Centos 6

Ralf Corsepius ralf.corsepius at
Sun Apr 8 08:51:29 UTC 2012

On 04/07/2012 07:55 PM, Needell Gerald wrote:
> I am  trying to migrate my RTEMS-4.9 environment from a Centos 5 to  Centos 6  and I can rebuild all of the tools from the source RPM's except gdb-6.8
The rationale why people are doing so has always escaped me. Would you 
mind to explain why you are doing this?

> Am amu using the following configutation:
> #! /bin/sh
> ../gdb-6.8/configure --disable-werror  --with-system-readline --target=sparc-rtems --enable-sim --prefix=/opt/rtems
> The build fails with:
> ranlib libgdb.a
> rm -f gdb
> gcc -g -O2      \
> 		-o gdb gdb.o libgdb.a \
> 		  ../sim/erc32/libsim.a -lreadline ../opcodes/libopcodes.a ../bfd/libbfd.a  ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a     -lncurses -lm   ../libiberty/libiberty.a
> libgdb.a(tui-io.o): In function `tui_setup_io':
> /home/needell/fsw/rtems/rtems-4.9.2-unh/trunk/b-gdb/gdb/../../gdb-6.8/gdb/tui/tui-io.c:567: undefined reference to `readline_echoing_p'
> /home/needell/fsw/rtems/rtems-4.9.2-unh/trunk/b-gdb/gdb/../../gdb-6.8/gdb/tui/tui-io.c:525: undefined reference to `readline_echoing_p'
> /home/needell/fsw/rtems/rtems-4.9.2-unh/trunk/b-gdb/gdb/../../gdb-6.8/gdb/tui/tui-io.c:530: undefined reference to `readline_echoing_p'
> collect2: ld returned 1 exit status
> make[2]: *** [gdb] Error 1
> make[2]: Leaving directory `/home/needell/fsw/rtems/rtems-4.9.2-unh/trunk/b-gdb/gdb'
> make[1]: *** [all-gdb] Error 2
> make[1]: Leaving directory `/home/needell/fsw/rtems/rtems-4.9.2-unh/trunk/b-gdb'
> make: *** [all] Error 2
> I see that gdb-6.8 is in the prebuilt binary distribution for Centos 6 so there must be a way!
Correct. However, the error above indicates you likely are using 
outdated sources/patches and outdated rpm.specs.

> Any suggestions?
The breakdown above is caused by an incompatiblity between gdb-6.8 and 
CentOS 6's readline (CentOS 6 ships readline 6, while gdb-6.8 expects 
readline 5 and can't cope with readline 6).

[Or differently: Vanilla gdb-4.8 is too outdated to be compilable on 
"not-so-outdated" OSes such as CentOS 6]

Patches addressing this issue should be part of the rtems-4.9-gdb's 
patches and later versions of gdb.


More information about the users mailing list