Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 474952

Summary: [tracker] mysql/mariadb - libmysqlclient.so.18 not found
Product: Gentoo Linux Reporter: Paolo Pedroni <paolo.pedroni>
Component: [OLD] LibraryAssignee: 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
Today I updated my system and after I re-emerged dev-db/mariadb (and revdep-rebuild) I tried to restart akonadi and it failed. I tracked it down to the fact that the /usr/lib64/redland/librdf_storage_mysql.so library can't find libmysqlclient.so.18 anymore:
ldd /usr/lib64/redland/librdf_storage_mysql.so 
        linux-vdso.so.1 (0x00007fff27bff000)
        libmysqlclient.so.18 => not found
        librdf.so.0 => /usr/lib64/librdf.so.0 (0x00007f66b91ae000)
        libc.so.6 => /lib64/libc.so.6 (0x00007f66b8e07000)
        libgcc_s.so.1 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libgcc_s.so.1 (0x00007f66b8bf1000)
        librasqal.so.3 => /usr/lib64/librasqal.so.3 (0x00007f66b8976000)
        libraptor2.so.0 => /usr/lib64/libraptor2.so.0 (0x00007f66b8715000)
        libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007f66b84b7000)
        libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007f66b814f000)
        libltdl.so.7 => /usr/lib64/libltdl.so.7 (0x00007f66b7f45000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f66b962a000)
        libpcre.so.1 => /lib64/libpcre.so.1 (0x00007f66b7cec000)
        libmhash.so.2 => /usr/lib64/libmhash.so.2 (0x00007f66b7abf000)
        libuuid.so.1 => /lib64/libuuid.so.1 (0x00007f66b78ba000)
        libgmp.so.10 => /usr/lib64/libgmp.so.10 (0x00007f66b764b000)
        libm.so.6 => /lib64/libm.so.6 (0x00007f66b735a000)
        libidn.so.11 => /usr/lib64/libidn.so.11 (0x00007f66b7127000)
        libssh2.so.1 => /usr/lib64/libssh2.so.1 (0x00007f66b6efe000)
        libssl.so.1.0.0 => /usr/lib64/libssl.so.1.0.0 (0x00007f66b6c95000)
        libcrypto.so.1.0.0 => /usr/lib64/libcrypto.so.1.0.0 (0x00007f66b68c3000)
        libicuuc.so.51 => /usr/lib64/libicuuc.so.51 (0x00007f66b654f000)
        libxslt.so.1 => /usr/lib64/libxslt.so.1 (0x00007f66b6312000)
        libz.so.1 => /lib64/libz.so.1 (0x00007f66b60fc000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007f66b5ef8000)
        librt.so.1 => /lib64/librt.so.1 (0x00007f66b5cee000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007f66b5ad1000)
        liblzma.so.5 => /lib64/liblzma.so.5 (0x00007f66b58ae000)
        libicudata.so.51 => /usr/lib64/libicudata.so.51 (0x00007f66b4163000)
        libstdc++.so.6 => /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/libstdc++.so.6 (0x00007f66b3e5b000)

I checked the build log for mariadb and I saw that the ebuild removed a bunch of symlinks from /usr/lib64/ to the libraries in /usr/lib64/mysql/.

I then tried to rebuild redland, hoping that it would fix it, but it didn't: it emerged cleanly but librdf_storage_mysql.so still couldn't find libmysqlclient.so.18

There must be something wrong in the link step of redland...

I checked with all the other libraries in the system and it seems it's the only one that's affected

Reproducible: Always

Steps to Reproduce:
1. emerge -1v =mariadb-5.5.31 (latest version, after June 26th)
2. akonadictl restart
Actual Results:  
akonadi doesn't start anymore, /usr/lib64/redland/librdf_storage_mysql.so can't find libmysqlclient.so.18

Expected Results:  
A normal and uneventful upgrade...

I have LTO enabled but I tried without and it does not make a difference.

I will attach the build log for dev-libs/redland ASAP.

# emerge --info
Portage 2.1.12.2 (default/linux/amd64/13.0/desktop/kde, gcc-4.7.3, glibc-2.15-r3, 3.9.7-gentoo x86_64)
=================================================================
System uname: Linux-3.9.7-gentoo-x86_64-Intel-R-_Core-TM-_i7-2600_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    16397368 total,  10571764 free
KiB Swap:    8171516 total,   8171516 free
Timestamp of tree: Thu, 27 Jun 2013 05:45:01 +0000
ld GNU ld (GNU Binutils) 2.22
distcc 3.1 x86_64-pc-linux-gnu [enabled]
ccache version 3.1.9 [enabled]
app-shells/bash:          4.2_p45
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r3, 3.2.3-r2
dev-util/ccache:          3.1.9
dev-util/cmake:           2.8.10.2-r2
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.2
sys-apps/openrc:          0.11.8
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.22-r1
sys-devel/gcc:            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 x-portage
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=corei7-avx -O2 -pipe -fomit-frame-pointer -flto=8"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt"
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/cgi-php5.4/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=corei7-avx -O2 -pipe -fomit-frame-pointer -flto=8"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going y --with-bdeps y"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs ccache compress-build-logs config-protect-if-modified distcc distlocks ebuild-locks merge-sync news parallel-fetch protect-owned sandbox sfperms split-elog split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.wheel.sk/ http://gentoo.mneisen.org/ ftp://mirror.netcologne.de/gentoo/ ftp://gentoo.wheel.sk/pub/linux/gentoo/ http://tux.rainside.sk/gentoo/"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -flto=8"
MAKEOPTS="-j11"
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="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X a52 aac aalib acl acpi adns alsa amd64 ao audiofile bash-completion bluetooth branding bzip2 cairo caps cdda cddb cdparanoia cdr cli consolekit cracklib crypt css cups curl cxx dbus declarative dga djvu dri dts dvd dvdr emboss encode exif expat fam fbcon ffmpeg fftw firefox flac fontconfig foomaticdb fortran ftp gd gdbm geoip ggi gif gimp gmp gnutls gphoto2 gpm graphviz gstreamer gtk handbook iconv icu idn ieee1394 imagemagick imlib ipv6 java jbig jpeg jpeg2k kde kipi lame lcms libcaca libnotify libsamplerate lm_sensors lua lzma lzo mad mmap mmx mng modules mp3 mp4 mpeg mplayer mudflap multilib musicbrainz ncurses nls nptl nsplugin offensive ogg openal openexr opengl openmp pam pango pcre pdf phonon plasma png policykit postscript ppds qt3support qt4 rdesktop readline recode sdl semantic-desktop session smartcard sndfile sockets speex spell sqlite sqlite3 sse sse2 ssl startup-notification subversion svg symlink syslog sysvipc taglib tcpd theora threads tidy tiff truetype udev udisks unicode upower usb vcd vim-syntax vnc vorbis win32codecs wmf wxwidgets x264 xattr xcb xcomposite xinerama xml xpm xscreensaver xv xvid yahoo zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel virmidi" 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" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="kodak 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-minimizer nlpsolver" LINGUAS="it" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-3" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="radeon r600" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Paolo Pedroni 2013-06-27 08:49:43 UTC
Created attachment 352060 [details]
Build log for dev-libs/redland-1.0.16
Comment 2 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-06-27 10:44:56 UTC
> 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?
Comment 3 Paolo Pedroni 2013-06-27 12:23:14 UTC
(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.
Comment 4 Guillaume Castagnino 2013-06-27 12:49:02 UTC
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
Comment 5 Paolo Pedroni 2013-06-27 13:33:13 UTC
(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?
Comment 6 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2013-06-27 15:54:55 UTC
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.
Comment 7 Bernard Cafarelli gentoo-dev 2013-06-27 16:22:41 UTC
*** Bug 474980 has been marked as a duplicate of this bug. ***
Comment 8 Brian Evans (RETIRED) gentoo-dev 2013-06-27 16:27:04 UTC
(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
Comment 9 Bernard Cafarelli gentoo-dev 2013-06-27 16:35:11 UTC
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
Comment 10 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2013-06-27 17:48:49 UTC
(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.
Comment 11 Patrick Lauer gentoo-dev 2013-06-28 07:49:49 UTC
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)
Comment 12 Johannes Huber (RETIRED) gentoo-dev 2013-06-28 17:06:20 UTC
*** Bug 474964 has been marked as a duplicate of this bug. ***
Comment 13 Johannes Huber (RETIRED) gentoo-dev 2013-06-28 21:50:52 UTC
*** Bug 475092 has been marked as a duplicate of this bug. ***
Comment 14 Johannes Huber (RETIRED) gentoo-dev 2013-06-28 22:02:05 UTC
*** Bug 475070 has been marked as a duplicate of this bug. ***
Comment 15 Johannes Huber (RETIRED) gentoo-dev 2013-06-28 22:06:56 UTC
*** Bug 474996 has been marked as a duplicate of this bug. ***
Comment 16 Johannes Huber (RETIRED) gentoo-dev 2013-06-28 22:09:36 UTC
*** Bug 474928 has been marked as a duplicate of this bug. ***
Comment 17 Julian Ospald 2013-07-02 12:55:05 UTC
*** Bug 475492 has been marked as a duplicate of this bug. ***
Comment 18 CBke -Left- bye 2013-07-07 23:48:02 UTC
*** Bug 475996 has been marked as a duplicate of this bug. ***
Comment 19 Juergen Rose 2013-07-13 13:34:02 UTC
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).
Comment 20 Alexander Tsoy 2013-07-22 16:43:14 UTC
(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.
Comment 21 Jeroen Roovers (RETIRED) gentoo-dev 2013-07-23 14:06:47 UTC
"There could be quite a few packages affected"
"many packages that don't use autoconf"
Comment 22 Alexander Tsoy 2013-07-23 14:48:57 UTC
(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.
Comment 23 Tom Wijsman (TomWij) (RETIRED) gentoo-dev 2013-08-16 11:49:24 UTC
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.
Comment 24 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2013-10-08 03:03:26 UTC
@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?
Comment 25 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-01-19 18:11:46 UTC
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.
Comment 26 Jorge Manuel B. S. Vicetto (RETIRED) Gentoo Infrastructure gentoo-dev 2014-04-25 00:30:45 UTC
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.