Stefan_Dragnev - 2014-07-08


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 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 -rpath /var/httpd/modules -module -avoid-version mod_qos.lo -lcrypto -lpcre
/var/httpd/build/ SH_LIBTOOL='/var/httpd/build/libtool' /var/httpd/modules
SH_LIBTOOL : /var/httpd/build/libtool
TARGETDIR : /var/httpd/modules
DSOBASE : mod_qos
This is the command
/var/httpd/build/libtool --mode=install cp /var/httpd/modules/
cp .libs/mod_qos.lai /var/httpd/modules/
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:

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/'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and manual pages.

Warning! dlname not found in /var/httpd/modules/
Assuming installing a .so rather than a libtool archive.
mv /var/httpd/modules/ /var/httpd/modules/
mv: cannot move /var/httpd/modules/' to a subdirectory of itself,/var/httpd/modules/'
chmod 755 /var/httpd/modules/
chmod: cannot access `/var/httpd/modules/': 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_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D HTTPD_ROOT="/var/httpd"
-D SUEXEC_BIN="/var/httpd/bin/suexec"
-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.