Summary: | [kde overlay] media-sound/amarok-2.8.90 fails to build with use "-embedded": cannot find -lmysqld | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Till Schäfer <till2.schaefer> |
Component: | [OLD] KDE | Assignee: | Gentoo KDE team <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gentoo, gentoo, mysql-bugs |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=567858 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
amarok-2.8.90-fix-cmake-MySQLEmbedded.patch build.log for with patch applied amarok-2.8.90-respect-use-embedded.patch |
Description
Till Schäfer
2015-11-27 12:38:16 UTC
Created attachment 418008 [details]
build.log
This is related to the use flag embedded. If I enable it, amarok builds here. Created attachment 418404 [details, diff]
amarok-2.8.90-fix-cmake-MySQLEmbedded.patch
The test for MySQL Embedded in cmake/modules/FindMySQLAmarok.cmake is incorrect, as it depends on `mysql_config --libmysqld-libs` having no output in the case that MySQL Embedded is not supported, but actually mysql_config outputs usage help in this case because '--libmysqld-libs' is not a recognized option.
Attached is a patch that corrects the CMake test and allows Amarok to build without MySQL Embedded.
(In reply to Matt Whitlock from comment #3) > Created attachment 418404 [details, diff] [details, diff] > amarok-2.8.90-fix-cmake-MySQLEmbedded.patch > > The test for MySQL Embedded in cmake/modules/FindMySQLAmarok.cmake is > incorrect, as it depends on `mysql_config --libmysqld-libs` having no output > in the case that MySQL Embedded is not supported, but actually mysql_config > outputs usage help in this case because '--libmysqld-libs' is not a > recognized option. > > Attached is a patch that corrects the CMake test and allows Amarok to build > without MySQL Embedded. Any idea if this Gentoo-specific, or is this patch fine to send upstream? (In reply to Michael Palimaka (kensington) from comment #4) > Any idea if this Gentoo-specific, or is this patch fine to send upstream? It should be fine to send upstream, assuming mysql_config always returns a non-zero exit code when libmysqld is not supported. Hopefully upstream will correct the indentation inside the newly introduced "if" block. (I left it unindented to minimize the diff.) THX for the patch. However, it still fails to build here: /usr/bin/x86_64-pc-linux-gnu-g++ -fPIC -march=native -O2 -pipe -ggdb -fmessage-length=0 -Wl,--as-needed -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -std=c++0x -Wl,--enable-new-dtags -Wl,--no-undefined -lc -Wl,-O1 -Wl,--as-needed -shared -Wl,-soname,amarok_collection-mysqlcollection.so -o ../../../../../../lib/amarok_collection-mysqlcollection.so CMakeFiles/amarok_collection-mysqlcollection.dir/amarok_collection-mysqlcollection_automoc.cpp.o CMakeFiles/amarok_collection-mysqlcollection.dir/MySqlCollectionFactory.cpp.o CMakeFiles/amarok_collection-mysqlcollection.dir/MySqlQueryMaker.cpp.o ../../../../../../lib/libamarok-sqlcollection.so.1.0.0 ../../../../../../lib/libamaroklib.so.1.0.0 /usr/lib64/qt4/libQtCore.so -lpthread /usr/lib64/qt4/libQtGui.so -L/usr/lib64/mysql -lmysqld -lpthread -ldl -lz -lcrypt -lpthread ../../../../../../lib/libamarokcore.so.1.0.0 /usr/lib64/qt4/libQtGui.so /usr/lib64/libkdecore.so.5.14.14 -lpthread /usr/lib64/qt4/libQtDBus.so /usr/lib64/qt4/libQtCore.so -Wl,-rpath,/var/tmp/portage/media-sound/amarok-2.8.90/work/amarok-2.8.90_build/lib:/usr/lib64/qt4: -Wl,-rpath-link,/var/tmp/portage/media-sound/amarok-2.8.90/work/amarok-2.8.90_build/lib /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmysqld collect2: error: ld returned 1 exit status src/core-impl/collections/db/sql/mysqlcollection/CMakeFiles/amarok_collection-mysqlcollection.dir/build.make:156: recipe for target 'lib/amarok_collection-mysqlcollection.so' failed make[2]: *** [lib/amarok_collection-mysqlcollection.so] Error 1 make[2]: Leaving directory '/var/tmp/portage/media-sound/amarok-2.8.90/work/amarok-2.8.90_build' CMakeFiles/Makefile2:2013: recipe for target 'src/core-impl/collections/db/sql/mysqlcollection/CMakeFiles/amarok_collection-mysqlcollection.dir/all' failed make[1]: *** [src/core-impl/collections/db/sql/mysqlcollection/CMakeFiles/amarok_collection-mysqlcollection.dir/all] Error 2 make[1]: *** Waiting for unfinished jobs.... Created attachment 418718 [details]
build.log for with patch applied
(In reply to Till Schäfer from comment #6) > THX for the patch. However, it still fails to build here Is your dev-db/mysql installed with USE="embedded"? What is the output of "mysql_client"? Do you have a /usr/lib*/libmysqld.so? (In reply to Matt Whitlock from comment #8) > (In reply to Till Schäfer from comment #6) > > THX for the patch. However, it still fails to build here > > Is your dev-db/mysql installed with USE="embedded"? nope, and i have mariadb installed: $ eix -e mariadb [I] dev-db/mariadb Available versions: ~5.5.46^d 10.0.21(0/18)^td ~10.0.21-r1(0/18)^td 10.0.22(0/18)^td ~10.0.22-r1(0/18)^td ~10.1.8(0/18)^td ~10.1.9(0/18)^td {bindist client-libs cluster +community cracklib debug embedded extraengine galera innodb-lz4 innodb-lzo innodb-snappy jemalloc latin1 libressl max-idx-128 minimal mroonga odbc +openssl oqgraph pam +perl profiling selinux +server sphinx ssl sst-rsync sst-xtrabackup static static-libs systemd systemtap tcmalloc test tokudb +tools xml yassl ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32"} Installed versions: 10.0.22^d(14:13:17 27.11.2015)(openssl pam perl -bindist -debug -embedded -extraengine -jemalloc -latin1 -libressl -minimal -odbc -oqgraph -profiling -selinux -sphinx -static -static-libs -systemtap -tcmalloc -test -tokudb -xml -yassl ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32") Homepage: http://mariadb.org/ Description: An enhanced, drop-in replacement for MySQL > What is the output of "mysql_client"? There is no such executable here. Is it the same as mysql_client_test? In this case: # mysql_client_test ##################################### client_connect ##################################### [MySQL] connection failed Establishing a connection to '' ... Check the connection options using --help or -? > > Do you have a /usr/lib*/libmysqld.so? no # l /usr/lib32/libmysqld.so ls: cannot access /usr/lib32/libmysqld.so: No such file or directory # l /usr/lib64/libmysqld.so ls: cannot access /usr/lib64/libmysqld.so: No such file or directory (In reply to Till Schäfer from comment #9) > (In reply to Matt Whitlock from comment #8) > > What is the output of "mysql_client"? > There is no such executable here. Oh, I'm sorry. That was a typo. I meant "mysql_config". (In reply to Till Schäfer from comment #9) > > > > Do you have a /usr/lib*/libmysqld.so? > no If you had that file, it would be /usr/lib*/mysql/libmysqld.so $ mysql_config Usage: /usr/bin/mysql_config [OPTIONS] Options: --cflags [-I/usr/include/mysql -I/usr/include/mysql/..] --include [-I/usr/include/mysql -I/usr/include/mysql/..] --libs [-L/usr/lib64 -lmysqlclient -lpthread -lz -lm -lssl -lcrypto -ldl] --libs_r [-L/usr/lib64 -lmysqlclient_r -lpthread -lz -lm -lssl -lcrypto -ldl] --plugindir [/usr/lib64/mysql/plugin] --socket [/var/run/mysqld/mysqld.sock] --port [0] --version [10.0.22] --libmysqld-libs [-L/usr/lib64/mysql -lmysqld] --variable=VAR VAR is one of: pkgincludedir [/usr/include/mysql] pkglibdir [/usr/lib64] plugindir [/usr/lib64/mysql/plugin] # l /usr/lib*/mysql/ /usr/lib/mysql/: total 188K drwxr-xr-x 3 root root 4.0K 27. Nov 14:13 . drwxr-xr-x 155 root root 176K 7. Dez 12:33 .. drwxr-xr-x 2 root root 4.0K 27. Nov 14:13 plugin /usr/lib64/mysql/: total 188K drwxr-xr-x 3 root root 4.0K 27. Nov 14:13 . drwxr-xr-x 155 root root 176K 7. Dez 12:33 .. drwxr-xr-x 2 root root 4.0K 27. Nov 14:13 plugin also locate -i libmysqld.so returned nothing => still no :-) (In reply to Till Schäfer from comment #12) > => still no :-) So your dev-db/mariadb[embedded] is installed incorrectly. That's not a bug in Amarok's build process. Maybe the ebuild for dev-db/mariadb removes libmysqld improperly (i.e., removes the file after the build rather than disabling it from being built in the first place). (In reply to Matt Whitlock from comment #13) > dev-db/mariadb[embedded] Sorry, I meant [-embedded]. With that flag disabled, mysql_config shouldn't even know what --libmysqld-libs means. I have created a separate bug report for the mysql_config issue: Bug #567858 However, should we really rely on autodetection here if we have a separate use flag for embedded? I mean, amarok only enforces the installation of mysql with embedded enabled, but it is also possible to install mysql with embedded enabled and amarok with embedded disabled. In this situation the useflag is disabled, but the feature is still compiled in, or am i wrong? Beside the unexpected behavior from a user perspective: If I disable the embedded useflag for mysql later, this will cause a breakage of the current amarok installation. Furthermore portage is unable to detect the necessary rebuild on a dependency level. I need to run revdep-rebuild. Okay, so I upgraded to dev-db/mysql-5.6.28, and now my mysql_config lies about libmysqld, just like yours does, and now Amarok fails to build for me because it can't find -lmysqld even though it shouldn't be trying to link against that library anyway since USE="-embedded". Gah! Created attachment 419248 [details, diff]
amarok-2.8.90-respect-use-embedded.patch
This patch makes Amarok's MySQL collection attempt to link against -lmysqld only if USE="embedded".
patch works here. THX again I put the patch into /etc/portage/patches/media-sound/amarok-2.8.90/amarok-2.8.90-respect-use-embedded.patch (I removed the tilde on the first line) and emerge nicely enough applied the patch and the merge ran through just fine. Thanks alot! @Matt Whitlock could you please send the patch to upstream (git.reviewboard.kde.org)? (In reply to Johannes Huber from comment #20) > @Matt Whitlock could you please send the patch to upstream > (git.reviewboard.kde.org)? https://git.reviewboard.kde.org/r/127523/ Would someone else please respond to Myriam's comment on the KDE review request? I don't want it to come across as though I'm making this request only on my own behalf. (In reply to Matt Whitlock from comment #22) > Would someone else please respond to Myriam's comment on the KDE review > request? I don't want it to come across as though I'm making this request > only on my own behalf. You have got already positive replies to Myriam's comment. :) got the same problem with Emerging media-sound/amarok-2.8.90 currently results in a build failure here: /usr/lib/gcc/x86_64-pc-linux-gnu/4.9.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmysqld collect2: error: ld returned 1 exit status I have mysql with -embedded eix -e mysql [I] dev-db/mysql Available versions: (~)5.5.47^d (~)5.5.48^d 5.6.28(0/18)^t (~)5.6.29(0/18)^t {bindist cluster +community debug embedded extraen+perl profiling selinux +server ssl static static-libs systemtap tcmalloc test yassl ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390= Installed versions: 5.6.29(18:25:06 12/02/2016)(openssl perl server -debug -embedded -extraengine -jemalloc -latin1 -libressl -c -test -yassl ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="32 64 -x32") Homepage: http://www.mysql.com/ Description: A fast, multi-threaded, multi-user SQL database server [I] virtual/mysql Available versions: (~)5.5-r1 5.6-r6(0/18) (~)5.6-r7(0/18) (~)5.6-r8(0/18) {embedded minimal static static-libs ABI_MIPS="n32 n"} Installed versions: 5.6-r8(09:35:09 10/03/2016)(-embedded -static) Description: Virtual for MySQL database server I did try to use amarok-2.8.90-fix-cmake-MySQLEmbedded.patch amarok-2.8.90-respect-use-embedded.patch following https://wiki.gentoo.org/wiki//etc/portage/patches but couldn't apply it [[32;01m * ^[[39;49;00mPackage: media-sound/amarok-2.8.90 ^[[32;01m * ^[[39;49;00mRepository: kde ^[[32;01m * ^[[39;49;00mMaintainer: jmbsvicetto@gentoo.org kde@gentoo.org,sound@gentoo.org ^[[32;01m * ^[[39;49;00mUSE: abi_x86_64 amd64 cdda elibc_glibc ipod kernel_linux lastfm linguas_en_GB linguas_es linguas_fr mtp ofa opengl userland_GNU utils ^[[32;01m * ^[[39;49;00mFEATURES: preserve-libs sandbox userpriv usersandbox >>> Unpacking source... >>> Unpacking amarok-2.8.90.tar.xz to /var/tmp/portage/media-sound/amarok-2.8.90/work >>> Source unpacked in /var/tmp/portage/media-sound/amarok-2.8.90/work >>> Preparing source in /var/tmp/portage/media-sound/amarok-2.8.90/work/amarok-2.8.90 ... >>> Enabling languages: en_GB es fr ^[[32;01m*^[[0m Applying amarok-2.8.0-taglib110.patch ... ^[[A^[[125C ^[[34;01m[ ^[[32;01mok^[[34;01m ]^[[0m ^[[32;01m*^[[0m Applying patches from /etc/portage/patches/media-sound/amarok-2.8.90 ... ^[[32;01m*^[[0m amarok-2.8.90-fix-cmake-MySQLEmbedded.patch ... The text leading up to this was: -------------------------- |--- cmake/modules/FindMySQLAmarok.cmake~ 2015-06-11 05:24:42.000000000 +0000 |+++ cmake/modules/FindMySQLAmarok.cmake 2015-12-02 20:47:45.710063206 +0000 -------------------------- No file to patch. Skipping patch. 2 out of 2 hunks ignored ^[[A^[[125C ^[[34;01m[ ^[[31;01m!!^[[34;01m ]^[[0m ^[[31;01m*^[[0m ERROR: media-sound/amarok-2.8.90::kde failed (prepare phase): ^[[31;01m*^[[0m patch -p1 failed with /etc/portage/patches/media-sound/amarok-2.8.90/amarok-2.8.90-fix-cmake-MySQLEmbedded.patch ^[[31;01m*^[[0m ^[[31;01m*^[[0m Call stack: ^[[31;01m*^[[0m ebuild.sh, line 133: Called src_prepare ^[[31;01m*^[[0m environment, line 4106: Called kde4-base_src_prepare ^[[31;01m*^[[0m environment, line 3127: Called cmake-utils_src_prepare ^[[31;01m*^[[0m environment, line 1214: Called _cmake_execute_optionally 'src_prepare' ^[[31;01m*^[[0m environment, line 599: Called enable_cmake-utils_src_prepare ^[[31;01m*^[[0m environment, line 1648: Called default_src_prepare ^[[31;01m*^[[0m phase-functions.sh, line 870: Called __eapi6_src_prepare ^[[31;01m*^[[0m environment, line 394: Called eapply_user ^[[31;01m*^[[0m environment, line 1414: Called eapply '/etc/portage/patches/media-sound/amarok-2.8.90' ^[[31;01m*^[[0m environment, line 1391: Called _eapply_patch '/etc/portage/patches/media-sound/amarok-2.8.90/amarok-2.8.90-fix-cmake-MySQLEmbedded.patch' ' ' ^[[31;01m*^[[0m environment, line 1333: Called __helpers_die 'patch -p1 failed with /etc/portage/patches/media-sound/amarok-2.8.90/amarok-2.8.90-fix-cmake-MySQLEmbedded.patch' ^[[31;01m*^[[0m isolated-functions.sh, line 117: Called die ^[[31;01m*^[[0m The specific snippet of code: ^[[31;01m*^[[0m die "$@" is it me?my settings?the fact it's an overlay?the patches? Thanks. This is fixed now in git. Patch pushed upstream. Please sync. https://gitweb.gentoo.org/proj/kde.git/commit/?id=01c937900910b60d2c59095de0aab41511bb7555 Thanks! works perfect |