I am trying to compile mod_auth_mysql 2.8.1 on Solaris 9 with MySQL 4.0.15 and Apache 2.0.52. When I try to compile the module with apxs -c -L/opt/sfw/mysql/lib/mysql -I/opt/sfw/mysql/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c, I get the following output:
/usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic -DAP_HAVE_DESIGNATED_INITIALIZER -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -g -O2 -pthreads -I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/local/include -I/opt/sfw/mysql/include/mysql -c -o mod_auth_mysql.lo mod_auth_mysql.c && touch mod_auth_mysql.slo
/usr/local/apache2/build/libtool --silent --mode=link gcc -o mod_auth_mysql.la -I/opt/sfw/mysql/include/mysql -L/opt/sfw/mysql/lib/mysql -lmysqlclient -lm -lz -rpath /usr/local/apache2/modules -module -avoid-version mod_auth_mysql.lo
ld: fatal: file /opt/sfw/mysql/lib/mysql/.libs/libmysqlclient.so: open failed: No such file or directory
ld: fatal: File processing errors. No output written to .libs/mod_auth_mysql.so
apxs:Error: Command failed with rc=65536
.
Any advice?
-Kurt Raschke
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It seems you are missing libmysqlclient.so. This is the dynamic runtime library for mysql, and should have come with your copy of MySQL. I'd suggest you follow up on why this one can't be found; does it not exist on your system, or is it not where it can be found at runtime?
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2005-01-21
Well, let's see:
# ls -l /opt/sfw/mysql/lib/mysql/libmysqlclient.so
lrwxrwxrwx 1 root other 24 Dec 25 14:18 /opt/sfw/mysql/lib/mysql/libmysqlclient.so -> libmysqlclient.so.12.0.0
It definitely exists; I think the bigger issue is that ld is looking for it at /opt/sfw/mysql/lib/mysql/.libs/libmysqlclient.so...why? Is that something that apxs is causing?
-Kurt
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
No, apxs isn't doing this - linux itself is. I suspect at one time you had the library in this directory.
If I recall correctly (and I'm not sure I do - I'm not a linux admin), on Debian linux you would need to update /etc/ld.so.conf with the correct paths, then run ldconfig. However, I would suggest you check the doc for your system to make sure it's correct.
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to compile mod_auth_mysql 2.8.1 on Solaris 9 with MySQL 4.0.15 and Apache 2.0.52. When I try to compile the module with apxs -c -L/opt/sfw/mysql/lib/mysql -I/opt/sfw/mysql/include/mysql -lmysqlclient -lm -lz mod_auth_mysql.c, I get the following output:
/usr/local/apache2/build/libtool --silent --mode=compile gcc -prefer-pic -DAP_HAVE_DESIGNATED_INITIALIZER -DSOLARIS2=9 -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -g -O2 -pthreads -I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/local/include -I/opt/sfw/mysql/include/mysql -c -o mod_auth_mysql.lo mod_auth_mysql.c && touch mod_auth_mysql.slo
/usr/local/apache2/build/libtool --silent --mode=link gcc -o mod_auth_mysql.la -I/opt/sfw/mysql/include/mysql -L/opt/sfw/mysql/lib/mysql -lmysqlclient -lm -lz -rpath /usr/local/apache2/modules -module -avoid-version mod_auth_mysql.lo
ld: fatal: file /opt/sfw/mysql/lib/mysql/.libs/libmysqlclient.so: open failed: No such file or directory
ld: fatal: File processing errors. No output written to .libs/mod_auth_mysql.so
apxs:Error: Command failed with rc=65536
.
Any advice?
-Kurt Raschke
Kurt,
It seems you are missing libmysqlclient.so. This is the dynamic runtime library for mysql, and should have come with your copy of MySQL. I'd suggest you follow up on why this one can't be found; does it not exist on your system, or is it not where it can be found at runtime?
Jerry
Well, let's see:
# ls -l /opt/sfw/mysql/lib/mysql/libmysqlclient.so
lrwxrwxrwx 1 root other 24 Dec 25 14:18 /opt/sfw/mysql/lib/mysql/libmysqlclient.so -> libmysqlclient.so.12.0.0
It definitely exists; I think the bigger issue is that ld is looking for it at /opt/sfw/mysql/lib/mysql/.libs/libmysqlclient.so...why? Is that something that apxs is causing?
-Kurt
Kurt,
No, apxs isn't doing this - linux itself is. I suspect at one time you had the library in this directory.
If I recall correctly (and I'm not sure I do - I'm not a linux admin), on Debian linux you would need to update /etc/ld.so.conf with the correct paths, then run ldconfig. However, I would suggest you check the doc for your system to make sure it's correct.
Jerry