Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 593958 - mail-client/thunderbird-45.3.0-r1 build fail with gold linker
Summary: mail-client/thunderbird-45.3.0-r1 build fail with gold linker
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Mozilla Gentoo Team
URL: https://bugzilla.mozilla.org/show_bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-16 11:33 UTC by tsmksubc
Modified: 2016-10-14 16:27 UTC (History)
1 user (show)

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


Attachments
emerge --info '=mail-client/thunderbird-45.3.0-r1::gentoo': (emerge --info.txt,6.99 KB, text/plain)
2016-09-22 10:31 UTC, tsmksubc
Details
build.log (build.log.tar.bz2,143.93 KB, application/x-bzip2)
2016-09-22 10:37 UTC, tsmksubc
Details
emerge --info thunderbird (emerge--info.txt,7.40 KB, text/plain)
2016-10-05 01:30 UTC, josef.95
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tsmksubc 2016-09-16 11:33:12 UTC
emerge --info '=mail-client/thunderbird-45.3.0-r1::gentoo':
https://gist.github.com/soredake/4e196dc8bcf414723816291e09651cf6

build.log:
https://gist.github.com/soredake/408c7dcdc308ff3b5d44a5932a415e5b
Comment 1 tsmksubc 2016-09-17 17:57:00 UTC
It successfully compiles with bfd linker.
Comment 2 Tomáš Mózes 2016-09-22 04:54:17 UTC
Please always add attachments directly here.
Comment 3 tsmksubc 2016-09-22 10:31:04 UTC
Created attachment 447308 [details]
emerge --info '=mail-client/thunderbird-45.3.0-r1::gentoo':
Comment 4 tsmksubc 2016-09-22 10:37:36 UTC
Created attachment 447310 [details]
build.log
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2016-09-22 14:43:42 UTC
Do you get the same problem if you disable custom-optimization ?
Comment 6 josef.95 2016-10-05 01:30:22 UTC
Created attachment 449172 [details]
emerge --info thunderbird

Yes, same error with thunderbird-45.4.0::gentoo[-custom-optimization]

x86_64-pc-linux-gnu-g++  -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Wno-invalid-offsetof -Wcast-align -march=native -pipe -Wno-return-type -w -fno-strict-aliasing -fno-rtti -fno-math-errno -std=gnu++0x -pthread -pipe -fexceptions  -DNDEBUG -DTRIMMED -freorder-blocks -Os -fomit-frame-pointer  -fPIC -shared -Wl,-z,defs -Wl,-h,test-ctors.so -o test-ctors.so -lpthread -Wl,-O1 -Wl,--as-needed -Wl,-rpath=/usr/lib64/thunderbird,--enable-new-dtags -Wl,-z,noexecstack -Wl,-z,text   -Wl,-rpath-link,/var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/tbird/dist/bin -Wl,-rpath-link,/usr/lib  test-ctors.o -nostartfiles
===
===
=== If you get failures below, please file a bug describing the error
=== If you get failures below, please file a bug describing the error
=== and your environment (compiler and linker versions), and use
=== and your environment (compiler and linker versions), and use
=== --disable-elf-hack until this is fixed.
=== --disable-elf-hack until this is fixed.
===
# Fail if the library doesn't have INIT_ARRAY .dynamic info
===
# Fail if the library doesn't have INIT .dynamic info
readelf -d test-array.so | grep '(INIT_ARRAY)'
readelf -d test-ctors.so | grep '(INIT)'
 0x0000000000000019 (INIT_ARRAY)         0x99b0
 0x000000000000000c (INIT)               0x3fd0
/var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/tbird/build/unix/elfhack/elfhack -b -f test-array.so
/var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/tbird/build/unix/elfhack/elfhack -b -f test-ctors.so
elfhack: /var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/mozilla/build/unix/elfhack/elf.cpp:261: Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz' failed.
elfhack: /var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/mozilla/build/unix/elfhack/elf.cpp:261: Elf::Elf(std::ifstream&): Assertion `segment->getFileSize() == phdr.p_filesz' failed.
make[4]: *** [Makefile:27: test-ctors.so] Aborted (core dumped)
make[4]: *** Waiting for unfinished jobs....
make[4]: *** [Makefile:27: test-array.so] Aborted (core dumped)
make[4]: Leaving directory '/var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/tbird/build/unix/elfhack'
make[3]: *** [/var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/mozilla/config/recurse.mk:79: build/unix/elfhack/libs] Error 2
make[3]: Leaving directory '/var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/tbird'
make[2]: *** [/var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/mozilla/config/recurse.mk:33: libs] Error 2
make[2]: Leaving directory '/var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/tbird'
make[1]: *** [/var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/mozilla/config/rules.mk:547: default] Error 2
make[1]: Leaving directory '/var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/tbird'
make: *** [/var/tmp/portage/mail-client/thunderbird-45.4.0/work/thunderbird-45.4.0/client.mk:404: build] Error 2
 * ERROR: mail-client/thunderbird-45.4.0::gentoo failed (compile phase):
Comment 7 Ian Stakenvicius (RETIRED) gentoo-dev 2016-10-06 16:32:37 UTC
I still can't reproduce this using either binutils-2.25.1 or binutils-2.26.1, ld.bfd or ld.gold.  I'm still using gcc-4.9.3 however I don't see why that would matter at this point.

However, I did find the upstream bug reported for the same issue along with the patch they used to address it.  I've just pushed thunderbird-45.4.0-r1 to mozilla overlay with the patch integrated if you could please test?
Comment 8 josef.95 2016-10-07 18:33:26 UTC
Yes, with that patch from
[ebuild   R   #] mail-client/thunderbird-45.4.0-r1::mozilla
builds and works here fine.
I tested it on ~amd64 with
gcc:5.4.0::gentoo
binutils:2.26.1::gentoo
ld --version
GNU gold (Gentoo 2.26.1 p1.0 2.26.1) 1.11

Thanks.
Comment 9 Ian Stakenvicius (RETIRED) gentoo-dev 2016-10-14 16:27:52 UTC
Committed to gentoo repo for thunderbird and firefox 45.4.0