If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Warning! dlname not found in /usr/local/apache/modules/mod_auth_mysql.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/mod_auth_mysql.so
chmod: getting attributes of `/usr/local/apache/modules/mod_auth_mysql.so': No such file or directory
apxs:Error: Command failed with rc=65536
I can see the same error in another Threads but nobody says something of how to fix it :(
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This might be the problem. I'm using libtool 1.4.3, dated 2002/10/23. This is the one which comes with Apache2 in your /usr/local/apache/build directory.
I suspect it is picking up the libtool in your /usr/bin directory (or maybe /usr/share).
Try using the one which came with Apache and see if it works.
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Warning! dlname not found in /usr/local/apache/modules/mod_auth_mysql.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/mod_auth_mysql.so
chmod: getting attributes of `/usr/local/apache/modules/mod_auth_mysql.so': No such file or directory
apxs:Error: Command failed with rc=65536
Again, i have the same problem and seems that a "cp" stament is missing :(
I will continue testing
Jesus
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I haven't forgotten you - I'm trying to find an answer to your problem. Unfortunately, so far, no luck,
I will be leaving on a business trip tomorrow morning, so it may take a few days. I'll have my laptop with me, but have limited time to work on things.
I'll get back to you as soon as I can find anything out.
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Another person brought up the question: what's the contents of your .libs directory after running the first and second steps? Did the .so actually get created and not copied, or did it not get created at all?
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Warning! dlname not found in /usr/local/apache/modules/mod_auth_mysql.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/mod_auth_mysql.so
chmod: getting attributes of `/usr/local/apache/modules/mod_auth_mysql.so': No such file or directory
apxs:Error: Command failed with rc=65536
.
srv1:/usr/local/src/mod_auth_mysql-2.7.0#
And, now another ls -laR:
srv1:/usr/local/src/mod_auth_mysql-2.7.0# ls -laR
.:
total 160
drwxr-sr-x 3 root staff 4096 Nov 16 18:36 .
drwxrwsr-x 13 root staff 4096 Nov 16 18:35 ..
drwxr-sr-x 2 root staff 4096 Nov 16 18:36 .libs
-rw-r--r-- 1 alias 1002 11680 Nov 1 20:01 README
-rw-r--r-- 1 alias 1002 36173 Nov 1 20:08 mod_auth_mysql.c
-rw-r--r-- 1 root staff 783 Nov 16 18:36 mod_auth_mysql.la
-rw-r--r-- 1 root staff 10 Nov 16 18:36 mod_auth_mysql.lo
-rw-r--r-- 1 root staff 90080 Nov 16 18:36 mod_auth_mysql.o
-rw-r--r-- 1 root staff 0 Nov 16 18:36 mod_auth_mysql.slo
./.libs:
total 108
drwxr-sr-x 2 root staff 4096 Nov 16 18:36 .
drwxr-sr-x 3 root staff 4096 Nov 16 18:36 ..
-rw-r--r-- 1 root staff 90312 Nov 16 18:36 mod_auth_mysql.a
lrwxr-xr-x 1 root staff 20 Nov 16 18:36 mod_auth_mysql.la -> ../mod_auth_mysql.la
-rw-r--r-- 1 root staff 783 Nov 16 18:36 mod_auth_mysql.lai
srv1:/usr/local/src/mod_auth_mysql-2.7.0#
I hope that this help someone to try to "help" me ;)
Regards.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the delay, but I'm back in the office for a short week.
Ok, this does help.
The problem is the first step is not creating the .so file. When I did it on my system, I got a .lib/mod_auth_mysql.so created. So, if it's not created, it can't be copied (obvious, isn't it? :-) ).
The from the apxs command looks ok, so I guess we'll have to get more info.
First of all -what's the output from a
ld --version
command? Perhaps you have a back-level linker?
Next - try adding the option
-Wc,-Wall
(no spaces) in the first step. This will pass -Wall on to gcc; there should be no warnings. But perhaps something isn't showing up?
If this doesn't work, try adding
-Wl,--verbose
(again, no spaces) to the step. This will give a bunch of output; you may need to redirect stderr to a file.
The main things are the first few lines - expecially the SEARCH_DIR directories; are they correct?
Also, if you go further down, you'll find attempts to open several library files. Some won't succeed - that's normal. But when they do succeed (and all have to, eventually), are they loading the correct version of that library (i.e. from the correct directory)?
If you don't see anything unusual, try sending me the output of this step via email (it's too big for the forum) and I'll compare with what I have on my side.
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
srv1:/usr/local/src/mod_auth_mysql-2.7.0# ld --version
GNU ld version 2.12.90.0.1 20020307 Debian/GNU Linux
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
I not sure about the next step, you say that i need to do this:
Just to make sure - for the -Wl option, you are using a lower case 'L' instead of an upper case 'I', correct?
The compile step looks fine - I really didn't expect to see anything here, but wanted to be positive.
However, with the -Wl--verbose option, I get almost 300 lines of output to stderr from the linker - all of them informational messages.
Right now it looks like ld isn't being called - but I don't know why. No answer back yet from some queries I've put out, and searching Google has seen others with this problem but no solution yet.
I'm still looking, though. Please be patient with me. I dont' know any more about this than you :-) !
Jerry
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Sorry for the short delay - I've been fooling with libtool a bit.
First of all - what do you get if you enter this command?
/usr/local/apache/build/libtool --config
(Again, you might want to capture the output - should be about 250 lines).
Of particular interest would be "library_names_spec" and "soname_spec". "build_libtool_libs" may also affect it - I'm not sure exactly what that one does.
Otherwise, does everything else look OK for your system? Again - if you're not sure, you can email me the output and I'll compare it with a working one.
One other thought - what happens if you enter the two libtool commands from the command line without the --silent option? The results I get are:
(Directory before starting)
drwxr-xr-x 2 root root 4096 Nov 24 09:45 .
drwxr-xr-x 12 developm developm 4096 Nov 23 11:11 ..
-rw-r--r-- 1 root root 11680 Nov 10 12:56 README
-rw-r--r-- 1 root root 36171 Nov 10 12:57 mod_auth_mysql.c
Hi all,
Im trying to compile "mod_auth_mysql-2.7.0" in a Debian Machine with Apache 2.0.50 and Mysql 4.0.20.
I try this one:
apxs -c -D APACHE2 -I/usr/local/mysql/include/mysql/ -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lm -lz mod_auth_mysql.c
whith this result:
/usr/local/apache/build/libtool --silent --mode=compile gcc -prefer-pic -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/mysql/include/mysql/ -DAPACHE2 -c -o mod_auth_mysql.lo mod_auth_mysql.c && touch mod_auth_mysql.slo
/usr/local/apache/build/libtool --silent --mode=link gcc -o mod_auth_mysql.la -I/usr/local/mysql/include/mysql/ -DAPACHE2 -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lm -lz -rpath /usr/local/apache/modules -module -avoid-version mod_auth_mysql.lo
And i have now:
srv1:/usr/local/src/mod_auth_mysql/mod_auth_mysql-2.7.0# ls -la
total 160
drwxr-sr-x 3 root root 4096 Nov 11 13:32 .
drwxr-sr-x 3 root staff 4096 Nov 11 10:32 ..
drwxr-sr-x 2 root root 4096 Nov 11 13:32 .libs
-rw-r--r-- 1 root root 11680 Nov 1 20:01 README
-rw-r--r-- 1 root root 36173 Nov 1 20:08 mod_auth_mysql.c
-rw-r--r-- 1 root root 783 Nov 11 13:32 mod_auth_mysql.la
-rw-r--r-- 1 root root 10 Nov 11 13:32 mod_auth_mysql.lo
-rw-r--r-- 1 root root 90112 Nov 11 13:32 mod_auth_mysql.o
-rw-r--r-- 1 root root 0 Nov 11 13:32 mod_auth_mysql.slo
srv1:/usr/local/src/mod_auth_mysql/mod_auth_mysql-2.7.0#
then i make the next steep:
srv1:/usr/local/src/mod_auth_mysql/mod_auth_mysql-2.7.0# apxs -i mod_auth_mysql.la
/usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' mod_auth_mysql.la /usr/local/apache/modules
/usr/local/apache/build/libtool --mode=install cp mod_auth_mysql.la /usr/local/apache/modules/
cp .libs/mod_auth_mysql.lai /usr/local/apache/modules/mod_auth_mysql.la
cp .libs/mod_auth_mysql.a /usr/local/apache/modules/mod_auth_mysql.a
ranlib /usr/local/apache/modules/mod_auth_mysql.a
chmod 644 /usr/local/apache/modules/mod_auth_mysql.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/apache/modules
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/apache/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Warning! dlname not found in /usr/local/apache/modules/mod_auth_mysql.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/mod_auth_mysql.so
chmod: getting attributes of `/usr/local/apache/modules/mod_auth_mysql.so': No such file or directory
apxs:Error: Command failed with rc=65536
I can see the same error in another Threads but nobody says something of how to fix it :(
Hello, Jesus,
No, we never got feedback on if the person got it working, and if so, what he did.
Your problem is the same; you're missing a cp command in the second step.
One thought here - do you have more than one copy of libtool on your system? And what version number are you using (libtool --version)?
Jerry
Hi all,
The version of Libtool:
srv1:~# libtool --version
ltmain.sh (GNU libtool) 1.4.2a (1.922.2.79 2001/11/28 21:50:31)
A Updatedb and locate command:
srv1:~# updatedb
srv1:~# locate libtool
/downloads/qmailrocks/clamav-0.73/libtool
/root/gd-2.0.28/libtool
/root/httpd-2.0.52/srclib/apr/build/aplibtool.c
/root/httpd-2.0.52/srclib/apr/build/libtool.m4
/root/jpeg-6b/libtool
/usr/bin/libtool
/usr/bin/libtoolize
/usr/doc/libtool
/usr/local/apache/build/libtool
/usr/local/src/httpd-2.0.50/srclib/apr-util/xml/expat/libtool
/usr/local/src/httpd-2.0.50/srclib/apr/build/aplibtool.c
/usr/local/src/httpd-2.0.50/srclib/apr/build/libtool.m4
/usr/local/src/httpd-2.0.50/srclib/apr/libtool
/usr/local/src/mysql-4.0.20/innobase/libtool
/usr/local/src/mysql-4.0.20/libtool
/usr/local/src/php-4.3.7/libtool
/usr/share/aclocal/libtool.m4
/usr/share/doc/libtool
/usr/share/doc/libtool/changelog.Debian.gz
/usr/share/doc/libtool/copyright
/usr/share/doc/libtool/README.Debian
/usr/share/libtool
/usr/share/libtool/config.guess
/usr/share/libtool/config.sub
/usr/share/libtool/install-sh
/usr/share/libtool/libltdl
/usr/share/libtool/libltdl/acinclude.m4
/usr/share/libtool/libltdl/aclocal.m4
/usr/share/libtool/libltdl/config-h.in
/usr/share/libtool/libltdl/configure
/usr/share/libtool/libltdl/configure.in
/usr/share/libtool/libltdl/COPYING.LIB
/usr/share/libtool/libltdl/ltdl.c
/usr/share/libtool/libltdl/ltdl.h
/usr/share/libtool/libltdl/Makefile.am
/usr/share/libtool/libltdl/Makefile.in
/usr/share/libtool/libltdl/README
/usr/share/libtool/libltdl/stamp-h.in
/usr/share/libtool/ltmain.sh
/usr/share/libtool/missing
/usr/share/libtool/mkinstalldirs
/usr/share/man/man1/libtool.1.gz
/usr/share/man/man1/libtoolize.1.gz
/var/cache/apt/archives/libtool_1.4.2-4_i386.deb
/var/lib/dpkg/info/libtool.list
/var/lib/dpkg/info/libtool.md5sums
/var/lib/dpkg/info/libtool.postinst
/var/lib/dpkg/info/libtool.prerm
Thx for all possible help ;)
Jesus,
This might be the problem. I'm using libtool 1.4.3, dated 2002/10/23. This is the one which comes with Apache2 in your /usr/local/apache/build directory.
I suspect it is picking up the libtool in your /usr/bin directory (or maybe /usr/share).
Try using the one which came with Apache and see if it works.
Jerry
Hi All,
I have some changes to test the idea of Jerry.
I renamed the /usr/bin/libtool to /usr/bin/libtool.orig and then link the libtool from the apache Build directory:
mv /usr/bin/libtool /usr/bin/libtool.orig
ln -s /usr/local/apache/build/libtool /usr/bin/libtool
Then, i tried to compile again:
cd /usr/local/src/mod_auth_mysql-2.7.0/
# apxs -c -D APACHE2 -I/usr/local/mysql/include/mysql/ -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lm -lz mod_auth_mysql.c
apxs -c -D APACHE2 -I/usr/local/mysql/include/mysql/ -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lm -lz mod_auth_mysql.c
/usr/local/apache/build/libtool --silent --mode=compile gcc -prefer-pic -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/mysql/include/mysql/ -DAPACHE2 -c -o mod_auth_mysql.lo mod_auth_mysql.c && touch mod_auth_mysql.slo
/usr/local/apache/build/libtool --silent --mode=link gcc -o mod_auth_mysql.la -I/usr/local/mysql/include/mysql/ -DAPACHE2 -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lm -lz -rpath /usr/local/apache/modules -module -avoid-version mod_auth_mysql.lo
then i do the "horrible" next steep ;)
#apxs -i mod_auth_mysql.la
/usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' mod_auth_mysql.la /usr/local/apache/modules
/usr/local/apache/build/libtool --mode=install cp mod_auth_mysql.la /usr/local/apache/modules/
cp .libs/mod_auth_mysql.lai /usr/local/apache/modules/mod_auth_mysql.la
cp .libs/mod_auth_mysql.a /usr/local/apache/modules/mod_auth_mysql.a
ranlib /usr/local/apache/modules/mod_auth_mysql.a
chmod 644 /usr/local/apache/modules/mod_auth_mysql.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/apache/modules
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/apache/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Warning! dlname not found in /usr/local/apache/modules/mod_auth_mysql.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/mod_auth_mysql.so
chmod: getting attributes of `/usr/local/apache/modules/mod_auth_mysql.so': No such file or directory
apxs:Error: Command failed with rc=65536
Again, i have the same problem and seems that a "cp" stament is missing :(
I will continue testing
Jesus
Jesus,
I haven't forgotten you - I'm trying to find an answer to your problem. Unfortunately, so far, no luck,
I will be leaving on a business trip tomorrow morning, so it may take a few days. I'll have my laptop with me, but have limited time to work on things.
I'll get back to you as soon as I can find anything out.
Jerry
Jesus,
Another person brought up the question: what's the contents of your .libs directory after running the first and second steps? Did the .so actually get created and not copied, or did it not get created at all?
Jerry
Hi all,
Sorry for the delay , i was out of the officce to :(
this is the sorce tree just before the tar xzvf mod_auth_mysql-2.7.0.tar.gz:
srv1:/usr/local/src/mod_auth_mysql-2.7.0# ls -la
total 56
drwxr-sr-x 2 root staff 4096 Nov 16 18:35 .
drwxrwsr-x 13 root staff 4096 Nov 16 18:35 ..
-rw-r--r-- 1 alias 1002 11680 Nov 1 20:01 README
-rw-r--r-- 1 alias 1002 36173 Nov 1 20:08 mod_auth_mysql.c
now, whe do the following step:
# srv1:/usr/local/src/mod_auth_mysql-2.7.0# apxs -c -D APACHE2 -I/usr/local/mysql/include/mysql/ -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lm -lz mod_auth_mysql.c
/usr/local/apache/build/libtool --silent --mode=compile gcc -prefer-pic -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/mysql/include/mysql/ -DAPACHE2 -c -o mod_auth_mysql.lo mod_auth_mysql.c && touch mod_auth_mysql.slo
/usr/local/apache/build/libtool --silent --mode=link gcc -o mod_auth_mysql.la -I/usr/local/mysql/include/mysql/ -DAPACHE2 -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lm -lz -rpath /usr/local/apache/modules -module -avoid-version mod_auth_mysql.lo
srv1:/usr/local/src/mod_auth_mysql-2.7.0#
And now, I have this:
srv1:/usr/local/src/mod_auth_mysql-2.7.0# ls -laR
.:
total 160
drwxr-sr-x 3 root staff 4096 Nov 16 18:36 .
drwxrwsr-x 13 root staff 4096 Nov 16 18:35 ..
drwxr-sr-x 2 root staff 4096 Nov 16 18:36 .libs
-rw-r--r-- 1 alias 1002 11680 Nov 1 20:01 README
-rw-r--r-- 1 alias 1002 36173 Nov 1 20:08 mod_auth_mysql.c
-rw-r--r-- 1 root staff 783 Nov 16 18:36 mod_auth_mysql.la
-rw-r--r-- 1 root staff 10 Nov 16 18:36 mod_auth_mysql.lo
-rw-r--r-- 1 root staff 90080 Nov 16 18:36 mod_auth_mysql.o
-rw-r--r-- 1 root staff 0 Nov 16 18:36 mod_auth_mysql.slo
./.libs:
total 108
drwxr-sr-x 2 root staff 4096 Nov 16 18:36 .
drwxr-sr-x 3 root staff 4096 Nov 16 18:36 ..
-rw-r--r-- 1 root staff 90312 Nov 16 18:36 mod_auth_mysql.a
lrwxr-xr-x 1 root staff 20 Nov 16 18:36 mod_auth_mysql.la -> ../mod_auth_mysql.la
-rw-r--r-- 1 root staff 783 Nov 16 18:36 mod_auth_mysql.lai
Finally:
srv1:/usr/local/src/mod_auth_mysql-2.7.0# apxs -i mod_auth_mysql.la
/usr/local/apache/build/instdso.sh SH_LIBTOOL='/usr/local/apache/build/libtool' mod_auth_mysql.la /usr/local/apache/modules
/usr/local/apache/build/libtool --mode=install cp mod_auth_mysql.la /usr/local/apache/modules/
cp .libs/mod_auth_mysql.lai /usr/local/apache/modules/mod_auth_mysql.la
cp .libs/mod_auth_mysql.a /usr/local/apache/modules/mod_auth_mysql.a
ranlib /usr/local/apache/modules/mod_auth_mysql.a
chmod 644 /usr/local/apache/modules/mod_auth_mysql.a
PATH="$PATH:/sbin" ldconfig -n /usr/local/apache/modules
----------------------------------------------------------------------
Libraries have been installed in:
/usr/local/apache/modules
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the `LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the `LD_RUN_PATH' environment variable
during linking
- use the `-Wl,--rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to `/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
Warning! dlname not found in /usr/local/apache/modules/mod_auth_mysql.la.
Assuming installing a .so rather than a libtool archive.
chmod 755 /usr/local/apache/modules/mod_auth_mysql.so
chmod: getting attributes of `/usr/local/apache/modules/mod_auth_mysql.so': No such file or directory
apxs:Error: Command failed with rc=65536
.
srv1:/usr/local/src/mod_auth_mysql-2.7.0#
And, now another ls -laR:
srv1:/usr/local/src/mod_auth_mysql-2.7.0# ls -laR
.:
total 160
drwxr-sr-x 3 root staff 4096 Nov 16 18:36 .
drwxrwsr-x 13 root staff 4096 Nov 16 18:35 ..
drwxr-sr-x 2 root staff 4096 Nov 16 18:36 .libs
-rw-r--r-- 1 alias 1002 11680 Nov 1 20:01 README
-rw-r--r-- 1 alias 1002 36173 Nov 1 20:08 mod_auth_mysql.c
-rw-r--r-- 1 root staff 783 Nov 16 18:36 mod_auth_mysql.la
-rw-r--r-- 1 root staff 10 Nov 16 18:36 mod_auth_mysql.lo
-rw-r--r-- 1 root staff 90080 Nov 16 18:36 mod_auth_mysql.o
-rw-r--r-- 1 root staff 0 Nov 16 18:36 mod_auth_mysql.slo
./.libs:
total 108
drwxr-sr-x 2 root staff 4096 Nov 16 18:36 .
drwxr-sr-x 3 root staff 4096 Nov 16 18:36 ..
-rw-r--r-- 1 root staff 90312 Nov 16 18:36 mod_auth_mysql.a
lrwxr-xr-x 1 root staff 20 Nov 16 18:36 mod_auth_mysql.la -> ../mod_auth_mysql.la
-rw-r--r-- 1 root staff 783 Nov 16 18:36 mod_auth_mysql.lai
srv1:/usr/local/src/mod_auth_mysql-2.7.0#
I hope that this help someone to try to "help" me ;)
Regards.
Jesus,
Sorry for the delay, but I'm back in the office for a short week.
Ok, this does help.
The problem is the first step is not creating the .so file. When I did it on my system, I got a .lib/mod_auth_mysql.so created. So, if it's not created, it can't be copied (obvious, isn't it? :-) ).
The from the apxs command looks ok, so I guess we'll have to get more info.
First of all -what's the output from a
ld --version
command? Perhaps you have a back-level linker?
Next - try adding the option
-Wc,-Wall
(no spaces) in the first step. This will pass -Wall on to gcc; there should be no warnings. But perhaps something isn't showing up?
If this doesn't work, try adding
-Wl,--verbose
(again, no spaces) to the step. This will give a bunch of output; you may need to redirect stderr to a file.
The main things are the first few lines - expecially the SEARCH_DIR directories; are they correct?
Also, if you go further down, you'll find attempts to open several library files. Some won't succeed - that's normal. But when they do succeed (and all have to, eventually), are they loading the correct version of that library (i.e. from the correct directory)?
If you don't see anything unusual, try sending me the output of this step via email (it's too big for the forum) and I'll compare with what I have on my side.
Jerry
Hi,
the LD --version output:
srv1:/usr/local/src/mod_auth_mysql-2.7.0# ld --version
GNU ld version 2.12.90.0.1 20020307 Debian/GNU Linux
Copyright 2002 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License. This program has absolutely no warranty.
I not sure about the next step, you say that i need to do this:
#apxs -c -D APACHE2 -I/usr/local/mysql/include/mysql/ -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lm -lz mod_auth_mysql.c -Wc,-Wall -Wl,--verbose
?
Regards, and thx again for your time.
Jesus
Hi, Jesus,
OK, you're running the same version of ld as I am.
For the next command, you're close - what you actually need is:
apxs -c -D APACHE2 -I/usr/local/mysql/include/mysql/ -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lm -lz -Wc,-Wall -Wl,--verbose mod_auth_mysql.c
(Note the options must be before the module name).
As I said before - the -Wl,--verbose option will give you a lot of output. But I'm also hoping it will show the problem.
Jerry
Hi Jerry,
the output of the apx seems similar than without this parameters... :S
srv1:/usr/local/src/mod_auth_mysql-2.7.0# apxs -c -D APACHE2 -I/usr/local/mysql/include/mysql/ -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lm -lz -Wc,-Wall -Wl,--verbose mod_auth_mysql.c
/usr/local/apache/build/libtool --silent --mode=compile gcc -prefer-pic -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache/include -I/usr/local/apache/include -I/usr/local/apache/include -Wall -I/usr/local/mysql/include/mysql/ -DAPACHE2 -c -o mod_auth_mysql.lo mod_auth_mysql.c && touch mod_auth_mysql.slo
/usr/local/apache/build/libtool --silent --mode=link gcc -o mod_auth_mysql.la -Wall -I/usr/local/mysql/include/mysql/ -DAPACHE2 -Wc,-Wall -Wl,--verbose -L/usr/local/mysql/lib/mysql/ -lmysqlclient -lm -lz -rpath /usr/local/apache/modules -module -avoid-version mod_auth_mysql.lo
Hi, Jesus,
Interesting.
Just to make sure - for the -Wl option, you are using a lower case 'L' instead of an upper case 'I', correct?
The compile step looks fine - I really didn't expect to see anything here, but wanted to be positive.
However, with the -Wl--verbose option, I get almost 300 lines of output to stderr from the linker - all of them informational messages.
Right now it looks like ld isn't being called - but I don't know why. No answer back yet from some queries I've put out, and searching Google has seen others with this problem but no solution yet.
I'm still looking, though. Please be patient with me. I dont' know any more about this than you :-) !
Jerry
Jesus,
Sorry for the short delay - I've been fooling with libtool a bit.
First of all - what do you get if you enter this command?
/usr/local/apache/build/libtool --config
(Again, you might want to capture the output - should be about 250 lines).
Of particular interest would be "library_names_spec" and "soname_spec". "build_libtool_libs" may also affect it - I'm not sure exactly what that one does.
Otherwise, does everything else look OK for your system? Again - if you're not sure, you can email me the output and I'll compare it with a working one.
One other thought - what happens if you enter the two libtool commands from the command line without the --silent option? The results I get are:
(Directory before starting)
drwxr-xr-x 2 root root 4096 Nov 24 09:45 .
drwxr-xr-x 12 developm developm 4096 Nov 23 11:11 ..
-rw-r--r-- 1 root root 11680 Nov 10 12:56 README
-rw-r--r-- 1 root root 36171 Nov 10 12:57 mod_auth_mysql.c
First libtool command:
mkdir .libs
gcc -DAP_HAVE_DESIGNATED_INITIALIZER -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -pthread -I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/local/apache2/include -I/usr/local/mysql/include -DAPACHE2 -c mod_auth_mysql.c -fPIC -DPIC -o .libs/mod_auth_mysql.lo
mv -f .libs/mod_auth_mysql.lo mod_auth_mysql.o
(cd . && ln -s mod_auth_mysql.o mod_auth_mysql.lo)
Directory contents:
drwxr-xr-x 3 root root 4096 Nov 24 09:45 .
drwxr-xr-x 12 developm developm 4096 Nov 23 11:11 ..
drwxr-xr-x 2 root root 4096 Nov 24 09:45 .libs
-rw-r--r-- 1 root root 11680 Nov 10 12:56 README
-rw-r--r-- 1 root root 36171 Nov 10 12:57 mod_auth_mysql.c
lrwxrwxrwx 1 root root 16 Nov 24 09:45 mod_auth_mysql.lo -> mod_auth_mysql.o
-rw-r--r-- 1 root root 105044 Nov 24 09:45 mod_auth_mysql.o
-rw-r--r-- 1 root root 0 Nov 24 09:45 mod_auth_mysql.slo
./.libs:
total 8
drwxr-xr-x 2 root root 4096 Nov 24 09:45 .
drwxr-xr-x 3 root root 4096 Nov 24 09:45 ..
Second libtool command:
rm -fr .libs/mod_auth_mysql.la .libs/mod_auth_mysql.* .libs/mod_auth_mysql.*
gcc -shared mod_auth_mysql.lo -L/usr/local/mysql/lib -lmysqlclient -lm -lz -Wl,-soname -Wl,mod_auth_mysql.so -o .libs/mod_auth_mysql.so
ar cru .libs/mod_auth_mysql.a mod_auth_mysql.o
ranlib .libs/mod_auth_mysql.a
creating mod_auth_mysql.la
(cd .libs && rm -f mod_auth_mysql.la && ln -s ../mod_auth_mysql.la mod_auth_mysql.la)
Directory contents:
drwxr-xr-x 3 root root 4096 Nov 24 09:45 .
drwxr-xr-x 12 developm developm 4096 Nov 23 11:11 ..
drwxr-xr-x 2 root root 4096 Nov 24 09:45 .libs
-rw-r--r-- 1 root root 11680 Nov 10 12:56 README
-rw-r--r-- 1 root root 36171 Nov 10 12:57 mod_auth_mysql.c
-rw-r--r-- 1 root root 801 Nov 24 09:45 mod_auth_mysql.la
lrwxrwxrwx 1 root root 16 Nov 24 09:45 mod_auth_mysql.lo -> mod_auth_mysql.o
-rw-r--r-- 1 root root 105044 Nov 24 09:45 mod_auth_mysql.o
-rw-r--r-- 1 root root 0 Nov 24 09:45 mod_auth_mysql.slo
./.libs:
total 1240
drwxr-xr-x 2 root root 4096 Nov 24 09:45 .
drwxr-xr-x 3 root root 4096 Nov 24 09:45 ..
-rw-r--r-- 1 root root 105276 Nov 24 09:45 mod_auth_mysql.a
lrwxrwxrwx 1 root root 20 Nov 24 09:45 mod_auth_mysql.la -> ../mod_auth_mysql.la
-rw-r--r-- 1 root root 802 Nov 24 09:45 mod_auth_mysql.lai
-rwxr-xr-x 1 root root 1141464 Nov 24 09:45 mod_auth_mysql.so
Does this help any?
Jerry