gdb-6.8 build error with Centos 6

Needell Gerald jerry.needell at unh.edu
Sun Apr 8 10:19:28 UTC 2012


On Apr 8, 2012, at 4:51 AM, Ralf Corsepius wrote:

> 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?

For the project I am working on we established a policy early on to capture all sources and build the tools. This has not been a problem over the past 10 years of development with RTEMS. I have also downloaded your binaries and demonstrated that the resulting application is identical.  While we greatly appreciate that the binary distribution are available, we did not want to be dependent on their availability.


> 
>> 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.
I am using the .src.rpm from the repository:
http://www.rtems.org/ftp/pub/rtems/linux/4.9/centos/6/i386/

I have applied the included patches.

Are these what you use to build from? Clearly you are able to build gdb-6.8 for Centos 6

>> 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).
This is clearly the case. that is why I am curious how you are able to build it. 

> 
> [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.


Thank you for all of the support you provide to the RTEMS community. 
- Jerry

> 
> Ralf
> 





More information about the users mailing list