Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 608182 - sys-boot/grub-2.02_beta3-r1 : collect2: error: ld returned 1 exit status
Summary: sys-boot/grub-2.02_beta3-r1 : collect2: error: ld returned 1 exit status
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Mike Gilbert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-02-04 08:48 UTC by Toralf Förster
Modified: 2017-02-04 19:57 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge-info.txt (emerge-info.txt,5.30 KB, text/plain)
2017-02-04 08:48 UTC, Toralf Förster
Details
config.log (config.log,458.81 KB, text/plain)
2017-02-04 08:48 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,187.72 KB, text/plain)
2017-02-04 08:48 UTC, Toralf Förster
Details
environment (environment,136.94 KB, text/plain)
2017-02-04 08:48 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,19.12 KB, application/x-bzip)
2017-02-04 08:48 UTC, Toralf Förster
Details
sys-boot:grub-2.02_beta3-r1:20170204-013232.log (sys-boot:grub-2.02_beta3-r1:20170204-013232.log,837.92 KB, text/plain)
2017-02-04 08:48 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2017-02-04 08:48:11 UTC
x86_64-pc-linux-gnu-gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations  -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -march=i386 -m32 -mrtd -mregparm=3 -falign-jumps=1 -falign-loops=1 -falign-functions=1 -freg-struct-return -mno-mmx -mno-sse -mno-sse2 -mno-sse3 -mno-3dnow -msoft-float -fno-dwarf2-cfi-asm -mno-stack-arg-probe -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-PIE -fno-stack-protector -Wtrampolines   -ffreestanding   -m32 -Wl,-melf_i386 -Wl,--build-id=none  -nostdlib -Wl,-N -Wl,-r,-d   -o disk.module lib/disk_module-disk.o   
/usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: -r and -shared may not be used together
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:24255: disk.module] Error 1
make[3]: Leaving directory '/var/tmp/portage/sys-boot/grub-2.02_beta3-r1/work/grub-2.02~beta3-pc/grub-core'
make[2]: *** [Makefile:23525: all] Error 2

  -----------------------------------------------------------------

  This is an unstable amd64 chroot image (named hardened-no-multilib-libressl-unstable_20170131-164629) at a hardened host acting as a tinderbox.

  -----------------------------------------------------------------

gcc-config -l:
 [1] x86_64-pc-linux-gnu-6.3.0 *
llvm-config --version:
3.9.1

Available Python interpreters, in order of preference:
  [1]   python3.4
  [2]   python2.7 (fallback)

java-config:

  -----------------------------------------------------------------
Comment 1 Toralf Förster gentoo-dev 2017-02-04 08:48:14 UTC
Created attachment 462394 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2017-02-04 08:48:17 UTC
Created attachment 462396 [details]
config.log
Comment 3 Toralf Förster gentoo-dev 2017-02-04 08:48:21 UTC
Created attachment 462398 [details]
emerge-history.txt
Comment 4 Toralf Förster gentoo-dev 2017-02-04 08:48:24 UTC
Created attachment 462400 [details]
environment
Comment 5 Toralf Förster gentoo-dev 2017-02-04 08:48:27 UTC
Created attachment 462402 [details]
etc.portage.tbz2
Comment 6 Toralf Förster gentoo-dev 2017-02-04 08:48:31 UTC
Created attachment 462404 [details]
sys-boot:grub-2.02_beta3-r1:20170204-013232.log
Comment 7 Mike Gilbert gentoo-dev 2017-02-04 19:50:01 UTC
I cannot reproduce this with gcc-6.3.0 and binutils-2.27.

Downgrading to binutils-2.25.1 makes the toolchain unusable.
Comment 8 Mike Gilbert gentoo-dev 2017-02-04 19:57:15 UTC
From #gentoo-hardened:

[04:10:59] <Zorry> toralf: check your config.log you have error in the -no-pie check that way grub fail bug 608182
[04:11:02] <willikins> Zorry: https://bugs.gentoo.org/608182 "sys-boot/grub-2.02_beta3-r1 : collect2: error: ld returned 1 exit status"; Gentoo Linux, Current packages; CONF; toralf.foerster:floppym
[04:29:25] <toralf> Zorry: ok, this is "just" the tinderbox, so something I do have to change ?
[08:33:08] <Zorry> your toolchin is broken on that build
[08:34:01] <Zorry> for that bug you are hitting is allready fixed
[08:35:20] <toralf> Zorry: oh -ok, so that image needs an upgrade (usually done every 24 hours, but only @system is upgraded) -or- it is broken, will look on it, thx
[08:37:47] <Zorry> /bin/ld: skipping incompatible /usr/lib/gcc/x86_64-pc-linux-gnu/6.3.0/libgcc.a when searching for -lgcc
[08:38:00] <Zorry> is from the config.log

Feel free to re-open this if you still encounter the problem with a rebuilt toolchain.