Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 722206 - sys-boot/mbr-gpt-0.0.1-r1 : /.../ld: fatal error: -pie and -static are incompatible
Summary: sys-boot/mbr-gpt-0.0.1-r1 : /.../ld: fatal error: -pie and -static are incomp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-10 19:03 UTC by Toralf Förster
Modified: 2022-12-05 05:24 UTC (History)
1 user (show)

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


Attachments
emerge-info.txt (emerge-info.txt,16.28 KB, text/plain)
2020-05-10 19:03 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,263.51 KB, text/plain)
2020-05-10 19:03 UTC, Toralf Förster
Details
environment (environment,67.53 KB, text/plain)
2020-05-10 19:03 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,16.44 KB, application/x-bzip)
2020-05-10 19:03 UTC, Toralf Förster
Details
sys-boot:mbr-gpt-0.0.1-r1:20200510-185622.log (sys-boot:mbr-gpt-0.0.1-r1:20200510-185622.log,1.89 KB, text/plain)
2020-05-10 19:04 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,17.38 KB, application/x-bzip)
2020-05-10 19:04 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 2020-05-10 19:03:43 UTC
make -j1 CC=x86_64-pc-linux-gnu-gcc 
x86_64-pc-linux-gnu-gcc -Wall -m32 -nostdinc -nostdlib -Wl,-N,-Ttext,0x600 -DRELOC_ADDR=0x600 boot.S -o boot.elf
/usr/lib/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../x86_64-pc-linux-gnu/bin/ld: fatal error: -pie and -static are incompatible
collect2: error: ld returned 1 exit status
make: *** [Makefile:9: boot.elf] Error 1
 * ERROR: sys-boot/mbr-gpt-0.0.1-r1::gentoo failed (compile phase):

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

  This is an unstable amd64 chroot image at a tinderbox (==build bot)
  name: 17.1_hardened-abi32+64-20200503-182741

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

gcc-config -l:
 [1] x86_64-pc-linux-gnu-10.1.0 *
clang version 10.0.0 
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/10/bin
/usr/lib/llvm/10
10.0.0
Available Python interpreters, in order of preference:
  [1]   python3.6
  [2]   python3.8 (fallback)
  [3]   python3.7 (fallback)
  [4]   python2.7 (fallback)
  [5]   pypy3 (fallback)
Available Ruby profiles:
  [1]   ruby24 (with Rubygems)
  [2]   ruby25 (with Rubygems) *
Available Rust versions:
  [1]   rust-bin-1.43.1 *
The following VMs are available for generation-2:
*)	AdoptOpenJDK 8.252_p09 [openjdk-bin-8]
Available Java Virtual Machines:
  [1]   openjdk-bin-8  system-vm

The Glorious Glasgow Haskell Compilation System, version 8.0.2

  timestamp(s) of HEAD at this tinderbox image:
/var/db/repos/gentoo	Sun 10 May 2020 05:37:16 PM UTC

emerge -qpvO sys-boot/mbr-gpt
[ebuild  N    ] sys-boot/mbr-gpt-0.0.1-r1
Comment 1 Toralf Förster gentoo-dev 2020-05-10 19:03:46 UTC
Created attachment 637730 [details]
emerge-info.txt
Comment 2 Toralf Förster gentoo-dev 2020-05-10 19:03:50 UTC
Created attachment 637732 [details]
emerge-history.txt
Comment 3 Toralf Förster gentoo-dev 2020-05-10 19:03:53 UTC
Created attachment 637734 [details]
environment
Comment 4 Toralf Förster gentoo-dev 2020-05-10 19:03:57 UTC
Created attachment 637736 [details]
etc.portage.tbz2
Comment 5 Toralf Förster gentoo-dev 2020-05-10 19:04:00 UTC
Created attachment 637738 [details]
sys-boot:mbr-gpt-0.0.1-r1:20200510-185622.log
Comment 6 Toralf Förster gentoo-dev 2020-05-10 19:04:03 UTC
Created attachment 637740 [details]
temp.tbz2
Comment 7 Larry the Git Cow gentoo-dev 2022-12-05 05:24:46 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f1de25303bd07f70781ec37d648b62fe7c1d3916

commit f1de25303bd07f70781ec37d648b62fe7c1d3916
Author:     Robin H. Johnson <robbat2@gentoo.org>
AuthorDate: 2022-12-05 05:19:25 +0000
Commit:     Robin H. Johnson <robbat2@gentoo.org>
CommitDate: 2022-12-05 05:24:44 +0000

    sys-boot/mbr-gpt: fix PHDR/LOAD mess
    
    "PHDR segment not covered by LOAD segment", an error meaningless for MBR
    code.
    
    The solution is buried in binutils changelogs: --no-dynamic-linker for
    obscure cases like this.
    
    Reference: https://inbox.sourceware.org/binutils/20200222023739.GB5570@bubble.grove.modra.org/T/#u
    Closes: https://bugs.gentoo.org/870913
    Closes: https://bugs.gentoo.org/709510
    Closes: https://bugs.gentoo.org/722206
    Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>

 sys-boot/mbr-gpt/mbr-gpt-0.0.1-r2.ebuild | 69 ++++++++++++++++++++++++++++++++
 1 file changed, 69 insertions(+)