Hi, Firefox 10 ESR is currently the only version that ever ran on Gentoo ia64. However, a single patch recently landed in Mozilla repo that fixes the issue in mozjs that was preventing Firefox 17 ESR (bug #487248) and 24 ESR (bug #487250) from running on ia64. Firefox 17 ESR won't be fixed on Gentoo (bug #487248, comment #1) so I tried to emerge latest Firefox ebuild, i.e. 26.0. I'm not aware of restriction on GCC version, so tried to emerge Firefox with current stable GCC on ia64, i.e. GCC 4.6.3. Link fails with ld: libxul.so: short data segment overflowed. I found very little information about this error. I've noticed that link also fails on ARM (bug #495298) but the cause seems to be different. It's noteworthy that GCC 4.7 can successfully emerges Firefox 26.0, though produces an unworking binary (pending bug report). Does it mean that the problem discussed in http://gcc.gnu.org/ml/gcc/2011-01/msg00079.html has nevertheless been adressed in GCC 4.7? Please let me know if I can help further. Thanks, Émeric Here's the output of emerge --info: Portage 2.2.7 (default/linux/ia64/13.0/desktop/gnome/systemd, gcc-4.6.3, glibc-2.16.0, 3.10.7-gentoo-r1 ia64) ================================================================= System Settings ================================================================= System uname: Linux-3.10.7-gentoo-r1-ia64-Madison-with-gentoo-2.2 KiB Mem: 24985776 total, 16252800 free KiB Swap: 524272 total, 524272 free Timestamp of tree: Tue, 07 Jan 2014 21:30:01 +0000 ld GNU ld (GNU Binutils) 2.23.2 app-shells/bash: 4.2_p45 dev-java/java-config: 2.1.12-r1 dev-lang/python: 2.7.5-r3, 3.2.5-r3, 3.3.3 dev-util/cmake: 2.8.10.2-r2 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.13.4 sys-devel/binutils: 2.23.2 sys-devel/gcc: 4.6.3, 4.7.3-r1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.9 (virtual/os-headers) sys-libs/glibc: 2.16.0 Repositories: gentoo my_ebuilds ACCEPT_KEYWORDS="ia64" ACCEPT_LICENSE="* -@EULA" CBUILD="ia64-unknown-linux-gnu" CFLAGS="-mtune=itanium2 -O2 -pipe" CHOST="ia64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-mtune=itanium2 -O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="ftp://mirrors.linuxant.fr/distfiles.gentoo.org/" LANG="fr_FR.UTF-8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/my_ebuilds" USE="X a52 aac acl acpi alsa berkdb branding bzip2 cairo cdda cdr cli colord cracklib crypt cups cxx dbus dri dts dvdr eds encode evo exif fam firefox flac fortran gdbm gif gnome gnome-keyring gnome-online-accounts gpm gstreamer gtk ia64 iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mng modules mp3 mp4 mpeg mudflap nautilus ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt3support qt4 readline sdl session socialweb spell ssl startup-notification svg systemd tcpd tiff truetype udev udisks unicode upower usb vorbis wxwidgets xcb xml xv xvid zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="fr" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="radeon" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SYNC, USE_PYTHON ================================================================= Package Settings ================================================================= www-client/firefox-26.0 was built with the following: USE="alsa dbus gstreamer jit libnotify minimal pulseaudio startup-notification -bindist -custom-cflags (-custom-optimization) -debug (-pgo) (-selinux) -system-cairo -system-icu -system-jpeg -system-sqlite (-wifi)" LINGUAS="fr -af -ak -ar -as -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -csb -cy -da -de -el -en_GB -en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fy_NL -ga_IE -gd -gl -gu_IN -he -hi_IN -hr -hu -hy_AM -id -is -it -ja -kk -km -kn -ko -ku -lg -lt -lv -mai -mk -ml -mr -nb_NO -nl -nn_NO -nso -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv_SE -ta -ta_LK -te -th -tr -uk -vi -zh_CN -zh_TW -zu" CFLAGS="-mtune=itanium2 -pipe -fPIC" CXXFLAGS="-mtune=itanium2 -pipe -fPIC" Here's the output of emerge --pqv www-client/firefox-26.0: [ebuild R ] www-client/firefox-26.0 USE="alsa dbus gstreamer jit libnotify minimal pulseaudio startup-notification -bindist -custom-cflags (-custom-optimization) -debug (-pgo) (-selinux) -system-cairo -system-icu -system-jpeg -system-sqlite (-wifi)" LINGUAS="fr -af -ak -ar -as -ast -be -bg -bn_BD -bn_IN -br -bs -ca -cs -csb -cy -da -de -el -en_GB -en_ZA -eo -es_AR -es_CL -es_ES -es_MX -et -eu -fa -fi -fy_NL -ga_IE -gd -gl -gu_IN -he -hi_IN -hr -hu -hy_AM -id -is -it -ja -kk -km -kn -ko -ku -lg -lt -lv -mai -mk -ml -mr -nb_NO -nl -nn_NO -nso -or -pa_IN -pl -pt_BR -pt_PT -rm -ro -ru -si -sk -sl -son -sq -sr -sv_SE -ta -ta_LK -te -th -tr -uk -vi -zh_CN -zh_TW -zu"
Created attachment 367376 [details] build.log.tgz
Created attachment 367378 [details] Build environment
(In reply to Émeric Maschino from comment #0) > It's noteworthy that GCC 4.7 can > successfully emerges Firefox 26.0, though produces an unworking binary > (pending bug report) Done. See bug #497516. Thanks, Émeric
Exact same issue with firefox-24.2.0 and gcc-4.6.3.
Comment on attachment 367376 [details] build.log.tgz Why do you keep putting singular files in tar archives?
(In reply to Jeroen Roovers from comment #5) > Comment on attachment 367376 [details] > build.log.tgz > Why do you keep > putting singular files in tar archives? Well, because this is how the wiki asks to do for big logfiles: http://wiki.gentoo.org/wiki/Beautiful_bug_reports ("Problems at build time" section). Émeric
(In reply to Émeric Maschino from comment #4) > Exact same issue with firefox-24.2.0 and gcc-4.6.3. Aha, that's "interesting": gcc version doesn't matter as firefox-24.2.0 also fails to emerge with the same error (but different segment overflow) using gcc-4.7. So, to summarize: - firefox-24.2.0 w/ gcc-4.6.3: short data segment overflowed (0x423808 >= 0x400000) - firefox-24.2.0 w/ gcc-4.7.3: short data segment overflowed (0x4207c8 >= 0x400000) - firefox-26.0 w/ gcc-4.6.3: short data segment overflowed (0x41f388 >= 0x400000) - firefox-26.0 w/ gcc-4.7.3: broken binary (bug #497516)
Firefox 29.0 fails the same way during final link: /usr/lib/gcc/ia64-unknown-linux-gnu/4.7.3/../../../../ia64-unknown-linux-gnu/bin/ld: libxul.so: short data segment overflowed (0x40f708 >= 0x400000) collect2: error: ld returned 1 exit status So, to summarize: - Firefox 24.2.0 never built successfully - Firefox 26.0/28.0 built successfully with gcc 4.7 (probably irrelevant) but required patch to correctly detect libc.so (see bug #497516) - Firefox 29.0 has been fixed upstream to correctly detect libc.so but cannot be built. We're thus left with no Firefox on ia64 as Firefox 28.0 ebuild was removed from portage tree. Thus increasing bug priority/severity. Émeric
(In reply to Émeric Maschino from comment #8) > Firefox 29.0 fails the same way during final link: > > /usr/lib/gcc/ia64-unknown-linux-gnu/4.7.3/../../../../ia64-unknown-linux-gnu/ > bin/ld: libxul.so: short data segment overflowed (0x40f708 >= 0x400000) > collect2: error: ld returned 1 exit status > > So, to summarize: > - Firefox 24.2.0 never built successfully > - Firefox 26.0/28.0 built successfully with gcc 4.7 (probably irrelevant) > but required patch to correctly detect libc.so (see bug #497516) > - Firefox 29.0 has been fixed upstream to correctly detect libc.so but > cannot be built. > > We're thus left with no Firefox on ia64 as Firefox 28.0 ebuild was removed > from portage tree. Thus increasing bug priority/severity. > > Émeric IA64 is a rare arch, there wont be much time from the mozilla team spent on this bug. If you find a solution we will be happy to include it.
-mauto-pic Generate code that is self-relocatable. This implies -mconstant-gp. Could you add -mauto-pic to your CFLAGS and test, make sure you do not enable it globally.
(In reply to Jory A. Pratt from comment #10) > > Could you add -mauto-pic to your CFLAGS and test, make sure you do not > enable it globally. I wish I could, but something is removing user flags. From build.log: * strip-flags: CFLAGS: changed '-mtune=itanium2 -pipe -mauto-pic' to '-mtune=itanium2 -pipe' Looking at Firefox use flags documentation, I've also tried adding custom-cflags to prevent from stripping auto-pic, which ended with: checking whether the C compiler (ia64-unknown-linux-gnu-gcc -mtune=itanium2 -pipe -mauto-pic -fPIC -Wl,-O1 -Wl,--as-needed) works... no configure: error: installation or configuration problem: C compiler cannot create executables. BTW, I'm noticing that optimization is downgraded from O2 to O1... Émeric
(In reply to Jory A. Pratt from comment #10) > > Could you add -mauto-pic to your CFLAGS and test, make sure you do not > enable it globally. From what I understand [1], -mauto-pic will surely solve the overflow, but since it also changes the function calling convention, I might not be able to link with libc. BTW, isn't his a problem with gcc rather than Firefox? Émeric [1] https://gcc.gnu.org/ml/gcc/2011-01/msg00091.html
FYI, Firefox 30 built successfully. Go figure...
(In reply to Émeric Maschino from comment #13) > FYI, Firefox 30 built successfully. Go figure... And Firefox 31 is broken again. Rebuilding with gcc-4.8.3 that's now ia64 stable doesn't help. Émeric
(In reply to Émeric Maschino from comment #14) > (In reply to Émeric Maschino from comment #13) > > FYI, Firefox 30 built successfully. Go figure... > > And Firefox 31 is broken again. Rebuilding with gcc-4.8.3 that's now ia64 > stable doesn't help. > > Émeric Can you try the spidermonkey-31 beta on the mozilla overlay? If the short segment overflow happens there too, then the issue is lost likely within the JS code rather than within other parts of libxul. It should help to narrow down the issue.
(In reply to Ian Stakenvicius from comment #15) > > Can you try the spidermonkey-31 beta on the mozilla overlay? If the short > segment overflow happens there too, then the issue is lost likely within the > JS code rather than within other parts of libxul. It should help to narrow > down the issue. I wish I could, but I'm getting error 404 when trying to get mozjs-31.0b1.tar.bz2: >>> Downloading 'http://dev.gentoo.org/~axs/distfiles/mozjs-31.0b1.tar.bz2' --2014-08-17 01:51:40-- http://dev.gentoo.org/~axs/distfiles/mozjs-31.0b1.tar.bz2 Resolving dev.gentoo.org... 140.211.166.183, 2001:470:ea4a:1:214:c2ff:fe64:b2d3 Connecting to dev.gentoo.org|140.211.166.183|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2014-08-17 01:51:41 ERROR 404: Not Found. !!! Couldn't download 'mozjs-31.0b1.tar.bz2'. Aborting. Émeric
While Firefox 31 can't be built, there's no problem with 31.1.0-r1... And I've the strong impression that 31.x will be the last available for ia64 for a long time, as 32.0 is badly broken [1]. Émeric [1] https://bugzilla.mozilla.org/show_bug.cgi?id=1063204
(In reply to Émeric Maschino from comment #17) > While Firefox 31 can't be built, there's no problem with 31.1.0-r1... But Firefox 31.2.0 is broken again... So there's definitely some bad randomness somewhere. Émeric
(In reply to Émeric Maschino from comment #18) > (In reply to Émeric Maschino from comment #17) > > While Firefox 31 can't be built, there's no problem with 31.1.0-r1... > > But Firefox 31.2.0 is broken again... So there's definitely some bad > randomness somewhere. > > Émeric ...but I built firefox-31.2.0 myself on guppy with no issues...?? I think that the version i built on guppy was done before rej landed the patch he needed for hppa , i wonder if that makes any difference.
(In reply to Ian Stakenvicius from comment #19) > ...but I built firefox-31.2.0 myself on guppy with no issues...?? > > I think that the version i built on guppy was done before rej landed the > patch he needed for hppa , i wonder if that makes any difference. Well, I fear that transient conditions make this bug appears or not. Did you also notice random failure with previous versions? What gcc version did you use? Émeric
Here's the relevant emerge --info from my chroot on guppy: Portage 2.2.7 (default/linux/ia64/13.0, gcc-4.7.3, glibc-2.16.0, 3.14.14-gentoo ia64) ================================================================= System uname: Linux-3.14.14-gentoo-ia64-Dual-Core_Intel-R-_Itanium-R-_Processor_9040-with-gentoo-2.2 KiB Mem: 16660784 total, 7130528 free KiB Swap: 1999184 total, 1986416 free Timestamp of tree: Sun, 19 Oct 2014 03:00:01 +0000 ld GNU ld (GNU Binutils) 2.23.2 app-shells/bash: 4.2_p45 dev-lang/perl: 5.18.2-r1 dev-lang/python: 2.7.5-r3, 3.2.5-r3, 3.3.2-r2 dev-util/cmake: 2.8.12.2-r1 dev-util/pkgconfig: 0.28-r1 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12.4 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.13.4 sys-devel/binutils: 2.23.2 sys-devel/gcc: 4.7.3-r1 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4.2 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.9 (virtual/os-headers) sys-libs/glibc: 2.16.0 Repositories: gentoo local ACCEPT_KEYWORDS="ia64" ACCEPT_LICENSE="* -@EULA" CBUILD="ia64-unknown-linux-gnu" CFLAGS="-O2 -pipe" CHOST="ia64-unknown-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe" DISTDIR="/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://gentoo.osuosl.org" LANG="en_US.UTF8" LDFLAGS="-Wl,-O1 -Wl,--as-needed"
Also: guppy ~ # emerge -O1pv firefox These are the packages that would be merged, in order: [ebuild R ~] www-client/firefox-31.2.0 USE="bindist jit minimal system-libvpx -custom-cflags (-custom-optimization) -dbus -debug -gstreamer -hardened (-pgo) -pulseaudio (-selinux) -startup-notification -system-cairo -system-icu -system-jpeg -system-sqlite {-test} (-wifi)"
RIGHT. so, with gcc-4.8.3 it fails, same as you. 4.7.3 seems to succeed fine though. Based on a hunch from https://software.intel.com/en-us/articles/short-data-segment-overflow-error-on-linux-64-on-itaniumr-architecture , I'm re-running a test with all of the system-* flags enabled. I have the feeling that if the size of libxul is shrunk enough then maybe we won't hit this issue. I'm also going to run a test with -mno-sdata set , just to see if disabling "small data section" optimizations might help avoid "short data segment" overflows. Both of these are stabs in the dark but if they work.....
(In reply to Ian Stakenvicius from comment #23) > RIGHT. so, with gcc-4.8.3 it fails, same as you. 4.7.3 seems to succeed > fine though. > > Based on a hunch from > https://software.intel.com/en-us/articles/short-data-segment-overflow-error- > on-linux-64-on-itaniumr-architecture , I'm re-running a test with all of the > system-* flags enabled. I have the feeling that if the size of libxul is > shrunk enough then maybe we won't hit this issue. > Success -- enabling the system-* flags makes libxul small enough to not triger this linker issue. I'll try the -mno-sdata hack next to see if it helps.
(In reply to Ian Stakenvicius from comment #23) > I'm also going to run a test with -mno-sdata set , just to see if disabling > "small data section" optimizations might help avoid "short data segment" > overflows. This didn't work. Please give enabling all the system-* flags a shot; we can always package.use.force them on for ia64 if we need to.
(In reply to Ian Stakenvicius from comment #24) > (In reply to Ian Stakenvicius from comment #23) > > RIGHT. so, with gcc-4.8.3 it fails, same as you. 4.7.3 seems to succeed > > fine though. > > > > Based on a hunch from > > https://software.intel.com/en-us/articles/short-data-segment-overflow-error- > > on-linux-64-on-itaniumr-architecture , I'm re-running a test with all of the > > system-* flags enabled. I have the feeling that if the size of libxul is > > shrunk enough then maybe we won't hit this issue. > > > > Success -- enabling the system-* flags makes libxul small enough to not > triger this linker issue. ping; have you had a chance to test this?
(In reply to Ian Stakenvicius from comment #26) > (In reply to Ian Stakenvicius from comment #24) > > (In reply to Ian Stakenvicius from comment #23) > > > RIGHT. so, with gcc-4.8.3 it fails, same as you. 4.7.3 seems to succeed > > > fine though. > > > > > > Based on a hunch from > > > https://software.intel.com/en-us/articles/short-data-segment-overflow-error- > > > on-linux-64-on-itaniumr-architecture , I'm re-running a test with all of the > > > system-* flags enabled. I have the feeling that if the size of libxul is > > > shrunk enough then maybe we won't hit this issue. > > > > > > > Success -- enabling the system-* flags makes libxul small enough to not > > triger this linker issue. > > > ping; have you had a chance to test this? Pong, sorry for the delay. Firefox 31.2.0-r1 just emerged successfully with all the system-* flags enabled, as you proposed. Nice catch and thanks for the trick. Émeric
I wonder if on gcc-5.4.0-r3 firefox would build without any special changes nowadays. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465 avoids generating sdata for: - 'static' symbols - __attribute__((visibility("hidden"))) symbols I vaguely recall firefox marks most internals as hidden.
(In reply to Sergei Trofimovich from comment #28) > I wonder if on gcc-5.4.0-r3 firefox would build without any special changes > nowadays. > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60465 avoids generating sdata > for: > - 'static' symbols > - __attribute__((visibility("hidden"))) symbols > > I vaguely recall firefox marks most internals as hidden. WIP. With the stabilization of GCC 5.x on Gentoo ia64, I'm rebuilding my whole system, including Firefox. Please allow a couple days... Émeric
None of available firefox version are buildable on ia64. Seem to need some tweaking around sandbox (seccomp) availability: /var/tmp/portage/www-client/firefox-52.2.0/work/firefox-52.2.0esr/ipc/contentproc/plugin-container.cpp: In function 'int content_process_main(int, char**)': /var/tmp/portage/www-client/firefox-52.2.0/work/firefox-52.2.0esr/ipc/contentproc/plugin-container.cpp:168:5: error: 'SandboxEarlyInit' is not a member of 'mozilla' mozilla::SandboxEarlyInit(XRE_GetProcessType()); ^~~~~~~ I suggest closing this bug as obsolete and deal with modern firefox busg in fresh bugs.