You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Bojan Smojver <bo...@binarix.com> on 2001/04/07 04:40:57 UTC

mod_webapp (Tomcat 4.0 b2, b3): compilation quick fix

I've posted to this list a few days ago a message related to the
compilation problems of mod_webapp. It seems that the versions that come
with b2 and b3 of Tomcat 4.0 are screwed (even after cleaning double new
lines in Makefiles). I didn't have the patience to go through the code
to determine why (a lame way of saying that I don't have a clue what's
in there ;-)

The quick fix in order to get it to *compile* is to revert to b1
release. And just as an FYI, it can also be compiled and statically
linked into Apache. Just whack mod_webapp.c into webapplib directory,
put mod_webapp.o into the OBJS in the Makefile for webapplib. This will
place the object file into libwebapp.a after compilation. Then create a
directory under src/modules (Apache source) for it and copy the library
(libwebapp.a) there. Create Makefile.tmpl, for instance:

------------------
LIB=libwebapp.a

all: ${LIB}

${LIB}:
        ${RANLIB} $@

clean:
------------------

libwebapp.module file, for instance:

------------------
Name: webapp_module
ConfigStart
        LIBS="-Lmodules/webapp -L../modules/webapp
-L../../modules/webapp -lwebapp -ldl $LIBS"
        RULE_HIDE=yes
ConfigEnd
------------------

run configure (activate the module) and it should get into Apache after
you run make.

Back to testing its functionality now...

Bojan

Re: mod_webapp (Tomcat 4.0 b2, b3): compilation quick fix

Posted by Bojan Smojver <bo...@binarix.com>.
It's a bit stupid to reply to your own post. Anyway...

Apache will fail to start with staticly linked mod_webapp due to the
fact that this module is not capable of handling the second pass of the
configuration file successfuly. It will report 'Duplicate connection
name'. The originating file is wa_connection.c. Since the
WebAppConnection has been defined in the first pass, it won't accept the
same one in the second pass because it checks for duplicate connections.

Bojan

Bojan Smojver wrote:
> 
> I've posted to this list a few days ago a message related to the
> compilation problems of mod_webapp. It seems that the versions that come
> with b2 and b3 of Tomcat 4.0 are screwed (even after cleaning double new
> lines in Makefiles). I didn't have the patience to go through the code
> to determine why (a lame way of saying that I don't have a clue what's
> in there ;-)
> 
> The quick fix in order to get it to *compile* is to revert to b1
> release. And just as an FYI, it can also be compiled and statically
> linked into Apache. Just whack mod_webapp.c into webapplib directory,
> put mod_webapp.o into the OBJS in the Makefile for webapplib. This will
> place the object file into libwebapp.a after compilation. Then create a
> directory under src/modules (Apache source) for it and copy the library
> (libwebapp.a) there. Create Makefile.tmpl, for instance:
> 
> ------------------
> LIB=libwebapp.a
> 
> all: ${LIB}
> 
> ${LIB}:
>         ${RANLIB} $@
> 
> clean:
> ------------------
> 
> libwebapp.module file, for instance:
> 
> ------------------
> Name: webapp_module
> ConfigStart
>         LIBS="-Lmodules/webapp -L../modules/webapp
> -L../../modules/webapp -lwebapp -ldl $LIBS"
>         RULE_HIDE=yes
> ConfigEnd
> ------------------
> 
> run configure (activate the module) and it should get into Apache after
> you run make.
> 
> Back to testing its functionality now...
> 
> Bojan