Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 646038 - www-client/firefox-58.0 - src_compile(): gmake[4]: *** [Makefile:27: test-ctors.so] Aborted (core dumped)
Summary: www-client/firefox-58.0 - src_compile(): gmake[4]: *** [Makefile:27: test-cto...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-29 10:10 UTC by Mike Lothian
Modified: 2019-03-31 20:06 UTC (History)
2 users (show)

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


Attachments
build.log.xz (build.log.xz,55.77 KB, application/x-xz)
2018-01-29 10:10 UTC, Mike Lothian
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Lothian 2018-01-29 10:10:20 UTC
Created attachment 517050 [details]
build.log.xz

36:00.25 dependentlibs.list
36:02.14 ===
36:02.14 === If you get failures below, please file a bug describing the error
36:02.14 ===
36:02.14 === and your environment (compiler and linker versions), and
36:02.14 === If you get failures below, please file a bug describing the error
36:02.14 === provide the pre-elfhacked library as an attachment.
36:02.14 === and your environment (compiler and linker versions), and
36:02.14 === Use --disable-elf-hack until this is fixed.
36:02.14 === provide the pre-elfhacked library as an attachment.
36:02.14 ===
36:02.14 === Use --disable-elf-hack until this is fixed.
36:02.14 ===
36:02.14  0x0000000000000019 (INIT_ARRAY)         0x8de0
36:02.15  0x000000000000000c (INIT)               0x4010
36:02.15 test-array.so: Reduced by 12088 bytes
36:02.15 free(): invalid next size (normal)
36:02.15 test-ctors.so: Reduced by 12096 bytes
36:02.15 free(): invalid next size (normal)
36:02.32 gmake[4]: *** [Makefile:27: test-ctors.so] Aborted (core dumped)
36:02.32 gmake[4]: *** Waiting for unfinished jobs....
36:02.32 gmake[4]: *** [Makefile:27: test-array.so] Aborted (core dumped)
36:02.32 gmake[3]: *** [/var/tmp/portage/www-client/firefox-58.0/work/firefox-58.0/config/recurse.mk:100: build/unix/elfhack/libs] Error 2
36:02.32 gmake[2]: *** [/var/tmp/portage/www-client/firefox-58.0/work/firefox-58.0/config/recurse.mk:33: libs] Error 2
36:02.32 gmake[1]: *** [/var/tmp/portage/www-client/firefox-58.0/work/firefox-58.0/config/rules.mk:432: default] Error 2
36:02.32 gmake: *** [client.mk:274: build] Error 2
36:02.35 0 compiler warnings present.
36:02.55 /usr/bin/notify-send --app-name=Mozilla Build System Mozilla Build System Build failed
Comment 1 Mike Lothian 2018-01-29 12:01:41 UTC
Adding the --disable-elf-hack allowed it to build:


diff --git a/www-client/firefox/firefox-58.0.ebuild b/www-client/firefox/firefox-58.0.ebuild
index 8d5843e4e98..92f7e87a64e 100644
--- a/www-client/firefox/firefox-58.0.ebuild
+++ b/www-client/firefox/firefox-58.0.ebuild
@@ -208,6 +208,8 @@ src_configure() {

        mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"

+    mozconfig_annotate '' --disable-elf-hack
+
        echo "mk_add_options MOZ_OBJDIR=${BUILD_OBJ_DIR}" >> "${S}"/.mozconfig
        echo "mk_add_options XARGS=/usr/bin/xargs" >> "${S}"/.mozconfig
Comment 2 Ian Stakenvicius (RETIRED) gentoo-dev 2018-01-29 14:09:59 UTC
What's your emerge --info look like?
Comment 3 Mike Lothian 2018-01-29 14:48:21 UTC
The key bits will be the Spectre work around flags:

CFLAGS="-O2 -march=native -pipe -mindirect-branch=thunk -mfunction-return=thunk -mindirect-branch-register"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed"

Can't ssh into my machine at the mo
Comment 4 Jana Saout 2018-04-15 10:55:34 UTC
build/unix/elfhack/test-ctors.c needs to be fixed

The line:

__attribute__((section(".init")))

should be changed into:

__attribute__((section(".init"), used))

This works for me (the issue was that the compiler optimized the init section awax).

elfhack itself is fine, just the selftest was broken with newer glibc's or compilers.
Comment 5 Jory A. Pratt gentoo-dev 2019-03-31 20:06:33 UTC
Please feel free to reopen and update any bug report that can be duplicated with current esr builds, 60.x. If you feel your feature needs to be re looked at in any of these bugs reopen and update, please attach patches when appropriate. Thank you Mozilla Team