Tomcat Connector and Apache 2.2

In: Java

14 Jul 2007

tomcatToday I tried to setup a Java web application on an Ubuntu 7.04 system. This means installing apache web server, Tomcat and configuring mod_jk. I have done this many times before but this time there was something different: the default version of apache that comes with Ubuntu 7.04 is 2.2.x – until today I only used apache 2.0.x with mod_jk and tomcat.

After installing the JDK, Tomcat and apache I downloaded the source of mod_jk from the Tomcat Connectors download site. After unpacking it and running

configure --with-apxs=/usr/bin/apxs2

I tried to run make and the following error occured:

Making all in common
make[1]: Entering directory `/home/user/downloads/tomcat-connectors-1.2.23-src/native/common'
/usr/share/apr-1.0/build/libtool --silent --mode=compile gcc -I/usr/include/apache2 -g -O2 -DLINUX=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl -I/usr/include/postgresql -I/usr/include/xmltok -pthread -DHAVE_APR -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -g -O2 -I /include -I /include/ -c jk_ajp12_worker.c -o jk_ajp12_worker.lo
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make[1]: *** [jk_ajp12_worker.lo] Error 1
make[1]: Leaving directory `/home/user/downloads/tomcat-connectors-1.2.23-src/native/common'
make: *** [all-recursive] Error 1

I did some research and found this nice site providing a solution to this problem. As the error message says I had to add the --tag parameter to the libtool command. In my case the value to use was CXX – it is printed out when running configure.

After manipulating Makefile and common/Makefile by adding the parameter in the libtool line I was able to run make successful.

Now some could say “Why didn’t you install the mod_jk binary from the Ubuntu repositories?” – because the provided version 1.2.18 is very old and has some serious security issues.

1 Response to Tomcat Connector and Apache 2.2

Avatar

Ravi Gehlot

July 23rd, 2010 at 4:36 pm

There is no need to compile it under Ubuntu because Ubuntu has Apache compiled to accept those .so files on the fly.

Comment Form

Follow Me!

Photostream

    P1010008 (2)P1010026P1010028P1010021P1010009 (2)P1010033 (2)

RSStOMPSON's tweets