media-sound/amarok-2.8.90-r3 failed in configure phase due CMP0004 policy even in June 2017 same package was compiled without any problem. :-( Error message: CMake Error at /usr/share/apps/cmake/modules/KDE4Macros.cmake:704 (add_library): Target "amarok_storage-mysqlestorage" links to item "-L/usr/lib64/mysql -lmysqld -lz -lm -lssl -lcrypto -ldl -lcrypt -laio " which has leading or trailing whitespace. This is now an error according to policy CMP0004. Call Stack (most recent call first): src/core-impl/storage/sql/mysqlestorage/CMakeLists.txt:11 (kde4_add_plugin) Only functional workaround for me now is switch CMP0004 to old behaviour: --- amarok-2.8.90-r3.ebuild 2017-08-28 20:13:54.831875376 +0200 +++ amarok-2.8.90-r3.ebuild 2017-09-16 19:04:59.869944510 +0200 @@ -80,6 +80,9 @@ src_prepare() { # requires qtwebkit sed -i -e "s/wikipedia,//" data/amarok_homerc || die + + sed -e "/cmake_minimum_required/a cmake_policy(SET CMP0004 OLD)" \ + -i CMakeLists.txt || die } src_configure() {
emerge --info '=media-sound/amarok-2.8.90-r3::gentoo': Portage 2.3.8 (python 3.4.6-final-0, hardened/linux/amd64, gcc-6.4.0, glibc-2.24-r4, 4.12.10-x1 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.12.10-x1-x86_64-AMD_FX-tm-8350_Eight-Core_Processor-with-gentoo-2.3 KiB Mem: 32784008 total, 3658884 free KiB Swap: 44040164 total, 43057636 free Timestamp of repository gentoo: Fri, 15 Sep 2017 07:43:58 +0000 Head commit of repository gentoo: cc887400e909b08a927d25b9fad34c19917bdae3 sh bash 4.4_p12 ld GNU ld (Gentoo 2.28 p1.2) 2.28 ccache version 3.2.7 [enabled] 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.4.6::gentoo dev-util/ccache: 3.2.7::gentoo dev-util/cmake: 3.9.2::gentoo dev-util/pkgconfig: 0.28-r3::gentoo sys-apps/baselayout: 2.3::gentoo sys-apps/openrc: 0.30::gentoo sys-apps/sandbox: 2.10-r3::gentoo sys-devel/autoconf: 2.13::gentoo, 2.69::gentoo sys-devel/automake: 1.4_p6-r2::gentoo, 1.11.6-r1::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1-r1::gentoo, 1.15.1-r1::gentoo sys-devel/binutils: 2.26.1::jim-private, 2.28-r2::jim-private, 2.28.1::gentoo sys-devel/gcc: 5.4.0-r3::jim-private, 6.4.0::jim-private, 7.1.0-r1::gentoo, 7.2.0::jim-private sys-devel/gcc-config: 1.8-r1::gentoo sys-devel/libtool: 2.4.6-r3::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.13::gentoo (virtual/os-headers) sys-libs/glibc: 2.24-r4::gentoo Repositories: gentoo location: /usr/portage/ebuilds sync-type: git sync-uri: https://github.com/gentoo-mirror/gentoo.git priority: -1000 jim-private location: /usr/portage/overlays/jim masters: gentoo priority: 19 crossdev location: /usr/portage/overlays/crossdev masters: gentoo priority: 20 bliss-overlay location: /usr/portage/overlays/layman/bliss-overlay sync-type: laymansync sync-uri: https://github.com/fearedbliss/bliss-overlay.git masters: gentoo priority: 50 grub2-themes location: /usr/portage/overlays/layman/grub2-themes sync-type: laymansync sync-uri: https://github.com/gentoo/grub2-themes-overlay.git masters: gentoo priority: 50 java location: /usr/portage/overlays/layman/java sync-type: laymansync sync-uri: git://anongit.gentoo.org/proj/java.git masters: gentoo priority: 50 seden location: /usr/portage/overlays/layman/seden sync-type: laymansync sync-uri: git://anongit.gentoo.org/user/seden.git masters: gentoo priority: 50 x11 location: /usr/portage/overlays/layman/x11 sync-type: laymansync sync-uri: git://anongit.gentoo.org/proj/x11 masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=bdver2 -mtune=bdver2 -O2 -pipe -fdiagnostics-color=auto -mno-tbm -mvzeroupper -fuse-ld=gold -flto=8 -fuse-linker-plugin -fno-fat-lto-objects -fpie -fno-delete-null-pointer-checks -ftree-vectorize -floop-parallelize-all -ftree-parallelize-loops=8 -funroll-loops -funroll-all-loops -ftree-vectorize -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -fgraphite-identity -fPIC" 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/apache2-php7.0/ext-active/ /etc/php/cgi-php5.6/ext-active/ /etc/php/cgi-php7.0/ext-active/ /etc/php/cli-php5.6/ext-active/ /etc/php/cli-php7.0/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CXXFLAGS="-march=bdver2 -mtune=bdver2 -O2 -pipe -fdiagnostics-color=auto -mno-tbm -mvzeroupper -fuse-ld=gold -flto=8 -fuse-linker-plugin -fno-fat-lto-objects -fpie -fno-delete-null-pointer-checks -ftree-vectorize -floop-parallelize-all -ftree-parallelize-loops=8 -funroll-loops -funroll-all-loops -ftree-vectorize -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -fgraphite-identity -fPIC -flifetime-dse=1" DISTDIR="/usr/portage/distfiles" EMERGE_DEFAULT_OPTS="--keep-going --ask-enter-invalid --quiet-build=y --quiet-fail=y --jobs=8 --load-average=7.8 --autounmask-keep-masks" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs buildpkg ccache config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync multilib-strict 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://distfiles.gentoo.org http://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/" LANG="cs_CZ.utf-8" LDFLAGS="-fuse-ld=gold -flto=8 -fuse-linker-plugin -fno-fat-lto-objects -fpie -fno-delete-null-pointer-checks -ftree-vectorize -floop-parallelize-all -ftree-parallelize-loops=8 -funroll-loops -funroll-all-loops -ftree-vectorize -floop-interchange -ftree-loop-distribution -floop-strip-mine -floop-block -fgraphite-identity -Wl,-O1,--sort-common,--hash-style=gnu,--as-needed,-z,now -fPIC" MAKEOPTS="-j8 -l7.8" PKGDIR="/usr/portage/packages/current" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_EXTRA_OPTS="-4" 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="7zip X aac acl acpi alsa amd64 bash-completion berkdb bzip2 cairo caps cli consolekit cracklib crypt cxx dbus dri dvd egl encode evdev faac faad fbcon fbcondecor fbsplash ffmpeg fftw flac gallium gdbm gif glamor gles gnutls gpm graphite gtk hardened hvm iconv id3tag infinality int64 introspection iproute2 ipv6 java jpeg jpeg2k justify kerberos lto lzma lzo mad matroska mng mod modules mp3 mp4 mpeg mpeg2 mpeg4 multilib mysql ncurses netlink nfs nfsv3 nfsv4 nls nptl nsplugin ntfs ogg openal opencl opengl openmp opus pam pax_kernel pcre pdf perl php pic pie png postgres python qt3support qt5 rdp readline samba sdl sdl2 seccomp semantic-desktop session slang ssl ssp svg taglib tcpd theora tiff truetype unicode urandom usb userlocales vdpau vhosts virgl vlc vnc vorbis vpx vulkan wayland webkit webp x264 x265 xattr xen xml xtpax xv xvmc zlib" ABI_X86="64" ALSA_CARDS="hda-intel" 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 proxy proxy_fcgi proxy_ftp proxy_http" 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="aes avx fma3 fma4 mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 xop" 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 efi-64 xen" INPUT_DEVICES="evdev" KERNEL="linux" L10N="cs" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="cs" LLVM_TARGETS="AMDGPU BPF NVPTX X86 PowerPC AArch64 ARM Hexagon MSP430 Mips Sparc SystemZ XCore Lanai RISCV" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_4" PYTHON_TARGETS="python2_7 python3_4" QEMU_SOFTMMU_TARGETS="i386 x86_64 or1k ppc64 mips64 s390x aarch64" QEMU_USER_TARGETS="i386 x86_64 or1k ppc64 mips64 s390x aarch64" RUBY_TARGETS="ruby23" USERLAND="GNU" VIDEO_CARDS="radeon r600 radeonsi amdgpu virgl" 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
Created attachment 494764 [details] build.log
Created attachment 494766 [details] environment
I can't reproduce that. But for some reason you have unmasked cmake-3.9.2, if you haven't upgraded from kdelibs-4.14.34 to 36 I imagine the error comes from there.
(In reply to Andreas Sturmlechner from comment #4) > I can't reproduce that. But for some reason you have unmasked cmake-3.9.2, > if you haven't upgraded from kdelibs-4.14.34 to 36 I imagine the error comes > from there. Nope. Still same problem with cmake-3.9.3 and kdelibs-4.14.36.
Even with cmake downgraded back to 3.7.2 result is: CMake Error at /usr/share/apps/cmake/modules/KDE4Macros.cmake:704 (add_library): Target "amarok_collection-mysqlcollection" links to item "-L/usr/lib64/mysql -lmysqld -lz -lm -lssl -lcrypto -ldl -lcrypt -laio " which has leading or trailing whitespace. This is now an error according to policy CMP0004. What is library linked in your environment just after libaio? I haven't any previous experience with this kind of errors, but from my point of view it's look like some library failed to be added after "... -laio ".
What's satisfying virtual/mysql for you?
dev-db/mysql-5.6.37
What's the output of: echo "|$(mysql_config --libmysqld-libs)|" ?
|-L/usr/lib64/mysql -lmysqld -lz -lm -lssl -lcrypto -ldl -lcrypt -laio|
This is very interesting. Comment #10 shows that mysql_config --libmysqld-libs is returning the correct output with no trailing space, so I think we can assume it's something on the cmake side responsible. I didn't notice anything in amarok's FindMySQLAmarok.cmake that stands out, so I wonder if the root cause is somewhere higher up in the chain. I'll probably have to write a special test case to help identify the root cause.
No longer issue. Now on default/linux/amd64/17.0/desktop/plasma, no-lto config
Amarok is on the chopping block anyway.