Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 502492 - <=sys-devel/binutils-2.30-r1 : ia64, ELF, 'Can't relax br (PCREL21B)' error message on --no-keep-memory
Summary: <=sys-devel/binutils-2.30-r1 : ia64, ELF, 'Can't relax br (PCREL21B)' error m...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: IA64 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://sourceware.org/bugzilla/show_b...
Whiteboard:
Keywords:
Depends on: binutils-2.30-stable
Blocks:
  Show dependency tree
 
Reported: 2014-02-26 07:15 UTC by Émeric Maschino
Modified: 2018-11-30 23:11 UTC (History)
3 users (show)

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


Attachments
environment (environment,166.17 KB, text/plain)
2014-02-26 07:22 UTC, Émeric Maschino
Details
webkit-gtk-2.2.5-ia64-platform_h.patch (webkit-gtk-2.2.5-ia64-platform_h.patch,331 bytes, patch)
2014-02-26 07:27 UTC, Émeric Maschino
Details | Diff
webkit-gtk-2.2.5-ia64-use-system-malloc.patch (webkit-gtk-2.2.5-ia64-use-system-malloc.patch,800 bytes, patch)
2014-02-26 07:28 UTC, Émeric Maschino
Details | Diff
Patched webkit-gtk-2.2.5.ebuild (webkit-gtk-2.2.5.ebuild,9.17 KB, text/plain)
2014-02-26 07:51 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-02-26 07:15:10 UTC
Emerging webkit-gtk fails during compile phase with the following error:

/usr/lib/gcc/ia64-unknown-linux-gnu/4.7.3/../../../../ia64-unknown-linux-gnu/bin/ld: ./.libs/../Source/WebCore/css/.libs/libWebCore_la-ElementRuleCollector.o: Can't relax br (PCREL21B) to `_ZNK7WebCore10SVGElement27animatedSMILStylePropertiesEv' at 0x2522 in section `.text' with size 0x2dd0 (> 0x1000000).
/usr/lib/gcc/ia64-unknown-linux-gnu/4.7.3/../../../../ia64-unknown-linux-gnu/bin/ld: final link failed: Nonrepresentable section on output
collect2: error: ld returned 1 exit status

Tried twice, got the same error twice.

It's noteworthy that I had to apply the two attached patches on ia64:
- webkit-gtk-2.2.5-ia64-platform_h.patch: disable JIT and MacroAssembler as they're not supported on ia64 and build process seems not to honor -DENABLE_JIT=0 -DENABLE_YARR_JIT 0 and -DENABLE_ASSEMBLER 0 when passed at the command-line
- webkit-gtk-2.2.5-ia64-use-system-malloc.patch: to supposedly fix crash on ia64. Since I cannot successfully emerge webkit-gtk, I can't confirm at the moment.

Both the patches are based on Debian's ones, with the exception that webkit-gtk-2.2.5-ia64-platform_h.patch is targeted for ia64 whereas Debian's one was made for hppa.

     Émeric


PS: build.log is _huge_ (>100MB). Even compressed with bzip2, it's still 1.2MB so won't meet Gentoo's Bugzilla file limitations. So, available upon request.
Comment 1 Émeric Maschino 2014-02-26 07:20:08 UTC
emerge --info

Portage 2.2.7 (default/linux/ia64/13.0/desktop/gnome/systemd, gcc-4.6.3, glibc-2.17, 3.10.25-gentoo ia64)
=================================================================
System uname: Linux-3.10.25-gentoo-ia64-Madison-with-gentoo-2.2
KiB Mem:    24987056 total,  21328864 free
KiB Swap:     524272 total,    524272 free
Timestamp of tree: Sun, 23 Feb 2014 14:00: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.3.2-r2
dev-util/cmake:           2.8.11.2
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.17
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 gpm gstreamer gtk ia64 iconv introspection ipv6 jpeg lcms ldap libnotify libsecret mad mng modules mp3 mp4 mpeg 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="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_3" 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
Comment 2 Émeric Maschino 2014-02-26 07:21:26 UTC
emerge -pqv

[ebuild     U ] net-libs/webkit-gtk-2.2.5 [1.10.2-r300] USE="egl%* geoloc gstreamer introspection libsecret%* opengl%* spell webgl (-aqua) -coverage -debug -gles2% (-jit) {-test}"
Comment 3 Émeric Maschino 2014-02-26 07:22:05 UTC
Created attachment 371306 [details]
environment
Comment 4 Émeric Maschino 2014-02-26 07:27:26 UTC
Created attachment 371308 [details, diff]
webkit-gtk-2.2.5-ia64-platform_h.patch
Comment 5 Émeric Maschino 2014-02-26 07:28:23 UTC
Created attachment 371310 [details, diff]
webkit-gtk-2.2.5-ia64-use-system-malloc.patch
Comment 6 Pacho Ramos gentoo-dev 2014-02-26 07:46:34 UTC
What about running:
append-ldflags "-Wl,--no-relax"

on ia64 as we already do for alpha in src_configure?
Comment 7 Pacho Ramos gentoo-dev 2014-02-26 07:49:19 UTC
(Also CCing ia64 people as maybe this kind of "can't relax" error is "familiar" there :/)
Comment 8 Émeric Maschino 2014-02-26 07:51:56 UTC
Created attachment 371314 [details]
Patched webkit-gtk-2.2.5.ebuild
Comment 9 Émeric Maschino 2014-02-26 10:14:58 UTC
(In reply to Pacho Ramos from comment #6)
> What about running:
> append-ldflags "-Wl,--no-relax"
> 
> on ia64 as we already do for alpha in src_configure?

Will try.

As a side note, it seems that this problem is more related to ld [1] rather than webkit-gtk. I thus imagine that this bugreport should advantageously be reassigned to Gentoo's toolchain maintainers.

    Émeric


[1] http://sourceware.org/bugzilla/show_bug.cgi?id=15904
Comment 10 Pacho Ramos gentoo-dev 2014-02-26 21:24:29 UTC
Uh, good catch! Then, maybe dropping the --no-keep-memory we have in ebuild for ia64 will work (even if it will eat lots of memory again :S)
Comment 11 Pacho Ramos gentoo-dev 2014-02-27 21:24:58 UTC
(In reply to Pacho Ramos from comment #10)
> Uh, good catch! Then, maybe dropping the --no-keep-memory we have in ebuild
> for ia64 will work (even if it will eat lots of memory again :S)

       --relax
       --no-relax
           An option with machine dependent effects.  This option is only supported on a few targets.

           On some platforms the --relax option performs target specific, global optimizations that become possible when the linker resolves
           addressing in the program, such as relaxing address modes, synthesizing new instructions, selecting shorter version of current
           instructions, and combinig constant values.

           On some platforms these link time global optimizations may make symbolic debugging of the resulting executable impossible.  This is
           known to be the case for the Matsushita MN10200 and MN10300 family of processors.

           On platforms where this is not supported, --relax is accepted, but ignored.

           On platforms where --relax is accepted the option --no-relax can be used to disable the feature.

Per "man ld" maybe would be better to drop --no-keep-memory for ia64 as it would be worse at build time but better at runtime :/

What option does it work for you? (if any)
Comment 12 Pacho Ramos gentoo-dev 2014-03-01 18:50:25 UTC
+  01 Mar 2014; Pacho Ramos <pacho@gentoo.org>
+  +files/webkit-gtk-2.2.5-hppa-platform.patch,
+  +files/webkit-gtk-2.2.5-ia64-malloc.patch,
+  +files/webkit-gtk-2.2.5-ia64-platform.patch, webkit-gtk-2.2.5-r200.ebuild,
+  webkit-gtk-2.2.5.ebuild:
+  Apply various fixes to improve support on some arches (#502492 by Emeric
+  Maschino)
+

Will reassign as maybe toolchain maintainers want to take a look to that binutils problem :/
Comment 13 Émeric Maschino 2014-03-01 22:05:18 UTC
> (In reply to Pacho Ramos from comment #10)
> > Uh, good catch! Then, maybe dropping the --no-keep-memory we have in ebuild
> > for ia64 will work (even if it will eat lots of memory again :S)

<snip>

Indeed, removing --keep-no-memory from ebuild allowed me to complete emerge of webkit-gtk. And it even passed tests successfully, with a lot of warnings nevertheless.

Now, the bad news. As a double-check, I've patched sys-devel/binutils-2.23.2 with the patch proposed by Stephan in upstream bug #15904 [1] and enabled --keep-no-memory in ebuild again. Emerge no more fails during final link but during compile phase with:

/usr/include/sys/ucontext.h:51: syntax error, unexpected STRUCT in '     unsigned long _pad[__builtin_offsetof (struct sigcontext, sc_gr[0])/8];' at 'struct'
/usr/include/sys/ucontext.h:53: syntax error, unexpected '}' in '   }' at '}'
Source/WebKit/gtk/webkit/webkitversion.h:37: Warning: WebKit: symbol='WEBKITGTK_API_VERSION': Unknown namespace for symbol 'WEBKITGTK_API_VERSION'
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
/var/tmp/portage/net-libs/webkit-gtk-2.2.5/work/webkitgtk-2.2.5/tmp-introspectvFf5lg/WebKit-3.0.c:1:0: note: this is the location of the previous definition
Command '['/var/tmp/portage/net-libs/webkit-gtk-2.2.5/work/webkitgtk-2.2.5/tmp-introspectvFf5lg/WebKit-3.0', '--introspect-dump=/var/tmp/portage/net-libs/webkit-gtk-2.2.5/work/webkitgtk-2.2.5/tmp-introspectvFf5lg/functions.txt,/var/tmp/portage/net-libs/webkit-gtk-2.2.5/work/webkitgtk-2.2.5/tmp-introspectvFf5lg/dump.xml']' returned non-zero exit status -11

As a comparison, without --no-keep-memory in ebuild, the above log snippet looks:

/usr/include/sys/ucontext.h:51: syntax error, unexpected STRUCT in '     unsigne
d long _pad[__builtin_offsetof (struct sigcontext, sc_gr[0])/8];' at 'struct'
/usr/include/sys/ucontext.h:53: syntax error, unexpected '}' in '   }' at '}'
Source/WebKit/gtk/webkit/webkitversion.h:37: Warning: WebKit: symbol='WEBKITGTK_
API_VERSION': Unknown namespace for symbol 'WEBKITGTK_API_VERSION'
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default]
/var/tmp/portage/net-libs/webkit-gtk-2.2.5/work/webkitgtk-2.2.5/tmp-introspectdd
F0WA/WebKit-3.0.c:1:0: note: this is the location of the previous definition

(process:16451): GLib-GObject-CRITICAL **: g_object_class_install_property: asse
rtion 'class->set_property != NULL' failed
/usr/bin/g-ir-compiler --includedir ./Source/WebKit/gtk --includedir . WebKit-3.
0.gir -o WebKit-3.0.typelib
libtool: link: (cd ".libs" && rm -f "libwebkit2gtk-3.0.so.25" && ln -s "libwebki
t2gtk-3.0.so.25.4.7" "libwebkit2gtk-3.0.so.25")
libtool: link: (cd ".libs" && rm -f "libwebkit2gtk-3.0.so" && ln -s "libwebkit2g
tk-3.0.so.25.4.7" "libwebkit2gtk-3.0.so")
libtool: link: ( cd ".libs" && rm -f "libwebkit2gtk-3.0.la" && ln -s "../libwebk
it2gtk-3.0.la" "libwebkit2gtk-3.0.la" )

     Émeric


[1] https://sourceware.org/bugzilla/show_bug.cgi?id=15904
Comment 14 Andreas K. Hüttel archtester gentoo-dev 2017-06-24 21:23:42 UTC
Upstream bug still open
Comment 15 Andreas K. Hüttel archtester gentoo-dev 2018-04-29 16:19:16 UTC
Fixed upstream in master and 2.30 branch, will be in Gentoo 2.30 patchlevel 2 and later.
Comment 16 Larry the Git Cow gentoo-dev 2018-04-29 20:08:30 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c7fe7564dc60dd6caa3afd787728acb43fc7abe

commit 8c7fe7564dc60dd6caa3afd787728acb43fc7abe
Author:     Andreas K. Hüttel <dilfridge@gentoo.org>
AuthorDate: 2018-04-29 20:07:56 +0000
Commit:     Andreas K. Hüttel <dilfridge@gentoo.org>
CommitDate: 2018-04-29 20:08:06 +0000

    sys-devel/binutils: Revision bump (no keywords), 2.30 patchset 2
    
    Bug: https://bugs.gentoo.org/502492
    Bug: https://bugs.gentoo.org/647798
    Bug: https://bugs.gentoo.org/647296
    Bug: https://bugs.gentoo.org/649690
    Bug: https://bugs.gentoo.org/651576
    Package-Manager: Portage-2.3.31, Repoman-2.3.9

 sys-devel/binutils/Manifest                |   1 +
 sys-devel/binutils/binutils-2.30-r2.ebuild | 417 +++++++++++++++++++++++++++++
 2 files changed, 418 insertions(+)}