You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Koningshoed <ko...@freemail.absa.co.za> on 2002/02/04 23:39:44 UTC

problem mod_webapp.so module

When executing "make" in the directory where everything will build fine
until it gets to the mod_webapp.c file in the apache-1.3 directory.

When doing make in the apache-1.3 directory I get the following output:

~/web_app/webapp-module-1.0.1-tc401/apache-1.3# make
{ APXS_LDFLAGS_SHLIB="`/usr/local/sbin/apxs -q LDFLAGS_SHLIB` \
         \
        -lm -lcrypt -lnsl -ldl" ; \
    APXS_LDFLAGS_SHLIB=`/bin/echo ${APXS_LDFLAGS_SHLIB}` ; \
    APXS_CFLAGS="`/usr/local/sbin/apxs -q CFLAGS` \
        -g -O2 \
        -g -O2 \
         \
        -DLINUX=2 -D_REENTRANT \
        -I/root/web_app/webapp-module-1.0.1-tc401/apr/include \
        -I/root/web_app/webapp-module-1.0.1-tc401/include \
        " ; \
    APXS_CFLAGS=`/bin/echo ${APXS_CFLAGS}` ; \
    /usr/local/sbin/apxs \
        -S CFLAGS="${APXS_CFLAGS}" \
        -S LDFLAGS_SHLIB="${APXS_LDFLAGS_SHLIB}" \
        -o "mod_webapp.so" \
        -c "mod_webapp.c" \
        "/root/web_app/webapp-module-1.0.1-tc401/lib/libwebapp.a" \
        "/root/web_app/webapp-module-1.0.1-tc401/lib/libapr.a" ; \
}
apxs:Error: no config variable LDFLAGS_SHLIB
Usage: apxs -g [-S <var>=<val>] -n <modname>
       apxs -q [-S <var>=<val>] <query> ...
       apxs -c [-S <var>=<val>] [-o <dsofile>] [-D <name>[=<value>]]
               [-I <incdir>] [-L <libdir>] [-l <libname>] [-Wc,<flags>]
               [-Wl,<flags>] <files> ...
       apxs -i [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
       apxs -e [-S <var>=<val>] [-a] [-A] [-n <modname>] <dsofile> ...
make: *** [mod_webapp.so] Error 1

I managed to fix this by changing the apxs script, someone else deleted the
line setting the flag.  The orriginal script looked like this:

##
##  Configuration
##

my $CFG_TARGET        = q(httpd);            # substituted via Makefile.tmpl
my $CFG_CC            = q(gcc);                # substituted via
Makefile.tmpl
my $CFG_CFLAGS        =
q( -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED
`../apaci`);  # substituted via Makefile.tmpl
my $CFG_CFLAGS_SHLIB  = q();      # substituted via Makefile.tmpl
my $CFG_LD_SHLIB      = q();          # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = q(); # substituted via Makefile.tmpl
my $CFG_LIBS_SHLIB    = q();        # substituted via Makefile.tmpl
my $CFG_PREFIX        = q(/usr/local);            # substituted via APACI
install
my $CFG_SBINDIR       = q(/usr/local/sbin);           # substituted via
APACI install
my $CFG_INCLUDEDIR    = q(/usr/local/include/httpd);        # substituted
via APACI install
my $CFG_LIBEXECDIR    = q(/usr/local/libexec);        # substituted via
APACI install
my $CFG_SYSCONFDIR    = q(/etc/apache);        # substituted via APACI
install

Changed to:

my $CFG_CFLAGS_SHLIB  = q( );      # substituted via Makefile.tmpl
my $CFG_LD_SHLIB      = q( );          # substituted via Makefile.tmpl
my $CFG_LDFLAGS_SHLIB = q( ); # substituted via Makefile.tmpl
my $CFG_LIBS_SHLIB    = q( );        # substituted via Makefile.tmpl

Is this a problem in perl-5.004?

Now I get the following output:

~/web_app/webapp-module-1.0.1-tc401/apache-1.3# make
{
--- SNIP ---
}
gcc -DLINUX=22 -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -DNO_DL_NEEDED 
-g -O2 -g -O2 -DLINUX=2 -D_REENTRANT -I/root/web_app/webapp-module-1.0.1-tc4
01/apr/include -I/root/web_app/webapp-module-1.0.1-tc401/include   -I/usr/lo
cal/include/httpd  -c mod_webapp.c
*Initialization*:1: warning: `LINUX' redefined
*Initialization*:1: warning: this is the location of the previous definition
  -lm -lcrypt -lnsl -ldl -o mod_webapp.so mod_webapp.o
/root/web_app/webapp-module-1.0.1-tc401/lib/libwebapp.a
/root/web_app/webapp-module-1.0.1-tc401/lib/libapr.a
apxs:Break: Command failed with rc=255
make: *** [mod_webapp.so] Error 1


which implies that gcc compiles the mod_webapp.c file (I also checked that
mod_webapp.o exists, and it does).
It seems to me like the second command (the one after the second warning) is
not complete and thus fails to execute.  Does anyone know what should be
going in there?  I tried gcc but that fails bad time.  Perhaps those $CFG_*
configuration values I changed?  If they are empy you get the "no config
variable LDFLAGS_SHLIB" error, place them there, you get a bit further but
you still fail.

Any advice welcome.

Jaco


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>