Modify

Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#12445 closed defect (wontfix)

grub: "fatal error: -Ttext: invalid option value (expected an integer): 7C00"

Reported by: linus.luessing@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: base system Version: Attitude Adjustment 12.09 Beta
Keywords: grub, build, ld, gold, failure Cc: morfeas3000@…

Description

grub-0.97 does not build with the GNU ELF linker "gold". On the Debian Wheezy I'm having here, both binutils and binutils-gold were installed, meaning /usr/bin/ld was a symlink to /usr/bin/ld.gold, resulting in a failing Attitude Adjustment build (rev. 34119) with the following error message:

[...]
make[3]: Entering directory `/var/tmp/openwrt/attitude-adjustment-2/package/grub'
make -j1 -C /var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97
make[4]: Entering directory `/var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97'
make  all-recursive
make[5]: Entering directory `/var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97'
Making all in netboot
make[6]: Entering directory `/var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97/netboot'
make[6]: Nothing to be done for `all'.
make[6]: Leaving directory `/var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97/netboot'
Making all in stage2
make[6]: Entering directory `/var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97/stage2'
make  all-am
make[7]: Entering directory `/var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97/stage2'
gcc  -m32 -O2 -I/var/tmp/openwrt/attitude-adjustment-2/staging_dir/host/include -fno-stack-protector -U_FORTIFY_SOURCE -nostdlib -Wl,-N -Wl,-Ttext -Wl,7C00 -L/var/tmp/openwrt/attitude-adjustment-2/staging_dir/host/lib -o start_eltorito.exec start_eltorito_exec-start_eltorito.o
/usr/bin/ld.gold.real: fatal error: -Ttext: invalid option value (expected an integer): 7C00
collect2: error: ld returned 1 exit status
make[7]: *** [start_eltorito.exec] Error 1
make[7]: Leaving directory `/var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97/stage2'
make[6]: *** [all] Error 2
make[6]: Leaving directory `/var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97/stage2'
make[5]: *** [all-recursive] Error 1
make[5]: Leaving directory `/var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97'
make[3]: *** [/var/tmp/openwrt/attitude-adjustment-2/build_dir/host/grub-0.97/.built] Error 2
make[3]: Leaving directory `/var/tmp/openwrt/attitude-adjustment-2/package/grub'
make[2]: *** [package/grub/host/compile] Error 2
make[2]: Leaving directory `/var/tmp/openwrt/attitude-adjustment-2'
make[1]: *** [/var/tmp/openwrt/attitude-adjustment-2/staging_dir/target-i386_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/var/tmp/openwrt/attitude-adjustment-2'
make: *** [world] Error 2
make V=s  9.10s user 6.40s system 67% cpu 22.888 total

After removing the binutils-gold package, so using /usr/bin/ld.bfd instead, the build works fine.

It looks like in ld.bfd a leading '0x' for the '-Ttext' is optional, but not in ld.gold.

$ /usr/bin/ld.gold --version
GNU gold (GNU Binutils for Debian 2.22) 1.11
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.
$ /usr/bin/ld.bfd --version
GNU ld (GNU Binutils for Debian) 2.22
Copyright 2011 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

This issue has been reported, but without an answer yet, here before: https://lists.openwrt.org/pipermail/openwrt-users/2012-August/002161.html

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by anonymous

You should report this upstream, this does not seem to be an OpenWrt specific problem.

comment:2 Changed 5 years ago by florian

  • Resolution set to wontfix
  • Status changed from new to closed

Correct, this is not an OpenWrt issue, and we no longer have the legacy grub package now.

comment:3 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.