Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 590938 - media-libs/mediastreamer-2.9.0-r1: error: undefined reference to 'XShmDetach' [...]
Summary: media-libs/mediastreamer-2.9.0-r1: error: undefined reference to 'XShmDetach'...
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andrew Savchenko
Depends on:
Blocks: underlinking
  Show dependency tree
Reported: 2016-08-10 13:19 UTC by Michał Górny
Modified: 2019-12-29 14:00 UTC (History)
2 users (show)

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

Build log (media-libs:mediastreamer-2.9.0-r1:20160810-131016.log,164.29 KB, text/x-log)
2016-08-10 13:19 UTC, Michał Górny
build.log-ld:missing_lcunit (media-libs:mediastreamer-2.9.0-r1:20161110-162153.log,171.80 KB, text/x-log)
2016-11-10 16:35 UTC, Petross404(Petros S)

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-08-10 13:19:19 UTC
Created attachment 442914 [details]
Build log

libtool: link: x86_64-pc-linux-gnu-gcc-5.4.0 -D_REENTRANT -DORTP_INET6 -DVIDEO_ENABLED -D_GNU_SOURCE=1 -D_REENTRANT -I/usr/include/SDL -DHAVE_SDL -DHAVE_GL -DHAVE_XV -DORTP_INET6 -march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches -DINET6 -Wall -fdiagnostics-show-option -pthread -D_REENTRANT -pthread -I/usr/include/upnp -Wl,-O1 -Wl,--hash-style=gnu -o .libs/mediastream mediastream.o -pthread -Wl,--export-dynamic  -Wl,--as-needed ../src/.libs/ ../src/.libs/ /tmp/portage/media-libs/mediastreamer-2.9.0-r1/work/mediastreamer-2.9.0/src/.libs/ -lpulse -lspandsp /usr/lib64/ -lGLU -lupnp -lthreadutil -lixml -lortp -lrt -lssl -lcrypto -lasound -lspeex -lspeexdsp -lgsm -ltheora -logg -lvpx -lm -lavcodec -lavutil -lswscale -lSDL -lX11 -lGL -lGLEW -lpthread -lXv -ldl -pthread
../src/.libs/ error: undefined reference to 'XShmDetach'
../src/.libs/ error: undefined reference to 'XShmQueryExtension'
../src/.libs/ error: undefined reference to 'XShmAttach'
collect2: error: ld returned 1 exit status
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-08-10 13:19:48 UTC
Portage 2.3.0 (python 3.5.2-final-0, default/linux/amd64/13.0, gcc-5.4.0, glibc-2.23-r2, 4.7.0-pf1-mgorny-amd64+ x86_64)
System uname: Linux-4.7.0-pf1-mgorny-amd64+-x86_64-AMD_Athlon-tm-_64_X2_Dual_Core_Processor_3800+-with-gentoo-2.2
KiB Mem:     4046968 total,     71748 free
KiB Swap:    1502072 total,   1494952 free
Timestamp of repository gentoo: Wed, 10 Aug 2016 11:03:59 +0000
sh bash 4.3_p46
ld GNU gold (Gentoo 2.26.1 p1.0 2.26.1) 1.11
distcc 3.2rc1 x86_64-pc-linux-gnu [enabled]
ccache version 3.2.7 [disabled]
app-shells/bash:          4.3_p46::gentoo
dev-java/java-config:     2.2.0-r3::gentoo
dev-lang/perl:            5.24.0-r1::gentoo
dev-lang/python:          2.7.12::gentoo, 3.3.5-r8::gentoo, 3.4.5::gentoo, 3.5.2::gentoo
dev-util/ccache:          3.2.7::gentoo
dev-util/cmake:           3.6.1::gentoo
dev-util/pkgconfig:       0.29.1::gentoo
sys-apps/baselayout:      2.2-r1::gentoo
sys-apps/openrc:          0.21.3::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.12.6-r1::gentoo, 1.13.4-r1::gentoo, 1.14.1-r1::gentoo, 1.15-r2::gentoo
sys-devel/binutils:       2.26.1::gentoo
sys-devel/gcc:            4.9.3::gentoo, 5.4.0::gentoo
sys-devel/gcc-config:     1.8-r1::gentoo
sys-devel/libtool:        2.4.6-r2::gentoo
sys-devel/make:           4.2.1::gentoo
sys-kernel/linux-headers: 4.7::gentoo (virtual/os-headers)
sys-libs/glibc:           2.23-r2::gentoo

    location: /var/db/repos/gentoo
    sync-type: git
    sync-umask: 027
    priority: -1000

    location: /home/mgorny/git/python-repo
    sync-umask: 027
    masters: gentoo

    location: /home/mgorny/git/mgorny-repo
    sync-umask: 027
    masters: gentoo
    priority: 10000

Installed sets: @mg_depends_cb_agent, @mg_depends_qaweb, @mg_infra
ACCEPT_KEYWORDS="amd64 ~amd64"
CFLAGS="-march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches"
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 /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches"
EMERGE_DEFAULT_OPTS="--with-bdeps y --ask --keep-going --quiet-build=n --dynamic-deps=n"
FCFLAGS="-march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches"
FEATURES="assume-digests binpkg-logs binpkg-multi-instance buildpkg cgroup collision-protect config-protect-if-modified distcc distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms sign strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync webrsync-gpg"
FFLAGS="-march=k8-sse3 -mcx16 -msahf --param l1-cache-size=64 --param l1-cache-line-size=64 --param l2-cache-size=512 -O2 -pipe -frecord-gcc-switches"
INSTALL_MASK="/test /usr/share/locale -/usr/share/locale/pl"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --times --compress --force --whole-file --delete --stats --timeout=45 --exclude=/distfiles --exclude=/packages --exclude=/local --exclude=CVS --exclude=/metadata/cache --omit-dir-times"
USE="3dnow 3dnowext X aac acl adns aio alsa amd64 ayatana bash-completion bluetooth branding btrfs bzip2 cairo caps cdda cdr cli crypt cups curl cxx dbus djvu dri dvb dvd egl exif fftw flac fontconfig fortran gd gif glamor gmp gnuplot gnutls gphoto2 gstreamer gtk iconv idn imagemagick ipv6 jpeg jpeg2k kate latex lcms libass libatomic liblockfile libnotify libproxy libsamplerate libsecret libtiger lz4 lzma lzo mmap mmx mmxext mng modules mp3 mtp multilib ncurses nls nptl ogg openal opencl opengl openmp openvg opus osmesa pam pango pch pcre pcre-jit pdf plotutils png policykit postscript pulseaudio qt3support readline sctp sdl seccomp session slang smp sndfile speex spell sse sse2 sse3 ssl startup-notification svg systemd t1lib tcpd threads tiff truetype udev udisks unicode upower usb v4l2 vaapi vhosts vim-syntax vorbis wavpack wayland webp wmf x264 xattr xcb xft xml xpm xv xvid xvmc zeroconf zlib zsh-completion" ABI_X86="64 32" ALSA_CARDS="hda-intel emu10k1 mpu401 pcsp virmidi" APACHE2_MODULES="socache_shmcb unixd actions alias deflate filter mime mime_magic negotiation rewrite" 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="mmx mmxext sse sse2 3dnow 3dnowext sse3" 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" L10N="pl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="pl" LIRC_DEVICES="serial" NGINX_MODULES_HTTP="gzip limit_conn limit_req rewrite spdy uwsgi" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4 jython2_7 pypy pypy3 python3_5" QEMU_SOFTMMU_TARGETS="aarch64 arm i386 ppc ppc64 ppc64abi32 x86_64" QEMU_USER_TARGETS="aarch64 arm ppc ppc64" RUBY_TARGETS="ruby20 ruby21" SANE_BACKENDS="artec_eplus48u" USERLAND="GNU" VIDEO_CARDS="nouveau radeon vesa r600 s3" 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"
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-08-10 13:25:22 UTC
Apparently another underlinking issue that can be reproduced using gold.
Comment 3 Petross404(Petros S) 2016-11-10 16:35:33 UTC
Created attachment 452922 [details]

(In reply to Michał Górny from comment #2)
> Apparently another underlinking issue that can be reproduced using gold.

I can confirm this too but with BFD, compilation gave me another error:
ld: cannot find -lcunit

After emerging dev-util/cunit, mediastreamer happily emerged with BFD.

So, besides added a cunit dep, should we also add an "append_cflag -fuse-ld=bfd"?
Comment 4 Andrei Slavoiu 2018-08-17 16:01:26 UTC
It compile after adding -lXext to the current mediastreamer-2.9.0-underlinking.patch

More precisely:

+libmediastreamer_base_la_LIBADD=       $(ORTP_LIBS) @LIB_CLOCK_GETTIME@

needs to become:

+libmediastreamer_base_la_LIBADD=       $(ORTP_LIBS) @LIB_CLOCK_GETTIME@ -lXext