Linking CXX executable avidemux3_qt4 /usr/bin/cmake -E cmake_link_script CMakeFiles/avidemux3_qt4.dir/link.txt --verbose=1 /usr/bin/x86_64-pc-linux-gnu-g++ -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -fno-lto -fmessage-length=0 -Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -fno-lto CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/ADM_preview.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/ADM_previewNavigate.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/gui_main.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/gui_autodrive.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/GUI_jobs.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/gui_navigate.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/gui_play.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/gui_save.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/gui_savenew.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/main.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/gui_action.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/gui_blackframes.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/ADM_gettext.cpp.o CMakeFiles/avidemux3_qt4.dir/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/avidemux/common/ADM_slave.cpp.o -o avidemux3_qt4 -rdynamic commonQt4/ADM_muxerGate/src/libADM_muxerGate6.a commonQt4/ADM_audioFilter/src/libADM_audioFilter6.a commonQt4/ADM_editor/src/libADM_editor6.a commonQt4/ADM_audiocodec/libADM_audiocodec6.a commonQt4/ADM_videoCodec/src/libADM_videocodec6.a -lADM_coreVideoCodec6 commonQt4/ADM_commonUI/libADM_commonUI6.a -lADM_coreJobs commonQt4/ADM_osSupport/libADM_osSupport6.a commonQt4/ADM_requant/libADM_requant6.a commonQt4/ADM_script2/src/libADM_script6.a commonQt4/ADM_videoEncoder/src/libADM_videoEncoder6.a commonQt4/ADM_videoFilter2/src/libADM_internalVideoFilter6.a commonQt4/ADM_toolkit/libADM_toolkit6.a -lADM_core6 -lADM_audioParser6 -lADM_coreAudio6 -lADM_coreAudioFilterAPI6 -lADM_coreAudioDevice6 -lADM_coreAudioEncoder6 -lADM_coreDemuxer6 -lADM_coreImage6 -lADM_coreMuxer6 -lADM_coreUI6 -lADM_coreUtils6 -lADM_coreSocket6 -lADM_coreVideoEncoder6 -lADM_coreVideoFilter6 ADM_userInterfacesQT4/ADM_gui/libADM_guiQt4.a ADM_userInterfacesQT4/ADM_filters/libADM_filtersQt4.a ADM_userInterfacesQT4/ADM_dialog/libADM_dialogQt4.a commonQt4/ADM_videoFilter2/src/libADM_internalVideoFilter6.a ADM_UIsQt4/src/libADM_UIQT46.so ADM_userInterfacesQT4/ADM_gui/libADM_guiQt4.a ADM_userInterfacesQT4/libADM_UI_QT46.a ADM_userInterfacesQT4/ADM_shell/libADM_shellQt4.a commonQt4/ADM_toolkit/libADM_toolkit6.a -lADM_coreAudio6 -lADM_coreAudioDevice6 commonQt4/ADM_osSupport/libADM_osSupport6.a /usr/lib64/qt4/libQtGui.so /usr/lib64/qt4/libQtCore.so -lpthread -lm -lstdc++ -lpthread -lADM_coreAudioFilterAPI6 -lADM_coreAudioEncoder6 -lADM_coreDemuxer6 -lADM_coreMuxer6 -lADM_coreSocket6 -lADM_coreVideoEncoder6 -lpthread -lm -lstdc++ -lpthread -lm -lstdc++ -lADM_coreScript -lADM_coreVideoFilter6 commonQt4/ADM_render/libADM_render6_qt4.so -lADM_core6 -lADM_coreImage6 -lADM_coreUI6 -lGLU -lGL /usr/lib64/qt4/libQtOpenGL.so /usr/lib64/qt4/libQtGui.so /usr/lib64/qt4/libQtCore.so -lXv -lADM_coreUtils6 -Wl,-rpath,/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/buildQt4/ADM_UIsQt4/src:/usr/lib64/qt4:/home/gentoo/tmp/portage/media-video/avidemux-2.6.8/work/avidemux_2.6.8/buildQt4/commonQt4/ADM_render: commonQt4/ADM_render/libADM_render6_qt4.so: error: undefined reference to 'XLockDisplay' commonQt4/ADM_render/libADM_render6_qt4.so: error: undefined reference to 'XUnlockDisplay' collect2: error: ld returned 1 exit status CMakeFiles/avidemux3_qt4.dir/build.make:448: recipe for target 'avidemux3_qt4' failed make[2]: *** [avidemux3_qt4] Error 1 ld.bfd does not show this issue. Following trivial patch fixes the issue with ld.gold: --- ./avidemux/qt4/ADM_UIs/src/CMakeLists.txt.orig 2014-03-12 07:15:23.000000000 +0100 +++ ./avidemux/qt4/ADM_UIs/src/CMakeLists.txt 2015-04-30 13:11:12.052700404 +0200 @@ -25,5 +25,5 @@ INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}/../include) ADD_LIBRARY(${ADM_LIB} SHARED ${${ADM_LIB}_SRCS}) -TARGET_LINK_LIBRARIES(${ADM_LIB} ADM_core6 ADM_coreUI6 ${QT_QTGUI_LIBRARY} ${QT_QTCORE_LIBRARY} ADM_render6_qt4 ADM_coreVideoFilter6) +TARGET_LINK_LIBRARIES(${ADM_LIB} ADM_core6 ADM_coreUI6 ${QT_QTGUI_LIBRARY} X11 ${QT_QTCORE_LIBRARY} ADM_render6_qt4 ADM_coreVideoFilter6) ADM_INSTALL_LIB( ${ADM_LIB} ) Portage 2.2.18 (python 3.4.3-final-0, default/linux/amd64/13.0, gcc-5.1.0, glibc-2.20-r2, 4.0.0-HAUIHAU x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.0.0-HAUIHAU-x86_64-Intel-R-_Core-TM-_i7-2620M_CPU_@_2.70GHz-with-gentoo-2.2 KiB Mem: 8101940 total, 2359012 free KiB Swap: 12582904 total, 10814584 free Timestamp of repository gentoo: Thu, 30 Apr 2015 09:00:01 +0000 sh bash 4.3_p33-r2 ld GNU gold (Gentoo 2.25 p1.1 2.25) 1.11 ccache version 3.2.1 [disabled] app-shells/bash: 4.3_p33-r2::gentoo dev-java/java-config: 2.2.0::gentoo dev-lang/perl: 5.20.2::gentoo dev-lang/python: 2.7.9-r2::gentoo, 3.4.3::gentoo dev-util/ccache: 3.2.1-r1::gentoo dev-util/cmake: 3.2.1::gentoo dev-util/pkgconfig: 0.28-r2::gentoo sys-apps/baselayout: 2.2::gentoo sys-apps/sandbox: 2.6-r1::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69-r1::gentoo sys-devel/automake: 1.11.6-r1::gentoo, 1.13.4::gentoo, 1.14.1::gentoo, 1.15::gentoo sys-devel/binutils: 2.25::gentoo sys-devel/gcc: 4.9.2::gentoo, 5.1.0::gentoo sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r1::gentoo sys-devel/make: 4.1-r1::gentoo sys-kernel/linux-headers: 4.0::gentoo (virtual/os-headers) sys-libs/glibc: 2.20-r2::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 hauihau location: /usr/local/portage/hauihau masters: gentoo priority: 0 x11 location: /var/lib/layman/x11 sync-type: laymansync sync-uri: git://anongit.gentoo.org/proj/x11 masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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/php/apache2-php5.6/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cli-php5.6/ext-active/ /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 -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--autounmask=n --keep-going=y --quiet-build=y --quiet-fail=y --with-bdeps=y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs compressdebug config-protect-if-modified distlocks ebuild-locks fakeroot fixlafiles merge-sync metadata-transfer news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="de_DE.utf8" LC_ALL="de_DE.utf8" LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags" MAKEOPTS="-j5" 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="/home/gentoo/tmp/" USE="X a52 aac aalib acl alsa amd64 apache2 avx bash-completion berkdb bluetooth branding bzip2 cairo caps cdda cddb cdparanoia cdr cli cracklib crypt cups curl cxx dbus dga dri dts dv dvd encode exif ffmpeg flac fontconfig fortran ftp gd gdbm gif gmp gnome gnome-keyring gphoto2 gstreamer gtk iconv icu imagemagick imlib ipv6 jpeg jpeg2k kde lame latex libcaca libnotify libsamplerate lzma lzo mad matroska mmx mmxext mng modemmanager modules mp3 mpeg mtp multilib musepack mysql mysqli ncurses networkmanager nls nptl nsplugin ogg openal opengl openmp pam pcre pdf png policykit postscript pulseaudio qt4 quicktime readline samba session sndfile spell sqlite sse sse2 sse3 sse4 sse4_1 sse4_2 ssl ssse3 svg syslog systemd tcpd theora threads tiff truetype udev unicode usb v4l vaapi vcd vim-syntax vorbis wavpack webkit x264 xattr xcb xcomposite xinerama xml xmp xorg xosd xpm xv xvid zlib" ABI_X86="64" ALSA_CARDS="hda-intel" APACHE2_MODULES="access_compat actions alias auth_basic auth_digest authn_alias authn_anon authn_core authn_dbd authn_dbm authn_file authz_core authz_dbm authz_groupfile authz_host authz_owner authz_user autoindex cache cgid dav dav_fs dav_lock dbd deflate dir env expires ext_filter file_cache filter headers ident imagemap include info lbmethod_bybusyness lbmethod_byrequests lbmethod_bytraffic lbmethod_heartbeat log_config log_forensic logio mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_fcgi proxy_ftp proxy_http ratelimit reqtimeout rewrite setenvif slotmem_shm socache_shmcb speling status substitute unique_id unixd userdir usertrack version vhost_alias" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="canon" 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" 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="evdev synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="de" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64" QEMU_USER_TARGETS="i386 x86_64" RUBY_TARGETS="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" USE_PYTHON="3.4" Unset: CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS ================================================================= Package Settings ================================================================= media-video/avidemux-2.6.8::gentoo was built with the following: USE="nls opengl qt4 vaapi xv -debug -sdl -vdpau" ABI_X86="64" LINGUAS="de -ca -cs -el -es -fr -it -ja -pt_BR -ru -sr -sr@latin -tr" VIDEO_CARDS="-fglrx" CFLAGS="-march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -fno-lto" CXXFLAGS="-march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -fno-lto" LDFLAGS="-Wl,-O1 -Wl,--as-needed -march=native -O2 -pipe -ggdb -floop-interchange -floop-strip-mine -floop-block -ftree-loop-distribution -fira-loop-pressure -ftree-vectorize -ftree-loop-linear -flto=5 -fuse-linker-plugin -Wl,-znow -Wl,--sort-common -Wl,--hash-style=gnu -Wl,--enable-new-dtags -fno-lto" Reproducible: Always Steps to Reproduce: 1. try to compile media-video/avidemux with ld.gold 2. 3. Actual Results: linking of avidemux3_qt4 binary failes Expected Results: linking should succeed https://blog.flameeyes.eu/2010/11/it-s-not-all-gold-that-shines-why-underlinking-is-a-bad-thing
please retry with media-libs/avidemux-core-2.6.20-r2