Looks nobody tripped so far acros this: Building C object tests/CMakeFiles/array-test.dir/array-test.o cd /mnt/external/var/tmp/portage/app-mobilephone/gammu-1.32.0/work/gammu-1.32.0_build/tests && /usr/bin/x86_64-pc-linux-gnu-gcc -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SO URCE=2 -D_LARGEFILE_SOURCE -DNDEBUG -O2 -pipe -maes -mpclmul -mpopcnt -march=native -Wall -Werror-implicit-function-declaration -Wno-deprecated-declarations -Wdecl aration-after-statement -Wpointer-arith -Wfloat-equal -Wbad-function-cast -Wmissing-format-attribute -Wmissing-noreturn -Wpointer-arith -Wshadow -Wstrict-prototypes -Wsign-compare -Wno-pointer-sign -Wshadow -Wformat=2 -Wno-format-y2k -Wno-format-nonliteral -fstack-protector -fPIC -Wwrite-strings -Wredundant-decls -I/mnt/external /var/tmp/portage/app-mobilephone/gammu-1.32.0/work/gammu-1.32.0_build/tests/../include -I/usr/include/mysql -o CMakeFiles/array-test.dir/array-test.o -c /mnt/exte rnal/var/tmp/portage/app-mobilephone/gammu-1.32.0/work/gammu-1.32.0/tests/array-test.c <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default] /mnt/external/var/tmp/portage/app-mobilephone/gammu-1.32.0/work/gammu-1.32.0/tests/array-test.c:1:0: note: this is the location of the previous definition /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmysqlclient collect2: error: ld returned 1 exit status make[2]: *** [contrib/sqlreply/sqlreply] Error 1 make[2]: Leaving directory `/mnt/external/var/tmp/portage/app-mobilephone/gammu-1.32.0/work/gammu-1.32.0_build' make[1]: *** [contrib/sqlreply/CMakeFiles/sqlreply.dir/all] Error 2 $ equery files mysql | grep client /usr/bin/mysql_client_test /usr/include/mysql/mysql/client_plugin.h /usr/lib64/mysql/libmysqlclient.a /usr/lib64/mysql/libmysqlclient.so /usr/lib64/mysql/libmysqlclient.so.18 /usr/lib64/mysql/libmysqlclient.so.18.0.0 /usr/lib64/mysql/libmysqlclient_r.a /usr/lib64/mysql/libmysqlclient_r.so /usr/lib64/mysql/libmysqlclient_r.so.18 /usr/lib64/mysql/libmysqlclient_r.so.18.0.0 /usr/lib64/mysql/plugin/qa_auth_client.so /usr/share/man/man1/mysql_client_test.1.bz2 /usr/share/man/man1/mysql_client_test_embedded.1.bz2 $ $ emerge --info Portage 2.1.12.2 (default/linux/amd64/13.0/no-multilib, gcc-4.7.3, glibc-2.15-r3, 3.10.10-default-pciehp x86_64) ================================================================= System uname: Linux-3.10.10-default-pciehp-x86_64-Intel-R-_Core-TM-_i7-2640M_CPU_@_2.80GHz-with-gentoo-2.2 KiB Mem: 16368832 total, 12816844 free KiB Swap: 4998972 total, 4998972 free Timestamp of tree: Fri, 13 Sep 2013 17:00:01 +0000 ld GNU ld (GNU Binutils) 2.23.2 app-shells/bash: 4.2_p45 dev-java/java-config: 2.2.0 dev-lang/python: 2.7.5-r2, 3.2.5-r2 dev-util/cmake: 2.8.11.1 dev-util/pkgconfig: 0.28 sys-apps/baselayout: 2.2 sys-apps/openrc: 0.12 sys-apps/sandbox: 2.6-r1 sys-devel/autoconf: 2.13, 2.69 sys-devel/automake: 1.11.6, 1.12.6 sys-devel/binutils: 2.23.2 sys-devel/gcc: 4.6.4, 4.7.3 sys-devel/gcc-config: 1.7.3 sys-devel/libtool: 2.4-r1 sys-devel/make: 3.82-r4 sys-kernel/linux-headers: 3.7 (virtual/os-headers) sys-libs/glibc: 2.15-r3 Repositories: gentoo gentoo-haskell science x-portage x-layman ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA dlj-1.1 sun-bcla-java-vm Oracle-BCLA-JavaSE IBM-J1.6 skype-eula Nero-EULA-US AdobeFlash-10.3 skype-4.0.0.7-copyright AdobeFlash-11.x" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -maes -mpclmul -mpopcnt -march=native" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /var/spool/torque" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -maes -mpclmul -mpopcnt -march=native" DISTDIR="/mnt/1TB/usr/portage/distfiles" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news nostrip parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict unknown-features-warn unmerge-logs unmerge-orphans userfetch" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j3" PKGDIR="/usr/portage/packages" PORTAGE_CONFIGROOT="/" PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages" PORTAGE_TMPDIR="/mnt/external/var/tmp" PORTDIR="/mnt/1TB/usr/portage" PORTDIR_OVERLAY="/var/lib/layman/haskell /home/mmokrejs/proj/sci /usr/local/portage /var/lib/layman" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X acl acpi alsa amd64 amr apache apache2 avx berkdb bindist bluetooth bzip2 cairo cgi cli cracklib crypt cryptlib cups cxx dbus device-mapper dhcp dri emboss encode fax ffmpeg flac fontconfig fortran gd gdbm gimp gnutls gpm gtk gudev hal hpijs hwdb iconv id3tag innodb java jce jpeg jpg keymap ladspa lapack laptop lcms libnotify lm_sensors mad mmx modules mpi mpich2 mysql ncurses nfs nls nptl nptlonly nsplugin ntfsprogs ocr ogg opengl openmp pam parport pcre pdf perl php png ppds pppd python readline resolvconf scanner server session sndfile sqlite sse sse2 sse3 sse4_1 sse4_2 ssl ssse3 suexec svg syslog tcpd threads tiff tk truetype udev unicode usb vim-syntax wavpack wifi x11 xml xorg zlib" ABI_X86="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="authz_host cgi cgid deflate dir env filter include info mime mime_magic remoteip setenvif status userdir vhost_alias 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" 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 ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en cs cz" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4 php5-5" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="vesa vmware fbdev intel i915" 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: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
I should have added that on this new Gentoo install this was created for me: /lib -> /lib64 I got around by USE=-mysql
I just copied the 1.32.0 ebuild under 1.33.0 name and tried the newer version but no diff.
It's nothing to do with 64-bit/no-multilib profiles, but with the "new" /usr/lib64/mysql subdir.
Could not confirm here, only difference I see between my equery files and yours is that I have /usr/lib64/libmysqlclient as a symlink to mysql/libmysqlclient.so.18.0.0. Have you rebuilt mysql?
I reinstalled mysql again but that did not help. I manually entered the source dir and types "make" to see where would it continue. There is another places ahead with same symptom: Linking C shared library libgsmsd.so /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmysqlclient Probably the answer is here. gammu-1.33.0_build # grep mysqlclient * CMakeCache.txt:MYSQL_LIBRARIES:FILEPATH=/usr/lib32/libmysqlclient.so;/usr/lib64/libpthread.so;/usr/lib64/libz.so;/usr/lib64/libm.so;/usr/lib64/librt.so;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so;/usr/lib64/libdl.so CMakeCache.txt:MYSQL_LIBRARIES_mysqlclient:FILEPATH=/usr/lib32/libmysqlclient.so CMakeCache.txt:gsmsd_LIB_DEPENDS:STATIC=general;libGammu;general;array;general;/usr/lib64/libodbc.so;general;/usr/lib32/libmysqlclient.so;general;/usr/lib64/libpthread.so;general;/usr/lib64/libz.so;general;/usr/lib64/libm.so;general;/usr/lib64/librt.so;general;/usr/lib64/libssl.so;general;/usr/lib64/libcrypto.so;general;/usr/lib64/libdl.so; gammu-1.33.0_build # # ls -la /usr/lib32/libmysqlclient.so lrwxrwxrwx 1 root root 30 Sep 18 00:00 /usr/lib32/libmysqlclient.so -> mysql/libmysqlclient.so.16.0.0 # ls -la /usr/lib32/mysql/libmysqlclient.so.16.0.0 -rwxr-xr-x 1 root root 1474508 Feb 24 2013 /usr/lib32/mysql/libmysqlclient.so.16.0.0 # Why do I hav old libmysqlclient.so.16.0.0 possibly coming from the stage3 fiel I donwloaded a week ago while doing the new install? I recompiled mysql jsut few minutes ago should that file should have been overwritten, right? # ls -la /usr/lib64/libmysq* lrwxrwxrwx 1 root root 20 Sep 9 20:25 /usr/lib64/libmysqlcppconn.so -> libmysqlcppconn.so.6 lrwxrwxrwx 1 root root 26 Sep 9 20:25 /usr/lib64/libmysqlcppconn.so.6 -> libmysqlcppconn.so.6.1.1.1 -rwxr-xr-x 1 root root 5064142 Sep 9 20:24 /usr/lib64/libmysqlcppconn.so.6.1.1.1 # These are correct (up-to-date). Complete listing is here: # equery files mysql | grep lib /etc/env.d/80mysql-libdir /usr/include/mysql/typelib.h /usr/lib64 /usr/lib64/mysql /usr/lib64/mysql/libmysqlclient.a /usr/lib64/mysql/libmysqlclient.so /usr/lib64/mysql/libmysqlclient.so.18 /usr/lib64/mysql/libmysqlclient.so.18.0.0 /usr/lib64/mysql/libmysqlclient_r.a /usr/lib64/mysql/libmysqlclient_r.so /usr/lib64/mysql/libmysqlclient_r.so.18 /usr/lib64/mysql/libmysqlclient_r.so.18.0.0 /usr/lib64/mysql/libmysqlservices.a /usr/lib64/mysql/plugin /usr/lib64/mysql/plugin/adt_null.so /usr/lib64/mysql/plugin/auth.so /usr/lib64/mysql/plugin/auth_socket.so /usr/lib64/mysql/plugin/auth_test_plugin.so /usr/lib64/mysql/plugin/daemon_example.ini /usr/lib64/mysql/plugin/debug /usr/lib64/mysql/plugin/ha_example.so /usr/lib64/mysql/plugin/ha_federated.so /usr/lib64/mysql/plugin/libdaemon_example.so /usr/lib64/mysql/plugin/mypluglib.so /usr/lib64/mysql/plugin/qa_auth_client.so /usr/lib64/mysql/plugin/qa_auth_interface.so /usr/lib64/mysql/plugin/qa_auth_server.so /usr/lib64/mysql/plugin/semisync_master.so /usr/lib64/mysql/plugin/semisync_slave.so #
Created attachment 358920 [details] ls -latrR /usr/lib32 Just grep for "Feb " in this file for files which I believe are useless for me on amd64 (non-multilib). So, a distribution media issue? shall I find the installation files?
*** Bug 485276 has been marked as a duplicate of this bug. ***
Could it be that this bug is a duplicate of https://bugs.gentoo.org/show_bug.cgi?id=474952, i.e., that the ebuild system of gammu does not use mysql_config to generate the linker option?
Do not know. But here is an output you might have asked for. ;) # mysql_config /usr/bin/mysql_config --libs Usage: /usr/bin/mysql_config [OPTIONS] Options: --cflags [-I/usr/include/mysql -pipe -maes -mpclmul -mpopcnt -fno-strict-aliasing -g -DNDEBUG] --include [-I/usr/include/mysql] --libs [-L/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lrt -lssl -lcrypto -ldl] --libs_r [-L/usr/lib64/mysql -lmysqlclient_r -lpthread -lz -lm -lrt -lssl -lcrypto -ldl] --plugindir [/usr/lib64/mysql/plugin] --socket [/var/run/mysqld/mysqld.sock] --port [0] --version [5.5.32] --libmysqld-libs [-L/usr/lib64/mysql -lmysqld] --variable=VAR VAR is one of: pkgincludedir [/usr/include/mysql] pkglibdir [/usr/lib64/mysql] plugindir [/usr/lib64/mysql/plugin] #
Any news?
I just disabled mysql and that let me compile it (actually compiled 1.33.0). I did not investigate further.
Created attachment 360274 [details] gammu-1.33.0.ebuild
I suspect that this is indeed related to bug 474952, but I can't replicate it myself so I don't have a fix at this time.
gammu-1.33.0 with USE=mysql fails to emerge, too. (In reply to Chris Reffett from comment #13) > I suspect that this is indeed related to bug 474952, but I can't replicate > it myself so I don't have a fix at this time. gammu-1.33.0 with USE=mysql fails to emerge, too. Why can't you replicate it?
If I knew why I couldn't replicate it, then I would actually have an idea as to what the problem is. All I can say is that I have mysql 5.5 and latest gammu and I do not get a build failure.
The s(In reply to Chris Reffett from comment #15) > If I knew why I couldn't replicate it, then I would actually have an idea as > to what the problem is. All I can say is that I have mysql 5.5 and latest > gammu and I do not get a build failure. The same happens with gammu-1.33.0 at all of my systems: cd /var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0_build/smsd && /usr/bin/cmake -E cmake_link_script CMakeFiles/gsmsd.dir/link.txt --verbose=1 /usr/bin/x86_64-pc-linux-gnu-gcc -fPIC -march=amdfam10 -O2 -pipe -Wall -Werror-implicit-function-declaration -Wno-deprecated-declarations -Wdeclaration-after-statement -Wpointer-arith -Wfloat-equal -Wbad-function-cast -Wmissing-format-attribute -Wmissing-noreturn -Wpointer-arith -Wshadow -Wstrict-prototypes -Wsign-compare -Wno-pointer-sign -Wshadow -Wformat=2 -Wno-format-y2k -Wno-format-nonliteral -fstack-protector -fPIC -Wwrite-strings -Wredundant-decls -Wl,-O1 -Wl,--as-needed -Wl,-zrelro -Wl,--as-needed -shared -Wl,-soname,libgsmsd.so.7 -o libgsmsd.so.7.1.33.0 CMakeFiles/gsmsd.dir/core.c.o CMakeFiles/gsmsd.dir/services/files.c.o CMakeFiles/gsmsd.dir/services/null.c.o CMakeFiles/gsmsd.dir/services/sql.c.o CMakeFiles/gsmsd.dir/services/mysql.c.o CMakeFiles/gsmsd.dir/services/pgsql.c.o CMakeFiles/gsmsd.dir/services/dbi.c.o CMakeFiles/gsmsd.dir/services/odbc.c.o ../libgammu/libGammu.so.7.1.33.0 ../helper/libarray.a -ldbi -lodbc -lmysqlclient -lpthread -lz -lm -lssl -lcrypto -ldl -lpq ../helper/libstring.a -lglib-2.0 -lgobject-2.0 -lglib-2.0 -lgobject-2.0 -lbluetooth -lusb-1.0 -lc -lm -Wl,-rpath,/var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0_build/libgammu: /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.1/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmysqlclient root@caiman:/root(20)# ll /usr/lib/libmysql* lrwxrwxrwx 1 root root 20 Nov 22 2012 /usr/lib/libmysqlcppconn.so -> libmysqlcppconn.so.6* lrwxrwxrwx 1 root root 26 Nov 22 2012 /usr/lib/libmysqlcppconn.so.6 -> libmysqlcppconn.so.6.1.1.1* -rwxr-xr-x 1 root root 646184 Nov 22 2012 /usr/lib/libmysqlcppconn.so.6.1.1.1* root@caiman:/root(21)# ll /usr/lib/mysql mysql/ mysql-workbench/ root@caiman:/root(21)# ll /usr/lib/mysql/libmysql* -rw-r--r-- 1 root root 3675212 Jun 29 09:12 /usr/lib/mysql/libmysqlclient.a lrwxrwxrwx 1 root root 16 Jun 29 09:12 /usr/lib/mysql/libmysqlclient_r.a -> libmysqlclient.a lrwxrwxrwx 1 root root 17 Jun 29 09:12 /usr/lib/mysql/libmysqlclient_r.so -> libmysqlclient.so* lrwxrwxrwx 1 root root 17 Jun 29 09:12 /usr/lib/mysql/libmysqlclient_r.so.18 -> libmysqlclient.so* lrwxrwxrwx 1 root root 17 Jun 29 09:12 /usr/lib/mysql/libmysqlclient_r.so.18.0.0 -> libmysqlclient.so* lrwxrwxrwx 1 root root 20 Jun 29 09:12 /usr/lib/mysql/libmysqlclient.so -> libmysqlclient.so.18* lrwxrwxrwx 1 root root 24 Jun 29 09:12 /usr/lib/mysql/libmysqlclient.so.18 -> libmysqlclient.so.18.0.0* -rwxr-xr-x 1 root root 3067304 Jun 29 09:12 /usr/lib/mysql/libmysqlclient.so.18.0.0* -rw-r--r-- 1 root root 19119474 Jun 29 09:12 /usr/lib/mysql/libmysqld.a lrwxrwxrwx 1 root root 15 Jun 29 09:12 /usr/lib/mysql/libmysqld.so -> libmysqld.so.18* lrwxrwxrwx 1 root root 19 Jun 29 09:12 /usr/lib/mysql/libmysqld.so.18 -> libmysqld.so.18.0.0* -rwxr-xr-x 1 root root 11201696 Jun 29 09:12 /usr/lib/mysql/libmysqld.so.18.0.0* -rw-r--r-- 1 root root 4378 Jun 29 09:12 /usr/lib/mysql/libmysqlservices.a I assume that it fails (https://bugs.gentoo.org/show_bug.cgi?id=474952) because 'mysql_config --libs' is not used by configure. root@caiman:/root(23)# mysql_config --libs -L/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lssl -lcrypto -ldl So the -L/usr/lib64/mysql option is missing in the call of gcc above. Chris, do you have a link from /usr/lib/mysql/libmysqld.so to /usr/lib/ ?
It seems that MYSQL_LIBRARIES is set in .../gammu-1.33.0/cmake/FindMySQL.cmake: if (TMP_MYSQL_LIBRARIES) set(MYSQL_LIBRARIES ${TMP_MYSQL_LIBRARIES} CACHE FILEPATH "MySQL Libraries" FORCE) else (TMP_MYSQL_LIBRARIES) set(MYSQL_LIBRARIES ${TMP_MYSQL_LIBRARIES} CACHE FILEPATH "MySQL Libraries") endif (TMP_MYSQL_LIBRARIES) Furthermore there is a block: if(MYSQL_CONFIG) message(STATUS "Using mysql-config: ${MYSQL_CONFIG}") # set INCLUDE_DIR exec_program(${MYSQL_CONFIG} ARGS --include OUTPUT_VARIABLE MY_TMP) string(REGEX REPLACE "-I([^ ]+)( .*)?" "\\1" MY_TMP "${MY_TMP}") set(MYSQL_ADD_INCLUDE_DIR ${MY_TMP} CACHE FILEPATH INTERNAL) # set LIBRARY_DIR exec_program(${MYSQL_CONFIG} ARGS --libs OUTPUT_VARIABLE MY_TMP) set(MYSQL_ADD_LIBRARIES "") string(REGEX MATCHALL "(^| )-l[^ ]+" MYSQL_LIB_LIST "${MY_TMP}") foreach(LIB ${MYSQL_LIB_LIST}) string(REGEX REPLACE "[ ]*-l([^ ]*)" "\\1" LIB "${LIB}") list(APPEND MYSQL_ADD_LIBRARIES "${LIB}") endforeach(LIB ${MYSQL_LIBS}) set(MYSQL_ADD_LIBRARY_PATH "") string(REGEX MATCHALL "-L[^ ]+" MYSQL_LIBDIR_LIST "${MY_TMP}") foreach(LIB ${MYSQL_LIBDIR_LIST}) string(REGEX REPLACE "[ ]*-L([^ ]*)" "\\1" LIB "${LIB}") list(APPEND MYSQL_ADD_LIBRARY_PATH "${LIB}") endforeach(LIB ${MYSQL_LIBS}) else(MYSQL_CONFIG) But it seems me that MYSQL_CONFIG ia never defined in the gammu tree, so I don't understand if this block is executed or. Maybe someone with better knowledge of cmake can help.
(In reply to Juergen Rose from comment #18) > But it seems me that MYSQL_CONFIG ia never defined in the gammu tree, so I > don't understand if this block is executed or. Maybe someone with better > knowledge of cmake can help. The MYSQL_CONFIG is defined: https://github.com/gammu/gammu/blob/master/cmake/FindMySQL.cmake#L19 If that is found, you should see it in cmake's output: https://github.com/gammu/gammu/blob/master/cmake/FindMySQL.cmake#L27 So that's good place where to start (I don't see it in this bug). Of course there might be bug in mysql-config output parsing...
(In reply to Michal Čihař from comment #19) > (In reply to Juergen Rose from comment #18) > > But it seems me that MYSQL_CONFIG ia never defined in the gammu tree, so I > > don't understand if this block is executed or. Maybe someone with better > > knowledge of cmake can help. > > > The MYSQL_CONFIG is defined: > > https://github.com/gammu/gammu/blob/master/cmake/FindMySQL.cmake#L19 > > If that is found, you should see it in cmake's output: > > https://github.com/gammu/gammu/blob/master/cmake/FindMySQL.cmake#L27 > > So that's good place where to start (I don't see it in this bug). > > Of course there might be bug in mysql-config output parsing... I tried once more. First I did: "USE=-mysql emerge gammu" This worked: root@impala:/root(67)# emerge -pvD gammu These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] app-mobilephone/gammu-1.33.0 USE="bash-completion bluetooth curl dbi mysql* nls postgres python usb -debug -irda" LINGUAS="de fr ru -af -ar -bg -ca -cs -da -el -en_GB -es -et -fi -gl -he -hu -id -it -ko -nl -pl -pt_BR -sk -sv -sw -tr -zh_CN -zh_TW" 0 kB Now I try to emerge with mysql USE flag: root@impala:/root(68)# emerge -vD gammu 2>&1 | tee emerge_gammu.log This failes as before with : cd /var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0_build/tests && /usr/bin/cmake -E cmake_link_script CMakeFiles/getint.dir/link.txt --verbose=1 /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmysqlclient collect2: error: ld returned 1 exit status contrib/sqlreply/CMakeFiles/sqlreply.dir/build.make:95: recipe for target 'contrib/sqlreply/sqlreply' failed make[2]: *** [contrib/sqlreply/sqlreply] Error 1 libmysqlclient.so is in /usr/lib/mysql/: root@impala:/root(70)# ll /usr/lib/mysql/libmysqlclient* -rw-r--r-- 1 root root 9016476 Jun 29 2013 /usr/lib/mysql/libmysqlclient.a lrwxrwxrwx 1 root root 16 Jun 29 2013 /usr/lib/mysql/libmysqlclient_r.a -> libmysqlclient.a lrwxrwxrwx 1 root root 17 Jun 29 2013 /usr/lib/mysql/libmysqlclient_r.so -> libmysqlclient.so* lrwxrwxrwx 1 root root 17 Jun 29 2013 /usr/lib/mysql/libmysqlclient_r.so.18 -> libmysqlclient.so* lrwxrwxrwx 1 root root 17 Jun 29 2013 /usr/lib/mysql/libmysqlclient_r.so.18.0.0 -> libmysqlclient.so* lrwxrwxrwx 1 root root 20 Jun 29 2013 /usr/lib/mysql/libmysqlclient.so -> libmysqlclient.so.18* lrwxrwxrwx 1 root root 24 Jun 29 2013 /usr/lib/mysql/libmysqlclient.so.18 -> libmysqlclient.so.18.0.0* -rwxr-xr-x 1 root root 4885211 Jun 29 2013 /usr/lib/mysql/libmysqlclient.so.18.0.0* mysql_config shows this: root@impala:/root(72)# mysql_config --libs -L/usr/lib64/mysql -lmysqlclient -lpthread -lz -lm -lssl -lcrypto -ldl If I grep /var/tmp/portage/app-mobilephone/gammu-1.33.0/temp/build.log for mysql, I see: root@impala:/root(73)# grep mysql /var/tmp/portage/app-mobilephone/gammu-1.33.0/temp/build.log * USE: amd64 bash-completion bluetooth curl dbi elibc_glibc kernel_linux linguas_de linguas_fr linguas_ru mysql nls postgres python usb userland_GNU -- Using mysql-config: /usr/bin/mysql_config -- Found MySQL: /usr/include/mysql, /usr/lib32/libmysqlclient.so;/usr/lib64/libpthread.so;/usr/lib64/libz.so;/usr/lib64/libm.so;/usr/lib64/libssl.so;/usr/lib64/libcrypto.so;/usr/lib64/libdl.so cd /var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0_build/tests && /usr/bin/x86_64-pc-linux-gnu-gcc -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -D_LARGEFILE_SOURCE -DNDEBUG -march=amdfam10 -O2 -pipe -Wall -Werror-implicit-function-declaration -Wno-deprecated-declarations -Wdeclaration-after-statement -Wpointer-arith -Wfloat-equal -Wbad-function-cast -Wmissing-format-attribute -Wmissing-noreturn -Wpointer-arith -Wshadow -Wstrict-prototypes -Wsign-compare -Wno-pointer-sign -Wshadow -Wformat=2 -Wno-format-y2k -Wno-format-nonliteral -fstack-protector -fPIC -Wwrite-strings -Wredundant-decls -I/var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0_build/tests/../include -I/usr/include/mysql -o CMakeFiles/sizes.dir/sizes.c.o -c /var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0/tests/sizes.c cd /var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0_build/contrib/sqlreply && /usr/bin/x86_64-pc-linux-gnu-gcc -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -D_LARGEFILE_SOURCE -DNDEBUG -march=amdfam10 -O2 -pipe -Wall -Werror-implicit-function-declaration -Wno-deprecated-declarations -Wdeclaration-after-statement -Wpointer-arith -Wfloat-equal -Wbad-function-cast -Wmissing-format-attribute -Wmissing-noreturn -Wpointer-arith -Wshadow -Wstrict-prototypes -Wsign-compare -Wno-pointer-sign -Wshadow -Wformat=2 -Wno-format-y2k -Wno-format-nonliteral -fstack-protector -fPIC -Wwrite-strings -Wredundant-decls -I/usr/include/mysql -o CMakeFiles/sqlreply.dir/c/michal.c.o -c /var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0/contrib/sqlreply/c/michal.c cd /var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0_build/tests && /usr/bin/x86_64-pc-linux-gnu-gcc -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -D_LARGEFILE_SOURCE -DNDEBUG -march=amdfam10 -O2 -pipe -Wall -Werror-implicit-function-declaration -Wno-deprecated-declarations -Wdeclaration-after-statement -Wpointer-arith -Wfloat-equal -Wbad-function-cast -Wmissing-format-attribute -Wmissing-noreturn -Wpointer-arith -Wshadow -Wstrict-prototypes -Wsign-compare -Wno-pointer-sign -Wshadow -Wformat=2 -Wno-format-y2k -Wno-format-nonliteral -fstack-protector -fPIC -Wwrite-strings -Wredundant-decls -I/var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0_build/tests/../include -I/usr/include/mysql -o CMakeFiles/array-test.dir/array-test.c.o -c /var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0/tests/array-test.c cd /var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0_build/tests && /usr/bin/x86_64-pc-linux-gnu-gcc -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -D_LARGEFILE_SOURCE -DNDEBUG -march=amdfam10 -O2 -pipe -Wall -Werror-implicit-function-declaration -Wno-deprecated-declarations -Wdeclaration-after-statement -Wpointer-arith -Wfloat-equal -Wbad-function-cast -Wmissing-format-attribute -Wmissing-noreturn -Wpointer-arith -Wshadow -Wstrict-prototypes -Wsign-compare -Wno-pointer-sign -Wshadow -Wformat=2 -Wno-format-y2k -Wno-format-nonliteral -fstack-protector -fPIC -Wwrite-strings -Wredundant-decls -I/var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0_build/tests/../include -I/usr/include/mysql -o CMakeFiles/getint.dir/getint.c.o -c /var/tmp/portage/app-mobilephone/gammu-1.33.0/work/gammu-1.33.0/tests/getint.c /usr/bin/x86_64-pc-linux-gnu-gcc -march=amdfam10 -O2 -pipe -Wall -Werror-implicit-function-declaration -Wno-deprecated-declarations -Wdeclaration-after-statement -Wpointer-arith -Wfloat-equal -Wbad-function-cast -Wmissing-format-attribute -Wmissing-noreturn -Wpointer-arith -Wshadow -Wstrict-prototypes -Wsign-compare -Wno-pointer-sign -Wshadow -Wformat=2 -Wno-format-y2k -Wno-format-nonliteral -fstack-protector -fPIC -Wwrite-strings -Wredundant-decls -Wl,-zrelro -Wl,--as-needed -Wl,-O1 -Wl,--as-needed CMakeFiles/sqlreply.dir/c/michal.c.o -o sqlreply -rdynamic -lmysqlclient -lpthread -lz -lm -lssl -lcrypto -ldl /usr/lib/gcc/x86_64-pc-linux-gnu/4.8.2/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmysqlclient So mysql_config seems to be used, but the part: # set LIBRARY_DIR exec_program(${MYSQL_CONFIG} ARGS --libs OUTPUT_VARIABLE MY_TMP) set(MYSQL_ADD_LIBRARIES "") string(REGEX MATCHALL "(^| )-l[^ ]+" MYSQL_LIB_LIST "${MY_TMP}") foreach(LIB ${MYSQL_LIB_LIST}) string(REGEX REPLACE "[ ]*-l([^ ]*)" "\\1" LIB "${LIB}") list(APPEND MYSQL_ADD_LIBRARIES "${LIB}") endforeach(LIB ${MYSQL_LIBS}) set(MYSQL_ADD_LIBRARY_PATH "") string(REGEX MATCHALL "-L[^ ]+" MYSQL_LIBDIR_LIST "${MY_TMP}") foreach(LIB ${MYSQL_LIBDIR_LIST}) string(REGEX REPLACE "[ ]*-L([^ ]*)" "\\1" LIB "${LIB}") list(APPEND MYSQL_ADD_LIBRARY_PATH "${LIB}") endforeach(LIB ${MYSQL_LIBS}) does not work as expected.
[QA] The mobile-phone herd has been dissolved to maintainer-needed due to absence. This package has no maintainer so this bug may go unnoticed for a long time. Gentoo has a dedicated team[1] for assisting users in maintaining orphaned packages. If you are interested in maintaining this package, please contact proxy-maint@gentoo.org. [1]: https://wiki.gentoo.org/index.php?title=Project:Proxy_Maintainers
The mysql/mariadb builds were recently redone. Is this still an issue?
I have no problem with gammu-1.33.0 versus against dev-db/mariadb-10.0.17. The ebuild currently somehow ignores my USE="-bluetooth" and links with -lbluetooth but I do not mind. # ldd /usr/bin/gammu-detect linux-vdso.so.1 (0x00007ffecb9e9000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f81205e3000) libgobject-2.0.so.0 => /usr/lib64/libgobject-2.0.so.0 (0x00007f8120392000) libGammu.so.7 => /usr/lib64/libGammu.so.7 (0x00007f8120034000) libgudev-1.0.so.0 => /usr/lib64/libgudev-1.0.so.0 (0x00007f8120aec000) libbluetooth.so.3 => /usr/lib64/libbluetooth.so.3 (0x00007f811fe17000) libc.so.6 => /lib64/libc.so.6 (0x00007f811fa7f000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f811f864000) libffi.so.6 => /usr/lib64/libffi.so.6 (0x00007f811f65b000) libusb-1.0.so.0 => /lib64/libusb-1.0.so.0 (0x00007f811f444000) libm.so.6 => /lib64/libm.so.6 (0x00007f811f14b000) libudev.so.1 => /lib64/libudev.so.1 (0x00007f8120ad4000) /lib64/ld-linux-x86-64.so.2 (0x00007f812091a000) librt.so.1 => /lib64/librt.so.1 (0x00007f811ef43000) # ldd /usr/bin/gammu-smsd linux-vdso.so.1 (0x00007ffeaa1ec000) libgsmsd.so.7 => /usr/lib64/libgsmsd.so.7 (0x00007f5056963000) libGammu.so.7 => /usr/lib64/libGammu.so.7 (0x00007f5056605000) libc.so.6 => /lib64/libc.so.6 (0x00007f505626d000) libodbc.so.2 => /usr/lib64/libodbc.so.2 (0x00007f5056007000) libmysqlclient.so.18 => /usr/lib64/libmysqlclient.so.18 (0x00007f5055aa8000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f505588d000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007f5055556000) libbluetooth.so.3 => /usr/lib64/libbluetooth.so.3 (0x00007f5055339000) libusb-1.0.so.0 => /lib64/libusb-1.0.so.0 (0x00007f5055122000) libm.so.6 => /lib64/libm.so.6 (0x00007f5054e29000) /lib64/ld-linux-x86-64.so.2 (0x00007f5056b7a000) libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007f5054c1f000) libz.so.1 => /lib64/libz.so.1 (0x00007f5054a09000) libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007f505479c000) libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007f50543bc000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f50541b8000) libudev.so.1 => /lib64/libudev.so.1 (0x00007f5056d3e000) librt.so.1 => /lib64/librt.so.1 (0x00007f5053fb0000) # equery belongs /usr/lib64/libmysqlclient.so.18 * Searching for /usr/lib64/libmysqlclient.so.18 ... dev-db/mariadb-10.0.17 (/usr/lib64/libmysqlclient.so.18.0.0) dev-db/mariadb-10.0.17 (/usr/lib64/libmysqlclient.so.18 -> libmysqlclient.so.18.0.0) #