Summary: | [tracker] mysql/mariadb - libmysqlclient.so.18 not found | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Paolo Pedroni <paolo.pedroni> |
Component: | [OLD] Library | Assignee: | Gentoo Linux MySQL bugs team <mysql-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | admwiggin, alexander, alexandref75, alunduil, candrews, casta, cbatdotcom, gregg.casillo, jlp.bugs, josef64, KeithBHarrison, mysql-bugs, patrick, rose, serge.ratke, ulenrich, vylaern |
Priority: | Normal | Keywords: | Tracker |
Version: | 10.1 | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: |
https://bugs.gentoo.org/show_bug.cgi?id=474964 https://bugs.gentoo.org/show_bug.cgi?id=477638 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 474800, 477638, 477792, 481304, 488588 | ||
Attachments: | Build log for dev-libs/redland-1.0.16 |
Description
Paolo Pedroni
2013-06-27 08:46:26 UTC
Created attachment 352060 [details]
Build log for dev-libs/redland-1.0.16
> I have LTO enabled but I tried without and it does not make a difference. Did you try to rebuild the dependencies without LTO as well? LTO doesn't only cause problems with a package itself, but might also yield silent problems that can result in problems for reverse dependencies; an example of this is bug #453938. In this case LTO may have not produced the .so file. Are there any other libmysqlclient.so.* files present there? (In reply to Tom Wijsman (TomWij) from comment #2) > > I have LTO enabled but I tried without and it does not make a difference. > > Did you try to rebuild the dependencies without LTO as well? Which ones: # equery g =dev-libs/redland-1.0.16 * Searching for redland1.0.16 in dev-libs ... * dependency graph for dev-libs/redland-1.0.16 `-- dev-libs/redland-1.0.16 amd64 `-- sys-devel/libtool-2.4-r1 (>=sys-devel/libtool-2.2.6b) amd64 `-- virtual/mysql-5.5 (virtual/mysql) ~amd64 `-- dev-db/sqlite-3.7.16.2 (=dev-db/sqlite-3*) amd64 `-- sys-libs/db-4.8.30 (sys-libs/db) amd64 `-- dev-libs/libxml2-2.9.0-r2 (dev-libs/libxml2) amd64 `-- dev-libs/expat-2.1.0-r2 (>=dev-libs/expat-2) amd64 `-- dev-libs/openssl-1.0.1c (dev-libs/openssl) amd64 `-- media-libs/raptor-2.0.9 (>=media-libs/raptor-2.0.7) amd64 `-- dev-libs/rasqal-0.9.29 (>=dev-libs/rasqal-0.9.28) amd64 `-- dev-db/postgresql-base-9.2.4 (dev-db/postgresql-base) amd64 `-- dev-db/libiodbc-3.52.7-r1 (dev-db/libiodbc) ~amd64 `-- dev-db/unixODBC-2.3.1 (dev-db/unixODBC) amd64 `-- virtual/pkgconfig-0 (virtual/pkgconfig) amd64 [ dev-libs/redland-1.0.16 stats: packages (14), max depth (1) ] dev-db/mariadb is already built without LTO I have now rebuilt redland, raptor and rasqal without LTO (berkdb, postgresql, sqlite are not in my USE flags for redland and expat/libxml2 have nothing to do with this AFAIK) and nothing changed. > > LTO doesn't only cause problems with a package itself, but might also yield > silent problems that can result in problems for reverse dependencies; an > example of this is bug #453938. In this case LTO may have not produced the > .so file. They were not actual files (and mariadb was built without LTO anyway), just symlinks from /usr/lib64/mysql/libmysqld* and /usr/lib64/libmysqlclient* to /usr/lib64/ This is an excerpt from the dev-db/mariadb-5.5.31 rebuild that triggered the problem: [snip] --- replaced obj /usr/lib64/mysql/libmysqlservices.a --- replaced obj /usr/lib64/mysql/libmysqld.so.18 --- replaced sym /usr/lib64/mysql/libmysqld.so --- replaced obj /usr/lib64/mysql/libmysqld.a --- replaced sym /usr/lib64/mysql/libmysqlclient_r.so.18.0.0 --- replaced sym /usr/lib64/mysql/libmysqlclient_r.so.18 --- replaced sym /usr/lib64/mysql/libmysqlclient_r.so --- replaced sym /usr/lib64/mysql/libmysqlclient_r.a --- replaced obj /usr/lib64/mysql/libmysqlclient.so.18.0.0 --- replaced sym /usr/lib64/mysql/libmysqlclient.so.18 --- replaced sym /usr/lib64/mysql/libmysqlclient.so --- replaced obj /usr/lib64/mysql/libmysqlclient.a --- replaced dir /usr/lib64/mysql <<< sym /usr/lib64/libmysqld.so.18 <<< sym /usr/lib64/libmysqld.so <<< sym /usr/lib64/libmysqld <<< sym /usr/lib64/libmysqlclient.so.18.0.0 <<< sym /usr/lib64/libmysqlclient.so.18.0 <<< sym /usr/lib64/libmysqlclient.so.18 <<< sym /usr/lib64/libmysqlclient.so <<< sym /usr/lib64/libmysqlclient --- replaced dir /usr/lib64 --- replaced obj /usr/include/mysql/typelib.h --- replaced obj /usr/include/mysql/sslopt-vars.h --- replaced obj /usr/include/mysql/sslopt-longopts.h --- replaced obj /usr/include/mysql/sslopt-case.h --- replaced obj /usr/include/mysql/sql_state.h --- replaced obj /usr/include/mysql/sql_common.h [snip] See the symlinks being removed? I don't think LTO can cause this. > > Are there any other libmysqlclient.so.* files present there? # find / -iname libmysqlclient* /usr/lib64/mysql/libmysqlclient_r.a /usr/lib64/mysql/libmysqlclient.so.18 /usr/lib64/mysql/libmysqlclient_r.so /usr/lib64/mysql/libmysqlclient_r.so.18.0.0 /usr/lib64/mysql/libmysqlclient.a /usr/lib64/mysql/libmysqlclient_r.so.18 /usr/lib64/mysql/libmysqlclient.so /usr/lib64/mysql/libmysqlclient.so.18.0.0 So no. I think that this is a problem with the link step in the redland ebuild: it links to /usr/lib64/mysql/libmysqlclient.so.18 but at runtime it tries to find the library in /usr/lib64/libmysqlclient.so.18 (if I manually put a symlink there, everything works): it worked until today because the mariadb ebuild put those symlinks in /usr/lib64/ but now that it doesn't it breaks. I have the same issue with the QtSQL mysql connector after rebuilding mysql this morning: # ldd /usr/lib64/qt4/plugins/sqldrivers/libqsqlmysql.so linux-vdso.so.1 (0x00007fffd2bb4000) libmysqlclient.so.18 => not found libQtSql.so.4 => /usr/lib64/qt4/libQtSql.so.4 (0x00007fd1d5a36000) libQtCore.so.4 => /usr/lib64/qt4/libQtCore.so.4 (0x00007fd1d5560000) libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libstdc++.so.6 (0x00007fd1d5259000) libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libgcc_s.so.1 (0x00007fd1d5042000) libc.so.6 => /lib64/libc.so.6 (0x00007fd1d4c9a000) librt.so.1 => /lib64/librt.so.1 (0x00007fd1d4a92000) libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007fd1d476f000) libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fd1d4553000) libz.so.1 => /lib64/libz.so.1 (0x00007fd1d433d000) libdl.so.2 => /lib64/libdl.so.2 (0x00007fd1d4138000) libm.so.6 => /lib64/libm.so.6 (0x00007fd1d3e3c000) /lib64/ld-linux-x86-64.so.2 (0x00007fd1d5eb8000) A workaround is to add /usr/lib64/mysql to /etc/ld.so.conf and run ldconfig (In reply to Guillaume Castagnino from comment #4) > I have the same issue with the QtSQL mysql connector after rebuilding mysql > this morning: > > # ldd /usr/lib64/qt4/plugins/sqldrivers/libqsqlmysql.so > linux-vdso.so.1 (0x00007fffd2bb4000) > libmysqlclient.so.18 => not found > libQtSql.so.4 => /usr/lib64/qt4/libQtSql.so.4 (0x00007fd1d5a36000) > libQtCore.so.4 => /usr/lib64/qt4/libQtCore.so.4 (0x00007fd1d5560000) > libstdc++.so.6 => > /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libstdc++.so.6 (0x00007fd1d5259000) > libgcc_s.so.1 => > /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libgcc_s.so.1 (0x00007fd1d5042000) > libc.so.6 => /lib64/libc.so.6 (0x00007fd1d4c9a000) > librt.so.1 => /lib64/librt.so.1 (0x00007fd1d4a92000) > libglib-2.0.so.0 => /usr/lib64/libglib-2.0.so.0 (0x00007fd1d476f000) > libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fd1d4553000) > libz.so.1 => /lib64/libz.so.1 (0x00007fd1d433d000) > libdl.so.2 => /lib64/libdl.so.2 (0x00007fd1d4138000) > libm.so.6 => /lib64/libm.so.6 (0x00007fd1d3e3c000) > /lib64/ld-linux-x86-64.so.2 (0x00007fd1d5eb8000) > > > > A workaround is to add /usr/lib64/mysql to /etc/ld.so.conf and run ldconfig Yeah, that would explain some other issues I had, I only checked libraries in /usr/lib64/*/ and didn't think to look further in the file hierarchy. So it looks like it's mariadb's fault for removing the symlinks and not adding its directory to /etc/ld.so.conf, am I right? Any package trying to link to libmysqlclient.so that doesn't use mysql_config / mariadb_config is failing to build since yesterday's update to the tree where we stopped installing symlinks to libs in /usr/lib/mysql. I'm currently updating the mysql-cmake.eclass to add the path to LDPATH. In the meantime, anyone needing a workaround just needs to add "/usr/lib/mysql" to /etc/ld.so.conf and run ldconfig. *** Bug 474980 has been marked as a duplicate of this bug. *** (In reply to Jorge Manuel B. S. Vicetto from comment #6) > Any package trying to link to libmysqlclient.so that doesn't use > mysql_config / mariadb_config is failing to build since yesterday's update > to the tree where we stopped installing symlinks to libs in /usr/lib/mysql. > I'm currently updating the mysql-cmake.eclass to add the path to LDPATH. In > the meantime, anyone needing a workaround just needs to add "/usr/lib/mysql" > to /etc/ld.so.conf and run ldconfig. Jorge: I've added that fix to the mysql overlay if you want to copy over mysql-cmake.eclass There could be quite a few packages affected, a quick test on my (stable x86) server show that both mail-mta/postfix and mail-filter/dspam fail to emerge with USE=mysql (I restored the symlinks after that). This should be fixed before stabling mariadb-5.5 (In reply to Bernard Cafarelli from comment #9) > There could be quite a few packages affected, a quick test on my (stable > x86) server show that both mail-mta/postfix and mail-filter/dspam fail to > emerge with USE=mysql (I restored the symlinks after that). This should be > fixed before stabling mariadb-5.5 The issue is related to the eclasses, not mysql or mariadb. A fix based on Brian's commit was pushed to the tree. I'm leaving this bug open for now so anyone hitting this issue can find this bug. Thank you very much for wasting my time! On rebuild everything breaks, and rare packages like php, postfix etc. just fail. It's horribly funny to debug: # ldd -r `which indexer` undefined symbol: mysql_close (/usr/bin/indexer) linux-vdso.so.1 (0x00007ffff8bff000) libmysqlclient.so.18 => not found libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f76df5a7000) libz.so.1 => /lib64/libz.so.1 (0x00007f76df391000) librt.so.1 => /lib64/librt.so.1 (0x00007f76df188000) libdl.so.2 => /lib64/libdl.so.2 (0x00007f76def84000) libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007f76ded59000) libm.so.6 => /lib64/libm.so.6 (0x00007f76dea63000) libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libstdc++.so.6 (0x00007f76de75f000) libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.3/libgcc_s.so.1 (0x00007f76de549000) libc.so.6 => /lib64/libc.so.6 (0x00007f76de1a1000) /lib64/ld-linux-x86-64.so.2 (0x00007f76df7c4000) undefined symbol: mysql_fetch_lengths (/usr/bin/indexer) undefined symbol: mysql_free_result (/usr/bin/indexer) undefined symbol: mysql_use_result (/usr/bin/indexer) undefined symbol: mysql_num_rows (/usr/bin/indexer) undefined symbol: mysql_num_fields (/usr/bin/indexer) undefined symbol: mysql_next_result (/usr/bin/indexer) undefined symbol: mysql_real_connect (/usr/bin/indexer) undefined symbol: mysql_query (/usr/bin/indexer) undefined symbol: mysql_ssl_set (/usr/bin/indexer) undefined symbol: mysql_fetch_row (/usr/bin/indexer) undefined symbol: mysql_error (/usr/bin/indexer) undefined symbol: mysql_fetch_fields (/usr/bin/indexer) undefined symbol: mysql_errno (/usr/bin/indexer) undefined symbol: mysql_init (/usr/bin/indexer) *** Bug 474964 has been marked as a duplicate of this bug. *** *** Bug 475092 has been marked as a duplicate of this bug. *** *** Bug 475070 has been marked as a duplicate of this bug. *** *** Bug 474996 has been marked as a duplicate of this bug. *** *** Bug 474928 has been marked as a duplicate of this bug. *** *** Bug 475492 has been marked as a duplicate of this bug. *** *** Bug 475996 has been marked as a duplicate of this bug. *** How is status of this bug? Is it fixed? After reemerging mysql I could also emerge qtsql-4.8.4, akonadi-server-1.10.0-r1, redland-1.0.16, soprano-2.9.3, mysql-python-1.2.3-r1 and libreoffice-l10n-4.1.0.2. Only emerge of paraview-4.0.1 fails (Bug 475492). (In reply to Jorge Manuel B. S. Vicetto from comment #10) > A fix based on Brian's commit was pushed to the tree. I'm leaving this bug > open for now so anyone hitting this issue can find this bug. Unfortunately, many packages that don't use autoconf and co still fails (exim and luadbi doesn't compile on my system). Changing ebuilds to use mysql_config fixes compilation. "There could be quite a few packages affected" "many packages that don't use autoconf" (In reply to Jeroen Roovers from comment #21) > "many packages that don't use autoconf" That because configure scripts in most packages have logic to find mysql libdir: by using mysql_config or by probing several standard directories. AFAIK, ld.so.conf is used only by dynamic linker at runtime. So probably bug 475492 is not a dublicate of this one. Experienced this again, is it supposed to stay in this way and be dealt with a workaround? I assume not, bump to just remind you that people see this regularly. @mysql: So, shall we keep the current behaviour and stop linking any of the libs to /usr/lib, should we revert to the old behaviour or should we provide a symlink only for libmysqlclient? I've done a patch for mariadb cmake with the help of Brian Evans that will move client libs back to /usr/lib* and put the embedded libs on /usr/lib*/mysql. I'm still testing it and will push it to the overlay soon. This should finally let us close this bug report. I'm closing this bug as the work we've done on this was pushed to the tree. Feel free to reopen this bug if you hit this again. |