Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 583842 - x11-libs/motif-2.3.5 : /.../ld: /.../libfl.a(libmain.o): relocation R_X86_64_PC32 against undefined symbol `exit@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
Summary: x11-libs/motif-2.3.5 : /.../ld: /.../libfl.a(libmain.o): relocation R_X86_64_...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Ulrich Müller
URL:
Whiteboard:
Keywords:
: 639006 642754 642798 643226 643370 646854 650680 656228 658464 798834 (view as bug list)
Depends on:
Blocks:
 
Reported: 2016-05-23 07:48 UTC by Toralf Förster
Modified: 2024-03-11 22:47 UTC (History)
11 users (show)

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


Attachments
emerge-history.txt (emerge-history.txt,32.52 KB, text/plain)
2016-05-23 07:48 UTC, Toralf Förster
Details
environment (environment,132.73 KB, text/plain)
2016-05-23 07:48 UTC, Toralf Förster
Details
x11-libs:motif-2.3.5:20160522-233101.log (x11-libs:motif-2.3.5:20160522-233101.log,19.63 KB, text/plain)
2016-05-23 07:48 UTC, Toralf Förster
Details
emerge-info.txt (emerge-info.txt,5.41 KB, text/plain)
2016-12-29 09:21 UTC, Toralf Förster
Details
config.log (config.log,136.51 KB, text/plain)
2016-12-29 09:21 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,79.01 KB, text/plain)
2016-12-29 09:21 UTC, Toralf Förster
Details
environment (environment,134.48 KB, text/plain)
2016-12-29 09:21 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,15.13 KB, application/x-bzip)
2016-12-29 09:21 UTC, Toralf Förster
Details
x11-libs:motif-2.3.6:20161229-091140.log (x11-libs:motif-2.3.6:20161229-091140.log,19.51 KB, text/plain)
2016-12-29 09:21 UTC, Toralf Förster
Details
emerge-info.txt (emerge-info.txt,14.59 KB, text/plain)
2017-07-07 15:21 UTC, Toralf Förster
Details
emerge-history.txt (emerge-history.txt,34.85 KB, text/plain)
2017-07-07 15:21 UTC, Toralf Förster
Details
environment (environment,133.94 KB, text/plain)
2017-07-07 15:21 UTC, Toralf Förster
Details
etc.portage.tbz2 (etc.portage.tbz2,21.77 KB, application/x-bzip)
2017-07-07 15:21 UTC, Toralf Förster
Details
logs.tbz2 (logs.tbz2,23.35 KB, application/x-bzip)
2017-07-07 15:21 UTC, Toralf Förster
Details
temp.tbz2 (temp.tbz2,36.75 KB, application/x-bzip)
2017-07-07 15:21 UTC, Toralf Förster
Details
x11-libs:motif-2.3.6-r1:20170707-143327.log (x11-libs:motif-2.3.6-r1:20170707-143327.log,19.86 KB, text/plain)
2017-07-07 15:21 UTC, Toralf Förster
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toralf Förster gentoo-dev 2016-05-23 07:48:20 UTC
libtool: link: x86_64-pc-linux-gnu-gcc -march=native -O2 -pipe -fno-strict-aliasing -Wall -g -fno-strict-aliasing -Wno-unused -Wno-comment -Wl,-O1 -o wmluiltok wmluiltok.o  -Wl,--as-needed -lfl
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../lib64/libfl.a(libmain.o): warning: relocation against `exit@@GLIBC_2.2.5' in readonly section `.text.startup'.
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: /usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../lib64/libfl.a(libmain.o): relocation R_X86_64_PC32 against undefined symbol `exit@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/lib/gcc/x86_64-pc-linux-gnu/5.3.0/../../../../x86_64-pc-linux-gnu/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:494: recipe for target 'wmluiltok' failed


$ cat emerge-info.txt
  -----------------------------------------------------------------

  This is an unstable amd64 chroot image (named amd64-hardened-unstable_20160522-095633) at a hardened host acting as a tinderbox.

  -----------------------------------------------------------------

  make.conf: USE="mmx sse sse2 pax_kernel xtpax -cdinstall -oci8 -bindist custom-optimization dvb extraengine fontconfig freetds gcj gpg -gtk3 gudev havege hdf5 ipv6 jadetex kerberos kvm libvirtd mod ois openexr pcre16 -pkcs11 postgres qml qt4 qt5 scripts sdl server sqlite sqlite3 sse4_1 ssl system-cairo theora threads -tools usbredir widgets wma wxwidgets X x265 xa xslt xvfb xvmc xz libressl curl_ssl_libressl -curl_ssl_openssl"

  -----------------------------------------------------------------

Portage 2.3.0_rc1 (python 2.7.11-final-0, hardened/linux/amd64, gcc-5.3.0, glibc-2.23-r2, 4.5.5-hardened x86_64)
=================================================================
System uname: Linux-4.5.5-hardened-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16157888 total,    558020 free
KiB Swap:   16777212 total,  16553204 free
Timestamp of repository gentoo: Sun, 22 May 2016 21:33:30 +0000
sh bash 4.3_p42-r2
ld GNU ld (Gentoo 2.25.1 p1.1) 2.25.1
app-shells/bash:          4.3_p42-r2::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0::gentoo
dev-lang/python:          2.7.11-r2::gentoo, 3.4.3-r7::gentoo
dev-util/cmake:           3.5.2-r1::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          0.20.5::gentoo
sys-apps/sandbox:         2.10-r2::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r2::gentoo
sys-devel/automake:       1.11.6-r2::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.25.1-r1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 5.3.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.6::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: 1

local
    location: /usr/local/portage
    masters: gentoo
    priority: 2

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.0/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/tmp/distfiles"
EMERGE_DEFAULT_OPTS="--verbose-conflicts --color=n --nospinner --tree --quiet-build"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://ftp.uni-erlangen.de/pub/mirrors/gentoo rsync://mirror.netcologne.de/gentoo/ ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gor.bytemark.co.uk/gentoo/ rsync://ftp.snt.utwente.nl/gentoo"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j1"
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 --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="X acl amd64 berkdb bzip2 cli cracklib crypt custom-optimization cxx dri dvb extraengine fontconfig freetds gcj gdbm gpg gudev hardened havege hdf5 iconv ipv6 jadetex justify kerberos kvm libressl libvirtd mmx mmxext mod modules multilib ncurses nls nptl ois openexr openmp pam pax_kernel pcre pcre16 pie postgres qml qt4 qt5 readline scripts sdl seccomp server session sqlite sqlite3 sse sse2 sse4_1 ssl ssp system-cairo tcpd theora threads unicode urandom usbredir widgets wma wxwidgets x265 xa xattr xslt xtpax xvfb xvmc xz zlib" ABI_X86="64" 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" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" CURL_SSL="libressl" 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" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="intel i965" 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:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Toralf Förster gentoo-dev 2016-05-23 07:48:22 UTC
Created attachment 435008 [details]
emerge-history.txt
Comment 2 Toralf Förster gentoo-dev 2016-05-23 07:48:25 UTC
Created attachment 435010 [details]
environment
Comment 3 Toralf Förster gentoo-dev 2016-05-23 07:48:27 UTC
Created attachment 435012 [details]
x11-libs:motif-2.3.5:20160522-233101.log
Comment 4 Ulrich Müller gentoo-dev 2016-05-23 17:01:35 UTC
I cannot reproduce the problem, neither with gcc-4.9.3 nor with gcc-5.3.0.
Comment 5 Toralf Förster gentoo-dev 2016-05-23 19:40:44 UTC
well,it builds fine here at 2 images (and 2.3.4 at a  stable too), 2 others don't fit the prereqs, but it fails at this particular image.
Comment 6 Toralf Förster gentoo-dev 2016-12-29 09:21:41 UTC
Created attachment 457766 [details]
emerge-info.txt

happened now again at a current image
Comment 7 Toralf Förster gentoo-dev 2016-12-29 09:21:47 UTC
Created attachment 457768 [details]
config.log
Comment 8 Toralf Förster gentoo-dev 2016-12-29 09:21:49 UTC
Created attachment 457770 [details]
emerge-history.txt
Comment 9 Toralf Förster gentoo-dev 2016-12-29 09:21:52 UTC
Created attachment 457772 [details]
environment
Comment 10 Toralf Förster gentoo-dev 2016-12-29 09:21:55 UTC
Created attachment 457774 [details]
etc.portage.tbz2
Comment 11 Toralf Förster gentoo-dev 2016-12-29 09:21:58 UTC
Created attachment 457776 [details]
x11-libs:motif-2.3.6:20161229-091140.log
Comment 12 Will 2017-04-24 04:40:06 UTC
I had the same problem and fixed it by rebuilding sys-devel/flex (emerge -1va sys-devel/flex). After that I also needed MAKEOPTS=-j1 for emerge motif.
Comment 13 Ulrich Müller gentoo-dev 2017-05-10 09:02:27 UTC
Is this still an issue?
Comment 14 Toralf Förster gentoo-dev 2017-05-10 16:39:34 UTC
emerges fine here at many images:
x11-libs/motif-2.3.6-r1
Comment 15 Toralf Förster gentoo-dev 2017-07-07 15:21:07 UTC
same issue with x11-libs/motif-2.3.6-r1 at the unstable amd64 chroot image 17.0-desktop-plasma_libressl_20170706-213208 at the tinderbox
Comment 16 Toralf Förster gentoo-dev 2017-07-07 15:21:10 UTC
Created attachment 481550 [details]
emerge-info.txt
Comment 17 Toralf Förster gentoo-dev 2017-07-07 15:21:13 UTC
Created attachment 481552 [details]
emerge-history.txt
Comment 18 Toralf Förster gentoo-dev 2017-07-07 15:21:16 UTC
Created attachment 481554 [details]
environment
Comment 19 Toralf Förster gentoo-dev 2017-07-07 15:21:19 UTC
Created attachment 481556 [details]
etc.portage.tbz2
Comment 20 Toralf Förster gentoo-dev 2017-07-07 15:21:22 UTC
Created attachment 481558 [details]
logs.tbz2
Comment 21 Toralf Förster gentoo-dev 2017-07-07 15:21:25 UTC
Created attachment 481560 [details]
temp.tbz2
Comment 22 Toralf Förster gentoo-dev 2017-07-07 15:21:28 UTC
Created attachment 481562 [details]
x11-libs:motif-2.3.6-r1:20170707-143327.log
Comment 23 Ulrich Müller gentoo-dev 2017-12-30 05:00:05 UTC
*** Bug 639006 has been marked as a duplicate of this bug. ***
Comment 24 Ulrich Müller gentoo-dev 2017-12-30 05:08:07 UTC
Can you reinstall sys-devel/flex and attach its build.log please (and verify if the motif build failure still occurs then)?
Comment 25 Kobboi 2017-12-30 09:54:06 UTC
(In reply to Ulrich Müller from comment #24)
> Can you reinstall sys-devel/flex and attach its build.log please (and verify
> if the motif build failure still occurs then)?

I ran into this this morning, emerge -1 flex motif works for me
Comment 26 Ulrich Müller gentoo-dev 2017-12-30 10:38:19 UTC
As discussed on IRC:

<ulm> toralf: do the emerge-history.txt files attached to your tinderbox bugs   
      contain the complete history since inception of the image?
<toralf> ulm: yes
<toralf> ulm: https://github.com/toralf/tinderbox/blob/master/bin/job.sh#L180
<ulm> toralf: so if I don't see sys-devel/flex in the history attached to bug   
      583842, it means that the flex lib is the one from stage3?
<toralf> ulm: yes
<ulm> is there a way to find out from what stage an image was built?
<toralf> ulm: I do download always the latest stage3 image accordingly to the   
         profile :                                                              
         https://github.com/toralf/tinderbox/blob/master/bin/setup_img.sh#L149

Since there is no trace of sys-devel/flex in attachment 481552 [details], /usr/lib64/libfl.a would be the library originating from the original stage3.

If I copy libfl.a from the latest stage3 (stage3-amd64-20171228T214501Z.tar.xz) then I can reproduce the bug. I get a warning for "creating a DT_TEXTREL in a shared object" when linking the wmluiltok binary and subsequently a segmentation fault. Looking into that stage3, I find that it still contains a link to 13.0 profiles, so it has been compiled with gcc-6.4.0 but without pie, which is inconsistent with the settings in the 17.0 profile.

So, unless somebody can provide a recipe how to reproduce the problem on a system that was built with consistent compiler settings, I am inclined to resolve this bug as INVALID.
Comment 27 Ulrich Müller gentoo-dev 2017-12-30 10:44:01 UTC
(In reply to Kobboi from comment #25)
> emerge -1 flex motif works for me

Right, this seems to be the workaround of choice.

Failure is also expected when switching from a 13.0 profile (nopie) to a 17.0 or 17.1 profile (pie), and rebuilding x11-libs/motif before rebuilding sys-devel/flex. Leaving this bug open, in order to prevent further duplicates.
Comment 28 Ulrich Müller gentoo-dev 2017-12-30 21:19:19 UTC
*** Bug 642754 has been marked as a duplicate of this bug. ***
Comment 29 Ulrich Müller gentoo-dev 2018-01-03 16:29:50 UTC
*** Bug 643226 has been marked as a duplicate of this bug. ***
Comment 30 Ulrich Müller gentoo-dev 2018-01-03 16:44:00 UTC
*** Bug 642798 has been marked as a duplicate of this bug. ***
Comment 31 Ulrich Müller gentoo-dev 2018-01-03 16:46:36 UTC
(In reply to Ulrich Müller from comment #27)
> Leaving this bug open, in order to prevent further duplicates.

Apparently, this doesn't prevent dupes. Closing.
Comment 32 Ulrich Müller gentoo-dev 2018-01-03 23:07:11 UTC
Repeating it here again: The news item for upgrading to 17.0 profiles https://www.gentoo.org/support/news-items/2017-11-30-new-17-profiles.html clearly states:

    * Rebuild your entire system
        emerge -e @world

This certainly covers rebuilding of sys-devel/flex. Since motif has a build-time dependency on flex, proper order of rebuilds is also guaranteed.

(And yes, users who know what they are doing might rebuild only a smaller set of packages. In any case, that set must include all packages installing *.a static libraries.)
Comment 33 Ulrich Müller gentoo-dev 2018-01-04 14:28:42 UTC
*** Bug 643370 has been marked as a duplicate of this bug. ***
Comment 34 Ulrich Müller gentoo-dev 2018-02-11 11:06:31 UTC
*** Bug 646854 has been marked as a duplicate of this bug. ***
Comment 35 Robert Wolf 2018-02-16 15:42:15 UTC
Dear Ulrich,

I got these "Segmentation fault ./wmluiltok" and "Symbol `exit' causes overflow in R_X86_64_PC32 relocation" errors in fresh stage3 chroot with profile 17.0. grknight has advised me to recompile flex and really, it has fixed this problem.

But recompiling flex is no obvious solution for this bug. Could someone check and repair the stage3 to be able compile motif without recompiling flex? Otherwise it should be somewhere noticed to recompile flex before motif or if this error comes on motif compilation.

In fact, does it means stage3 wasn't correctly created according to news about profile 17.0.

Thank you.

Regards.

Robert Wolf.
Comment 36 Robert Wolf 2018-02-16 16:01:07 UTC
Hi Ulrich,

grknight has reported my problem with stage3 to iamben. Probably old flex has been included into stage3 with profile 17.

Regards,

Robert.
Comment 37 Ulrich Müller gentoo-dev 2018-02-16 18:36:32 UTC
(In reply to Robert Wolf from comment #35)

Ack, the current stage3-amd64-20180206T214502Z.tar.xz still contains an old flex library: 

$ ls -l usr/lib64/libfl.a 
-rw-r--r-- 1 root root 2844 Dec 15 21:40 usr/lib64/libfl.a

You can also check this with "nm -u /usr/lib64/libfl.a": It should show a symbol _GLOBAL_OFFSET_TABLE_ for the 17.0 version.
Comment 38 Ulrich Müller gentoo-dev 2018-03-17 12:10:07 UTC
*** Bug 650680 has been marked as a duplicate of this bug. ***
Comment 39 Ulrich Müller gentoo-dev 2018-05-22 10:51:32 UTC
*** Bug 656228 has been marked as a duplicate of this bug. ***
Comment 40 Sebastian Pipping gentoo-dev 2021-06-27 00:40:31 UTC
*** Bug 798834 has been marked as a duplicate of this bug. ***
Comment 41 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-03-11 22:47:36 UTC
*** Bug 658464 has been marked as a duplicate of this bug. ***