Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 629296 - media-libs/openexr-2.2.0-r1: ld.gold fails to build: symbol lookup error: /usr/lib32/libIlmThread-2_2.so.12: undefined symbol: sem_init
Summary: media-libs/openexr-2.2.0-r1: ld.gold fails to build: symbol lookup error: /us...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: media-video herd
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: gold-tracker
  Show dependency tree
 
Reported: 2017-08-29 14:41 UTC by Michelangelo Scopelliti
Modified: 2018-07-12 19:48 UTC (History)
4 users (show)

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


Attachments
build log (with MAKEOPTS="-j1") (openexr-2.2.0-r1:20170829-142759.log.gz,8.13 KB, application/gzip)
2017-08-29 14:41 UTC, Michelangelo Scopelliti
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michelangelo Scopelliti 2017-08-29 14:41:01 UTC
Created attachment 491070 [details]
build log (with MAKEOPTS="-j1")

I've recently rebuilt all my system with ld.gold.

media-libs/openexr-2.2.2.0-r1 fails with error

symbol lookup error: /usr/lib32/libIlmThread-2_2.so.12: undefined
symbol: sem_init

openexr builds fine switching to ld.bfd

$ emerge -vpq openexr
[ebuild   R   ] media-libs/openexr-2.2.0-r1  USE="-examples -static-libs" ABI_X86="32 (64) (-x32)" CPU_FLAGS_X86="-avx"

$ emerge --info
Portage 2.3.8 (python 2.7.13-final-0, default/linux/amd64/13.0, gcc-6.4.0, glibc-2.25-r4, 4.12.9 x86_64)
=================================================================
System uname: Linux-4.12.9-x86_64-AMD_A8-3870_APU_with_Radeon-tm-_HD_Graphics-with-gentoo-2.4.1
KiB Mem:    15889368 total,  11046476 free
KiB Swap:   18874352 total,  18874352 free
Timestamp of repository gentoo: Tue, 29 Aug 2017 06:15:01 +0000
Head commit of repository gentoo: 85701d5bd21649b1b588fd0d0a568ebd760c1125
sh bash 4.4_p12
ld GNU gold (Gentoo 2.28.1 p1.0 2.28.1) 1.14
app-shells/bash:          4.4_p12::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.2::gentoo
dev-lang/python:          2.7.13::gentoo, 3.6.1-r1::gentoo
dev-util/cmake:           3.9.1::gentoo
sys-apps/baselayout:      2.4.1-r1::gentoo
sys-apps/openrc:          0.29::gentoo
sys-apps/sandbox:         2.10-r4::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.13.4-r1::gentoo, 1.15.1-r1::gentoo
sys-devel/binutils:       2.28.1::gentoo
sys-devel/gcc:            6.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r4::gentoo
sys-devel/make:           4.2.1-r1::gentoo
sys-kernel/linux-headers: 4.11::gentoo (virtual/os-headers)
sys-libs/glibc:           2.25-r4::gentoo
Repositories:

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

kernelpanic
    location: /usr/local/portage/kernelpanic
    masters: gentoo

libressl
    location: /var/lib/layman/libressl
    sync-type: laymansync
    sync-uri: https://github.com/gentoo/libressl.git
    masters: gentoo
    priority: 50

science
    location: /var/lib/layman/science
    sync-type: laymansync
    sync-uri: git://anongit.gentoo.org/proj/sci.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA @EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -mtune=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -mtune=native -O2 -pipe"
DISTDIR="/var/portage/distfiles"
FCFLAGS="-march=native -mtune=native -O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg cgroup clean-logs compress-build-logs compress-index config-protect-if-modified distlocks downgrade-backup fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms split-elog split-log strict unknown-features-warn unmerge-backup unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=native -mtune=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK=" /etc/systemd /usr/lib/systemd /usr/lib64/systemd"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j5"
PKGDIR="/var/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 a52 aac acl alsa amd64 ao berkdb blas bluetooth branding bzip2 cairo caps cli cracklib crypt cups curl cxx dbus djvu dri dts dv dvb dvd encode exif ffmpeg fftw flac fontconfig fortran gcj gdbm gif gimp gmp gpm gsm gstreamer iconv icu inotify ipv6 jbig jpeg jpeg2k lame lapack latex lcms libass libnotify libressl lzma lzo mad matroska mmap mms mng modplug modules mp3 mpeg mpi multilib ncurses nls nptl offensive ogg openexr opengl openmp pam pcre pdf png postscript raw readline scanner seccomp session smp sndfile sound sox speex ssl startup-notification svg theora threads tiff truetype udev unicode usb v4l vaapi vdpau vim-syntax vorbis wavpack wmf wxwidgets x264 xattr xcb xml xmp xpm xscreensaver xv xvid zlib" ABI_X86="32 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" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 3dnow 3dnowext popcnt sse3 sse4a" CURL_SSL="libressl" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" L10N="it en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="it en" LLVM_TARGETS="AMDGPU" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="ruby24" SANE_BACKENDS="xerox_mfp" USERLAND="GNU" VIDEO_CARDS="modesetting radeon r600" 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, EMERGE_DEFAULT_OPTS, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Kamalavelan 2017-11-12 14:09:50 UTC
Have the same issue, according to some Stackoverflow pages, when using -pthreads, -lrt has to be passed as well. Adding it to my C{XX}FLAGS I have got it to compile against ld.gold
Comment 2 Petross404(Petros S) 2017-12-27 19:46:21 UTC
(In reply to Kamalavelan from comment #1)
> Have the same issue, according to some Stackoverflow pages, when using
> -pthreads, -lrt has to be passed as well. Adding it to my C{XX}FLAGS I have
> got it to compile against ld.gold

I had the same problem, the workaround solved it. ld is happy even with LTO.