Created attachment 361314 [details] build.log configure:12583: checking for mysql_init in -lmysqlclient_r configure:12608: ia64-unknown-linux-gnu-gcc -o conftest -I/usr/include/mysql -pipe -mtune=mckinley -O2 -L/usr/lib -Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu conftest.c -lmysqlclient_r -lcrypto -lz -lpthread -lm >&5 /usr/lib/gcc/ia64-unknown-linux-gnu/4.7.3/../../../../ia64-unknown-linux-gnu/bin/ld: cannot find -lmysqlclient_r collect2: error: ld returned 1 exit status It appears that the library path /usr/lib/mysql was not given to the compiler.
Created attachment 361316 [details] config.log
Temporary workaround: ln -s mysql/libmysqlclient_r.so /usr/lib/
It is rather odd to get this on 5.5.32. The unexpected symlink removal was in 5.5.31 in portage (fixed by a -r1 bump). My config.log shows: configure:12608: x86_64-pc-linux-gnu-gcc -o conftest -I/usr/include/mysql -O2 -pipe -march=native -L/usr/lib64/mysql -Wl,-z,now,--as-needed,-O1,--hash-style=gnu,--sort-common conftest.c -lmysqlclient_r -lcrypto -lz -lpthread -lm >&5 configure:12608: $? = 0 configure:12617: result: yes configure:12627: checking for mysql_thread_init in -lmysqlclient_r configure:12652: x86_64-pc-linux-gnu-gcc -o conftest -I/usr/include/mysql -O2 -pipe -march=native -L/usr/lib64/mysql -Wl,-z,now,--as-needed,-O1,--hash-style=gnu,--sort-common conftest.c -lmysqlclient_r -lmysqlclient_r -lcrypto -lz -lpthread -lm >&5 configure:12652: $? = 0 configure:12617: result: yes And the configure.ac from cacti-spine says: <code> AC_DEFUN([MYSQL_LIB_CHK], [ str="$1/libmysqlclient_r.*" for j in `echo $str`; do if test -r $j; then MYSQL_LIB_DIR=$1 break 2 fi done ] ) for i in $MYSQL_DIR /usr /usr/local /opt /opt/mysql /usr/pkg /usr/local/mysql; do MYSQL_LIB_CHK($i/lib64) MYSQL_LIB_CHK($i/lib64/mysql) MYSQL_LIB_CHK($i/lib) MYSQL_LIB_CHK($i/lib/mysql) done if test -n "$MYSQL_LIB_DIR" ; then LDFLAGS="-L$MYSQL_LIB_DIR $LDFLAGS" fi </code> For some reason, your system is not getting -L/usr/lib/mysql like it should. The only explanation is that there is a bad link or other file of mysqlclient_r.* in /usr/lib. It is a simple check that can fail if /usr/lib/mysqlclient_r.old even exists. Really a call to `mysql_config --libs_r` would be better then random guessing games.
I just checked that there is no libmysqlclient_r.so symlink in /usr/lib and reemerged cacti-spine. The issue is magically gone now...
*mariadb-5.5.31-r1 (18 Jul 2013) 18 Jul 2013; Jorge Manuel B. S. Vicetto <jmbsvicetto@gentoo.org> +mariadb-5.5.31-r1.ebuild: Do a revision bump to avoid packages from not finding libmysqlclient.so - bug 474952.