tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Luc BEAUDET <beau...@toolchest.cyber.kodak.com>
Subject Re: SUCCES: Tomcat 4.0.1 + Apache 1.3.xx using mod_webapp
Date Tue, 06 Nov 2001 09:52:49 GMT
Jan-Wijbrand Kolman a écrit :

> In succession to this happy post, I think I can post mine:
>
> ----- Original Message -----
> From: "Daniel Seyffer" <Daniel@Seyffer.de>
> To: <tomcat-user@jakarta.apache.org>
> Sent: Monday, November 05, 2001 9:43 PM
> Subject: SUCCES: Tomcat 4.0.1 + Apache 1.3.xx using mod_webapp
>
> > Hi Tomcat Users!
> --snip--
>
> Hello,
>
> Today I set my mind on getting Apache connected to Tomcat 4.01 via
> the mod_webapp.so module. In principle, this could have been a
> simple task if not for three anoying situations. After having
> resolved these situations, I now have a working connection.
>
> Some info on the server setup:
> ------------------------------
> * Debian "Testing" Linux on i386
> * Apache/1.3.20 (Unix) Debian/GNU
> * Tomcat 4.01, binary download
> (http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.0.1/)
> * mod_webapp.so for linux binary download
> (http://jakarta.apache.org/builds/jakarta-tomcat- \
> 4.0/release/v4.0.1/bin/linux/i386)
> * The Apache-dev deb.package installed (which brings the APXS
> executable)
>
> Situation 1) The binary download of the mod_webapp.so is *not*
> suitable for Apache using "EAPI". Apache as installed by the
> standard Debian packages, *is* using EAPI.
>
> This came clear after following the instructions in INSTALL.txt
> (included in this download). The "apachectl configtest" issues a
> warning, telling that a non-EAPI module might crash when used within
> this "EAPI" apache.
>
> The connection to Tomcat 4 actually is made *), after restarting
> apache, but when requesting an URL which should be handled by Tomcat
> (i.e. using the webapp connection), the apache error log states an
> Segmentation Fault in one of its child processes.
>
> To resolve this issue, one has to compile the mod_webapp.so from
> sources. I downloaded these sources via
> http://jakarta.apache.org/builds/jakarta-tomcat- \
> 4.0/release/v4.0/src/webapp-module-1.0-tc40-src.tar.gz
>
> The inlcuded instructions tell you to do "./configure --with-apxs"
> and "make". In my setup the make command did not complete
> succesfull. Error message:
>
> --snip--
> make[2]: Entering directory `/home/web/src/webapp-module-
> 1.0-tc40/apache-1.3'
>
> { APXS_LDFLAGS_SHLIB="`/usr/bin/apxs -q LDFLAGS_SHLIB` \
>          \
>         -lm -lcrypt -lnsl -ldl" ; \
>     APXS_LDFLAGS_SHLIB=`/bin/echo ${APXS_LDFLAGS_SHLIB}` ; \
>     APXS_CFLAGS="`/usr/bin/apxs -q CFLAGS` \
>         -g -O2 \
>         -g -O2 \
>          \
>         -DLINUX=2 -D_REENTRANT \
>         -I/home/web/src/webapp-module-1.0-tc40/apr/include \
>         -I/home/web/src/webapp-module-1.0-tc40/include \
>         " ; \
>     APXS_CFLAGS=`/bin/echo ${APXS_CFLAGS}`; \
>     /usr/bin/apxs \
>         -S CFLAGS="${APXS_CFLAGS}" \
>         -S LDFLAGS_SHLIB="${APXS_LDFLAGS_SHLIB}" \
>         -o "mod_webapp.so" \
>         -c "mod_webapp.c" \
>         "/home/web/src/webapp-module-1.0-tc40/lib/libwebapp.a" \
>         "/home/web/src/webapp-module-1.0-tc40/lib/libapr.a" ; \
> }
> Bareword found where operator expected at (eval 6) line 1, near ""-
> DLINUX=22 -DEAPI -DTARGET="apache" (Missing operator before apache?)
> String found where operator expected at (eval 6) line 1, at end of
> line
>
> gcc -DLINUX=22 -DEAPI -DTARGET="apache" -I/usr/include/db1 -
> DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite -D_LARGEFILE_SOURCE -
> D_FILE_OFFSET_BITS=64 -fpic -DSHARED_MODULE -I/usr/include/apache-
> 1.3 -c mod_webapp.c
>
> mod_webapp.c:70: wa.h: No such file or directory
> apxs:Break: Command failed with rc=1
>
> make[2]: *** [mod_webapp.so] Error 1
> make[2]: Leaving directory `/home/web/src/webapp-module-1.0-
> tc40/apache-1.3'
>
> make[1]: Exiting directory "apache-1.3"
> make[1]: *** [template] Error 2
> make[1]: Leaving directory `/home/web/src/webapp-module-1.0-tc40'
> make: *** [apache-1.3-build] Error 2
> --end-of-snip--
>
> Since I'm not a "make guru", I just started searching via "Google"
> and "Google Groups". Which brings me at situation 2:
>
> Situation 2) I found a post on the Tomcat-user list from Plamen
> Petkov (http://www.mail-archive.com/tomcat- \
> user@jakarta.apache.org/msg34584.html) suggesting to manually edit
> the Makefile (after the ./configure step) within the apache-1.3
> directory (inside the mod_webapp source directory, that is).
>
> It tells to change line 90 from:
> "APXS_CFLAGS=`$(ECHO) $${APXS_CFLAGS}`; \"
>
> to:
> APXS_CFLAGS=`$(ECHO) $${APXS_CFLAGS} | sed s/\"//g `; \
>
> Doing so, and issueing "make" again, did change something...I.e. I
> got another error message:
>
> --snip--
> webapp-module-1.0-tc40/lib/libapr.a -lc -lm -lcrypt -ldb1 -ldb
> /usr/bin/ld: cannot find -ldb
> collect2: ld returned 1 exit status
> apxs:Break: Command failed with rc=1
> make[2]: *** [mod_webapp.so] Error 1
> make[2]: Leaving directory `/home/web/src/webapp-module-1.0-
> tc40/apache-1.3'
>
> make[1]: Exiting directory "apache-1.3"
> make[1]: *** [template] Error 2
> make[1]: Leaving directory `/home/web/src/webapp-module-1.0-tc40'
> make: *** [apache-1.3-build] Error 2
> --end-of-snip--
>
> Situation 3) Again I started searching Google, to find out that I
> should have installed the libdb2-dev debian package. I installed
> this package, issued "make" again, to find out that the modules by
> now *did* compile :-) Indeed, when using this mod_webapp.so I *can*
> connect Apache to Tomcat 4.01, so my mission is accomplished!
>
> I hope this post is of help to other people..., I'm happy to provide
> more details if neccessary.
>
> regards,
> jw
>
> Jan-Wijbrand Kolman - Interaction Designer
> jw@n--tree.net
>
> *) There is a "sub-situation" to this: The server.xml file shows an
> example on how to use the connector. Is says:
>
> --snip--
> <!-- Replace "localhost" with what your Apache "ServerName" is set
> to -->
>   <Engine className="org.apache.catalina.connector.warp.WarpEngine"
>     name="Apache" debug="0" appBase="webapps">
> --end-of-snip--
>
> Is should IMHO say:
>
> --snip--
> <!-- Replace "Apache" with what your Apache "ServerName" is set to -->
>                  ^
>                  |
> -----------------+
>
>   <Engine className="org.apache.catalina.connector.warp.WarpEngine"
>     name="Apache" debug="0" appBase="webapps">
> --end-of-snip--
>
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>

Hi Jan,

Well i had same pb with mod_webapp.so onSOLARIS 6 when i tried to
compile.

I made a post to the list; i join it to yu - just avoiding to enter it
again by keyboard... -

Hope this will help.

Regards
Jean-Luc :O)
******************************************************************

Tryin' to compile mod_webapp.so with the last nightly snapshot
  webapp-module-20011025
  with ./configure --with-apxs=...  --with-tomcat=...

  The first time i had the --with-java added but it was generatin' some
java compil errors
  that i found comin' from the warp.jar (?)
  I decided to put this option out of my script and 'blanked' my
CLASSPATH with
  CLASSPATH=""; export CLASSPATH.

  It then runned further since i got brand new errors concerning some
missing *.h to build
  mod_webapp.so.

  After long investigations ( i'm not so familiar with Makefile ) i
finally got it.
  My Apache_1.3.20 Server is compile with special options.
  The make cmd had an error concerning an option not very regular; so
that
  after making an Inculde of $APACHE_HOME/include, it was not able to
include
  anything else.

  The way i found to go out of it was to modify the
$WEBAPP_SRC/apache-1.3/Makefile
  generated by the ./configure this way:

  $(MODULE) :    $(SRCS)  $(TGTDIR)/lib/libapr.a .........
                           { APXS_LDFLAGS_SHLIB='`$(APXS)  -q
LDFLAGS_SHLIB`  \   #  ["] replaced by [']
                                                 $(APR_LDFLAGS)  \
                                                 $( APR_LIBS) ' ;\      #
["] replaced by [']

  ../..
                                APX_CFLAGS='`$(APXS)  -q  CFLAGS`  \    #
["] replaced by [']
                                           $CFLAGS  \
  ../..
                                           -I $(SRCDIR)/include  \
                                           $(APR_INCLUDES)' ; \      #
["]  replaced by [']

  Well, hope that'll help


--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message