Closed Bug 1148523 Opened 9 years ago Closed 8 years ago

elfhack assertion failure causes build abort. elf.cpp:261: Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz' failed.

Categories

(Firefox Build System :: General, defect)

36 Branch
x86_64
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1233963

People

(Reporter: felix-mozilla, Unassigned)

Details

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0
Build ID: 20150306152707

Steps to reproduce:

This is in firefox 36.0.4 using gcc 4.9.2 and gold 2.25.51 as linker. This is a prerelease version of gold, but it appears to work as advertised.



Actual results:

During the firefox build, I get these error messages:

/tmp/mozbuild/build/unix/elfhack/elfhack -b -f test-array.so
elfhack: /tmp/mozilla-release/build/unix/elfhack/elf.cpp:261: Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz' failed.
Makefile:20: recipe for target 'test-array.so' failed
make[4]: *** [test-array.so] Aborted
make[4]: *** Waiting for unfinished jobs....
readelf -d test-ctors.so | grep '(INIT)'
 0x000000000000000c (INIT)               0x4020
/tmp/mozbuild/build/unix/elfhack/elfhack -b -f test-ctors.so
elfhack: /tmp/mozilla-release/build/unix/elfhack/elf.cpp:261: Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz' failed.
Makefile:20: recipe for target 'test-ctors.so' failed
Does it happen with 37.0 or Nightly?
Component: Untriaged → Build Config
Product: Firefox → Core
Summary: elfhack assertion failure causes build abort → elfhack assertion failure causes build abort. elf.cpp:261: Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz' failed.
Yes.

It goes away when I switch my linker back from gold to ld.
Can you edit build/unix/elfhack/Makefile.in, remove lines from "@echo ===" to "[ $$($(TOOLCHAIN_PREFIX)objdump ...", then ./mach build build/unix/elfhack, and attach test-array.so and test-ctors.so to this bug?
Attached file test-array.so
Attached file test-ctors.so
Same here with final 38.0.1 and binutils 2.25.51.0.2.
x86_64
binutils-2.25.51.0.2
gcc-4.9.3

firefox (as iceweasel) 39.0

Same problem - buildlog:
http://tnij.org/fqio0e8
Just hit the same problem on debian testing while building tip of aurora (fx45):

compiler: gcc version 4.9.2 (Debian 4.9.2-10)
linker: GNU ld (GNU Binutils for Debian) 2.25.90.20160101
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: