Skip to contentSkip to conversation

New: Buildroot compile failure for toolchain/gdb-7.4/intl/relocatable.c

Buildroot bugzilla at busybox.net 1 participant 4 messages Mar 6, 2012 – May 26, 2013

lore
Share & tools
lore
#0 lore raw

https://bugs.busybox.net/show_bug.cgi?id=4868

Summary: Buildroot compile failure for
toolchain/gdb-7.4/intl/relocatable.c
Product: buildroot
Version: 2012.02
Platform: PC
OS/Version: Linux
Status: NEW
Severity: minor
Priority: P5
Component: Other
AssignedTo: unassigned at buildroot.uclibc.org
ReportedBy: ps.report at gmx.net
CC: buildroot at uclibc.org
Estimated Hours: 0.0

Created attachment 4082
--> https://bugs.busybox.net/attachment.cgi?id=4082
buildroot config file

Attached a fix/patch for the following compile failure with buildroot and gdb-7.4 (.config file attached):

make[3]: Entering directory /tmp//build-001/build/gdb-7.4-target/libiberty' make[4]: Entering directory /tmp//build-001/build/gdb-7.4-target/libiberty/testsuite' make[4]: Nothing to be done for `all'.
make[4]: Leaving directory /tmp//build-001/build/gdb-7.4-target/libiberty/testsuite' make[3]: Leaving directory /tmp//build-001/build/gdb-7.4-target/libiberty' make[3]: Entering directory `/tmp//build-001/build/gdb-7.4-target/intl' rm -f stamp-h1
/bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
test -f config.h || (rm -f stamp-h1 && /usr/bin/make stamp-h1) /tmp//build-001/host/usr/bin/x86_64-unknown-linux-uclibc-gcc -c -pipe -Os -g2 -fPIC -DPIC -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Wno-error -DHAVE_CONFIG_H -DINSTALLDIR="\"/usr/lib\"" -I. -I/tmp//build-001/toolchain/gdb-7.4/intl /tmp//build-001/toolchain/gdb-7.4/intl/relocatable.c /tmp//build-001/toolchain/gdb-7.4/intl/relocatable.c: In function ?libintl_relocate?:
/tmp//build-001/toolchain/gdb-7.4/intl/relocatable.c:392:40: error:
?INSTALLPREFIX? undeclared (first use in this function) /tmp//build-001/toolchain/gdb-7.4/intl/relocatable.c:392:40: note: each undeclared identifier is reported only once for each function it appears in make[3]: *** [relocatable.o] Error 1
make[3]: Leaving directory `/tmp//build-001/build/gdb-7.4-target/intl' make[2]: *** [all-intl] Error 2
make[2]: Leaving directory `/tmp//build-001/build/gdb-7.4-target' make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp//build-001/build/gdb-7.4-target'
make: *** [/tmp//build-001/build/gdb-7.4-target/gdb/gdb] Error 2
make: Leaving directory `/tmp//buildroot'

I think the relevant config options to hit this bug are:

BR2_PACKAGE_GDB=y
BR2_PACKAGE_GDB_SERVER=y
BR2_GDB_VERSION_7_4=y
BR2_GDB_VERSION="7.4"
BR2_ENABLE_LOCALE=y

Analysis: the Makefile for the gdb-7.4 embedded (lib-)intl fails to set a define for 'INSTALLPREFIX'.

Fix: see attached buildroot patch

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#1 lore raw

[Buildroot] [Bug 4868] Buildroot compile failure for toolchain/gdb-7.4/intl/relocatable.c

https://bugs.busybox.net/show_bug.cgi?id=4868

--- Comment #1 from Peter Seiderer <[email protected]> 2012-03-06 19:04:57 UTC --- Created attachment 4088
--> https://bugs.busybox.net/attachment.cgi?id=4088
Fix gdb-7.4 intl relocation.c compile failure.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#2 lore raw

[Buildroot] [Bug 4868] Buildroot compile failure for toolchain/gdb-7.4/intl/relocatable.c

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=4868

Peter Seiderer <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

   Attachment #4088|0                           |1

is obsolete| |

--- Comment #2 from Peter Seiderer <[email protected]> 2012-03-06 20:03:24 UTC --- Created attachment 4094
--> https://bugs.busybox.net/attachment.cgi?id=4094
Fix gdb-7.4 intl relocatable.c compile failure.

Fix typo on patch (relocation vs. relocatable).

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
#3 lore raw

[Buildroot] [Bug 4868] Buildroot compile failure for toolchain/gdb-7.4/intl/relocatable.c

In reply to bugzilla at busybox.net

https://bugs.busybox.net/show_bug.cgi?id=4868

Thomas Petazzoni <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #3 from Thomas Petazzoni <[email protected]> 2013-05-26 13:51:09 UTC --- Since commit 7ea1e92bdd9acf6cd5b021e61a18703e27885426, we're no longer passing
-fPIC -DPIC when building on x86_64. So the particular piece of gdb code that
was causing the build failure is no longer used because it is enclosed in #if
defined PIC && defined INSTALLDIR.

Since the problem can no longer be hit when building gdb from Buildroot, I don't believe it's really worth carrying the gdb patch.

Thanks for your bug report! Do not hesitate to reopen if you disagree with the solution.

Signature · 3 lines
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.