Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 497514 - www-client/firefox-{24.2|26|29|31} - ld: libxul.so: short data segment overflowed
Summary: www-client/firefox-{24.2|26|29|31} - ld: libxul.so: short data segment overfl...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: IA64 Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-08 11:13 UTC by Émeric Maschino
Modified: 2017-08-19 15:31 UTC (History)
3 users (show)

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


Attachments
build.log.tgz (build.log.tgz,414.60 KB, application/x-gzip-compressed-tar)
2014-01-08 11:14 UTC, Émeric Maschino
Details
Build environment (environment,201.62 KB, text/plain)
2014-01-08 11:14 UTC, Émeric Maschino
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Émeric Maschino 2014-01-08 11:13:38 UTC
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"
Comment 1 Émeric Maschino 2014-01-08 11:14:21 UTC
Created attachment 367376 [details]
build.log.tgz
Comment 2 Émeric Maschino 2014-01-08 11:14:44 UTC
Created attachment 367378 [details]
Build environment
Comment 3 Émeric Maschino 2014-01-08 11:35:31 UTC
(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
Comment 4 Émeric Maschino 2014-01-08 11:36:49 UTC
Exact same issue with firefox-24.2.0 and gcc-4.6.3.
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2014-01-08 14:38:50 UTC
Comment on attachment 367376 [details]
build.log.tgz

Why do you keep putting singular files in tar archives?
Comment 6 Émeric Maschino 2014-01-08 15:23:25 UTC
(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
Comment 7 Émeric Maschino 2014-01-08 23:54:31 UTC
(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)
Comment 8 Émeric Maschino 2014-05-12 08:27:26 UTC
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
Comment 9 Jory A. Pratt gentoo-dev 2014-05-12 16:42:57 UTC
(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.
Comment 10 Jory A. Pratt gentoo-dev 2014-05-12 16:53:06 UTC
-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.
Comment 11 Émeric Maschino 2014-05-12 19:49:00 UTC
(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
Comment 12 Émeric Maschino 2014-05-13 21:34:26 UTC
(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
Comment 13 Émeric Maschino 2014-06-18 05:48:20 UTC
FYI, Firefox 30 built successfully. Go figure...
Comment 14 Émeric Maschino 2014-08-13 21:33:13 UTC
(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
Comment 15 Ian Stakenvicius (RETIRED) gentoo-dev 2014-08-13 22:15:03 UTC
(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.
Comment 16 Émeric Maschino 2014-08-17 00:01:05 UTC
(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
Comment 17 Émeric Maschino 2014-09-26 05:28:51 UTC
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
Comment 18 Émeric Maschino 2014-10-21 20:01:01 UTC
(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
Comment 19 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-21 20:29:56 UTC
(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.
Comment 20 Émeric Maschino 2014-10-21 20:39:05 UTC
(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
Comment 21 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-22 19:40:33 UTC
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"
Comment 22 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-22 19:41:52 UTC
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)"
Comment 23 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-24 17:32:55 UTC
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.....
Comment 24 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-24 19:30:00 UTC
(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.
Comment 25 Ian Stakenvicius (RETIRED) gentoo-dev 2014-10-24 21:34:58 UTC
(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.
Comment 26 Ian Stakenvicius (RETIRED) gentoo-dev 2014-11-05 23:30:18 UTC
(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?
Comment 27 Émeric Maschino 2014-11-15 18:16:58 UTC
(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
Comment 28 Sergei Trofimovich (RETIRED) gentoo-dev 2017-06-12 21:23:05 UTC
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.
Comment 29 Émeric Maschino 2017-06-13 21:30:30 UTC
(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
Comment 30 Sergei Trofimovich (RETIRED) gentoo-dev 2017-08-19 15:31:54 UTC
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.