Stefan_Dragnev - 2014-07-08

Hello,

I'm trying to build mod_qos as loadable module for Apache 2.2.22. When I run the build command specified in the documentation:

apxs -i -c mod_qos.c -lcrypto -lpcre

I get the following errors and mod_qos.a instead mod_qos.so in my Apache modules directory (/var/httpd/modules). Apache on my machine is installed under /var/httpd

Here is the output from the build:

[root@c4 apache2]$ cd mod_qos-11.4/apache2/
[root@c4 apache2]$ /var/httpd/bin/apxs -i -c mod_qos.c -lcrypto -lpcre

/var/httpd/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -march=i686 -pipe -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -pthread -I/var/httpd/include -I/var/httpd/include -I/var/httpd/include -c -o mod_qos.lo mod_qos.c && touch mod_qos.slo
/var/httpd/build/libtool --silent --mode=link gcc -o mod_qos.la -rpath /var/httpd/modules -module -avoid-version mod_qos.lo -lcrypto -lpcre
/var/httpd/build/instdso.sh SH_LIBTOOL='/var/httpd/build/libtool' mod_qos.la /var/httpd/modules
SH_LIBTOOL : /var/httpd/build/libtool
DSOARCHIVE : mod_qos.la
TARGETDIR : /var/httpd/modules
DSOBASE : mod_qos
TARGET_NAME: mod_qos.so
This is the command
/var/httpd/build/libtool --mode=install cp mod_qos.la /var/httpd/modules/
cp .libs/mod_qos.lai /var/httpd/modules/mod_qos.la
cp .libs/mod_qos.a /var/httpd/modules/mod_qos.a
chmod 644 /var/httpd/modules/mod_qos.a
ranlib /var/httpd/modules/mod_qos.a
PATH="$PATH:/sbin" ldconfig -n /var/httpd/modules


Libraries have been installed in:
/var/httpd/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 theLD_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 /var/httpd/modules/mod_qos.la.
Assuming installing a .so rather than a libtool archive.
mv /var/httpd/modules/ /var/httpd/modules/mod_qos.so
mv: cannot move /var/httpd/modules/' to a subdirectory of itself,/var/httpd/modules/mod_qos.so'
chmod 755 /var/httpd/modules/mod_qos.so
chmod: cannot access `/var/httpd/modules/mod_qos.so': No such file or directory
apxs:Error: Command failed with rc=65536

This is information about the Apache server I'm using.

[root@c4 apache2]$ /var/httpd/bin/httpd -V
Server version: Apache/2.2.22 (Unix)
Server built: Jul 3 2014 14:03:15
Server's Module Magic Number: 20051115:30
Server loaded: APR 1.4.5, APR-Util 1.4.1
Compiled using: APR 1.4.5, APR-Util 1.4.1
Architecture: 32-bit
Server MPM: Prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APACHE_MPM_DIR="server/mpm/prefork"
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=128
-D HTTPD_ROOT="/var/httpd"
-D SUEXEC_BIN="/var/httpd/bin/suexec"
-D DEFAULT_PIDLOG="logs/httpd.pid"
-D DEFAULT_SCOREBOARD="logs/apache_runtime_status"
-D DEFAULT_LOCKFILE="logs/accept.lock"
-D DEFAULT_ERRORLOG="logs/error_log"
-D AP_TYPES_CONFIG_FILE="conf/mime.types"
-D SERVER_CONFIG_FILE="conf/httpd.conf"

Any suggestions how to build mod_qos as .so module are welcome and much appreciated.

Thanks,
Stefan