Closed dreeh closed 10 years ago
Which version or fork of MySQL are you using?
I have dev-db/mysql-5.5.32 installed. is any special USE flag needed?
[I] dev-db/mysql
Available versions: [M]4.0.27-r1 [M]4.1.22-r1 [M]5.0.96 5.1.70 (~)5.5.32 {berkdb big-tables cluster +community debug embedded extraengine jemalloc latin1 max-idx-128 minimal pbxt (+)perl profiling raid selinux ssl static systemtap tcmalloc test xtradb}
Installed versions: 5.5.32(12:24:47 07/26/13)(community latin1 perl ssl -cluster -debug -embedded -extraengine -jemalloc -max-idx-128 -minimal -profiling -selinux -static -systemtap -tcmalloc -test)
Homepage: http://www.mysql.com/
Description: A fast, multi-threaded, multi-user SQL database server.
It looks like a bug: http://bugs.gentoo.org/440918
Do you have libmysqlclient_r.so in the /usr/lib directory? If not, you should create symlink:
cd /usr/lib
ln -s mysql/libmysqlclient_r.so libmysqlclient_r.so
ln -s mysql/libmysqlclient_r.so libmysqlclient_r.so.18
ln -s mysql/libmysqlclient_r.so libmysqlclient_r.so.18.0.0
Also check whether you have libmysqlclient_r.so in the /usr/lib/mysql directory. If not:
cd /usr/lib/mysql
ln -s libmysqlclient.so libmysqlclient_r.so
ln -s libmysqlclient.so libmysqlclient_r.so.18
ln -s libmysqlclient.so libmysqlclient_r.so.18.0.0
i check that already. in /usr/lib i have these files:
# find . -name libmysqlclient_r*
./mysql/libmysqlclient_r.so.18.0.0
./mysql/libmysqlclient_r.a
./mysql/libmysqlclient_r.so
./mysql/libmysqlclient_r.so.18
in /usr/lib/mysql there is a symbolic link for libmysqlclient_r.so:
# ll libmysqlclient_r.so
lrwxrwxrwx 1 root root 17 Jul 26 12:24 libmysqlclient_r.so -> libmysqlclient.so
Have you successfully compiled HHVM? If not, please try the latest version committed just now and let me know.
Thank you for updating it. No, it failed with the same issue. I tried also 2.3.1 and 9999.
Maybe its related to gcc 4.8.2?
I found a solution.
I had to create symbolic links in /usr/lib:
# ln -s ./mysql/libmysqlclient_r.so libmysqlclient_r.so
# ln -s ./mysql/libmysqlclient.so libmysqlclient.so
With this, it compiles. Why this is needed? Do you have an idea to handle this?
When i'm using hhvm, it fails:
$ hhvm
/usr/lib/hhvm/bin/hhvm: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory
After creating a symbilc link in /usr/lib/hhvm/lib:
# ln -s /usr/lib/mysql/libmysqlclient.so.18 libmysqlclient.so.18
it's working.
I think some software created libmysqlclient_r.so in /usr/lib and therefore HHVM uses this directory instead of /usr/lib/mysql because HHVM determines library directory only by location of one file libmysqlclient_r.so and it does not check for existence of another necessary files and/or symlinks. See https://github.com/facebook/hhvm/blob/master/CMake/FindMySQL.cmake#L70 for details.
There is no libmysqlclient_r.so in /usr/lib in my Gentoo installation despite of a lot software installed on the server, but all necessary files are located in /usr/lib/mysql.
I'll close this issue since it already contains a solution for others who hits the same problem.
I have the same issue on Gentoo x86_64: /usr/lib/gcc/x86_64-pc-linux-gnu/4.7.3/../../../../x86_64-pc-linux-gnu/bin/ld: cannot find -lmysqlclient_r . But I have /usr/lib/mysql/libmysqlclient_r.so installed with mariadb package.
build.log: http://bpaste.net/show/174229/ .
I wonder why configure script is referring to lib32: -- MySQL Include dir: /usr/include/mysql library dir: /usr/lib32 Well, I have /usr/lib32/libmysqlclient_r.so file. But the arch is x86_64!
$ ldconfig -p | grep mysql
libmysqlclient_r.so.16 (libc6) => /usr/lib32/libmysqlclient_r.so.16
libmysqlclient_r.so (libc6) => /usr/lib32/libmysqlclient_r.so
libmysqlclient.so.18 (libc6,x86-64) => /usr/lib64/mysql/libmysqlclient.so.18
libmysqlclient.so.16 (libc6) => /usr/lib32/libmysqlclient.so.16
libmysqlclient.so (libc6,x86-64) => /usr/lib64/mysql/libmysqlclient.so
libmysqlclient.so (libc6) => /usr/lib32/libmysqlclient.so
Hello,
i've found your overlay, thats great. Unfortunately i'm not able to compile. After compiling it fails while linking:
Do you have any idea to solve that? Which information do you need?
Thanks, Denny