You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daniel Rinehart <da...@neophi.com> on 2002/09/10 22:03:15 UTC

RE: AIX Connector Woes (success)

> Excellent.  Let us know, perhaps the hacking you did would work for other
> platforms, as well.  I've had fairly significant grief building the
> connectors from 4.1.10 source on RedHat 7.2, which is a little surprising to
> me.  If it's hard on Linux, it must be a royal PITA on other platforms,
> though Detlev Beutner already has Windows-DLL versions of 4.1.10 available,
> so maybe I am missing something.

	Below is a condensed version of what I did to compile a valid
libmod_jk.so for Apache 2.0.40/Tomcat 4.1.10 on AIX 5.1. At this point I
can't make any guarantees that this will work for anyone else, but
hopefully it will. I'm also 100% positive that this can be made easier and
more automated, but I don't currently pose the time to start hacking the
autoconf scripts.
	My build environment is setup as follows, with GNU binaries in my
path before OS specific ones:

tar 1.13.25
libtoolize 1.4d
aclocal 1.6.2
automake 1.6.2
autoconf 2.53
make 3.79.1
gcc 3.2

	Additionally I have the following environment variables set:

CATALINA_HOME=/apps/jakarta-tomcat-4.1.9
JAVA_HOME=/usr/java130/

	Apache 2.0.40 was built and installed into /apps/usr/local/apache2
with the following options. I don't know if this will matter, but since I
use the libtool generated by Apache instead of the one created by mod_jk,
I'm including it for completeness (long lines wrapped):

./configure --prefix=/apps/usr/local/apache2 --enable-mods-shared=all
--enable-cgi --enable-expires --enable-headers --enable-info
--enable-rewrite --enable-so --enable-ssl --disable-dav --disable-dav-fs
--disable-auth-digest --with-mpm=worker

	With the above command on my system I needed to hack libaprutil a
little to get it to compile and install but that's a little off topic.

	Once Apache was built and installed I ran the following commands
(long lines wrapped):

tar -zxf jakarta-tomcat-connectors-4.1.10-src.tar.gz

cd jakarta-tomcat-connectors-4.1.10-src/jk/native

./buildconf.sh

./configure --with-apxs=/apps/usr/local/apache2/bin/apxs

cd common/

make

cd ../apache-2.0/

/bin/sh /apps/usr/local/apache2/build/libtool --silent --mode=compile gcc
-g -O2 -pthread -DNO_DBM_REWRITEMAP    -U__STR__ -D_USE_IRS -D_THREAD_SAFE
-DAP_HAVE_DESIGNATED_INITIALIZER   -I/apps/usr/local/apache2/include
-I../common -prefer-pic -c mod_jk.c && touch mod_jk.slo

/bin/sh /apps/usr/local/apache2/build/libtool --silent --mode=link gcc -g
-O2 -pthread -DNO_DBM_REWRITEMAP -U__STR__ -D_USE_IRS -D_THREAD_SAFE
-DAP_HAVE_DESIGNATED_INITIALIZER -I/apps/usr/local/apache2/include
-export-dynamic -Wl,-brtl -Wl,-brtl -o mod_jk.la -rpath
/apps/usr/local/apache2/modules -module -avoid-version  mod_jk.lo
../common/jk_ajp12_worker.lo ../common/jk_connect.lo
../common/jk_msg_buff.lo ../common/jk_util.lo ../common/jk_ajp13.lo
../common/jk_pool.lo ../common/jk_worker.lo ../common/jk_ajp13_worker.lo
../common/jk_lb_worker.lo ../common/jk_sockbuf.lo ../common/jk_map.lo
../common/jk_uri_worker_map.lo ../common/jk_ajp14.lo
../common/jk_ajp14_worker.lo ../common/jk_md5.lo
../common/jk_ajp_common.lo ../common/jk_context.lo

/bin/sh /apps/usr/local/apache2/build/libtool --silent --mode=install cp
mod_jk.la /apps/usr/local/apache2/modules/mod_jk.so

	This creates a full suite of *jk* files under modules/ which I
cleaned up by hand. Alternatively you can probably just copy the .so
file out of the .libs directory by hand. The final file on my system
looked something like this:

	603266 libmod_jk.so*

	I suspect that someone else, based on their system, may need
different libtool lines from those above. The way that I "figured" them
out was to steal them from the compilation of mod_log_config. Under the
source tree that I used to compile Apache 2, I did something like this:

	cd modules/loggers/
	make clean
	cd ../..
	make | grep libtool

	I then grabbed the two output lines from libtool removed all of
the logger specific references, changed libtool to point to the one under
the installed Apache build directory, modified the include directory to
point to the installed Apache include directory, and lastly changed the
files being compiled to the ones that "make -n" spits out under the
/native/apache-2.0/ directory.

	I used the same mod_jk.c and workers.properties that I had under
Apache 1.3.26 without any problems. Hope this helps.

-- Daniel R. <da...@neophi.com> [http://www.neophi.com/]


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: AIX Connector Woes (success mod_jk2?)

Posted by Daniel Rinehart <da...@neophi.com>.
> 	Below is a condensed version of what I did to compile a valid
> libmod_jk.so for Apache 2.0.40/Tomcat 4.1.10 on AIX 5.1. At this point I
> can't make any guarantees that this will work for anyone else, but
> hopefully it will. I'm also 100% positive that this can be made easier and
> more automated, but I don't currently pose the time to start hacking the
> autoconf scripts.

	As a followup to the above, below are the steps I took to create a
mod_jk2 that seems to work. I don't have a working mod_jk2 configuration
right now, but this module at least passes configtest without a core dump.
The overall process is very similar to the build for mod_jk, so I'm
leaving out most of the duplicated details (long lines wrapped).

cd jk/native2/

chmod a+x buildconf.sh

./buildconf.sh

./configure --with-apxs2=/apps/usr/local/apache2/bin/apxs
--with-tomcat41=/apps/jakarta-tomcat-4.1.10

make

rm ../build/jk2/apache2/mod_jk2.*

rm ../build/jk2/apache2/libmod_jk2.*

cd server/apache2/

/apps/usr/local/apache2/build/libtool  --mode=compile gcc  -g -O2 -pthread
-DNO_DBM_REWRITEMAP    -U__STR__ -D_USE_IRS -D_THREAD_SAFE
-DAP_HAVE_DESIGNATED_INITIALIZER -I../../include
-I/apps/usr/local/apache2/include  -I /usr/java130//include -I
/usr/java130//include/  -DCHUNK_SIZE=4096 -DUSE_APACHE_MD5 -DHAS_APR  -c
../../server/apache2/mod_jk2.c -o ../../../build/jk2/apache2/mod_jk2.lo

/apps/usr/local/apache2/build/libtool  --mode=link gcc -g -O2 -pthread
-DNO_DBM_REWRITEMAP -U__STR__ -D_USE_IRS -D_THREAD_SAFE
-DAP_HAVE_DESIGNATED_INITIALIZER -I/apps/usr/local/apache2/include
-export-dynamic -Wl,-brtl -Wl,-brtl -o mod_jk.la -rpath
/apps/usr/local/apache2/modules -module -avoid-version -o
../../../build/jk2/apache2/mod_jk2.la
../../../build/jk2/apache2/jk_channel.lo
../../../build/jk2/apache2/jk_channel_apr_socket.lo
../../../build/jk2/apache2/jk_channel_jni.lo
../../../build/jk2/apache2/jk_channel_socket.lo
../../../build/jk2/apache2/jk_channel_un.lo
../../../build/jk2/apache2/jk_config.lo
../../../build/jk2/apache2/jk_config_file.lo
../../../build/jk2/apache2/jk_endpoint.lo
../../../build/jk2/apache2/jk_env.lo
../../../build/jk2/apache2/jk_handler_logon.lo
../../../build/jk2/apache2/jk_handler_response.lo
../../../build/jk2/apache2/jk_logger_file.lo
../../../build/jk2/apache2/jk_logger_win32.lo
../../../build/jk2/apache2/jk_map.lo ../../../build/jk2/apache2/jk_md5.lo
../../../build/jk2/apache2/jk_msg_ajp.lo
../../../build/jk2/apache2/jk_mutex.lo
../../../build/jk2/apache2/jk_mutex_proc.lo
../../../build/jk2/apache2/jk_mutex_thread.lo
../../../build/jk2/apache2/jk_nwmain.lo
../../../build/jk2/apache2/jk_objCache.lo
../../../build/jk2/apache2/jk_pool.lo
../../../build/jk2/apache2/jk_pool_apr.lo
../../../build/jk2/apache2/jk_registry.lo
../../../build/jk2/apache2/jk_requtil.lo
../../../build/jk2/apache2/jk_shm.lo
../../../build/jk2/apache2/jk_signal.lo
../../../build/jk2/apache2/jk_uriEnv.lo
../../../build/jk2/apache2/jk_uriMap.lo
../../../build/jk2/apache2/jk_user.lo
../../../build/jk2/apache2/jk_vm_default.lo
../../../build/jk2/apache2/jk_workerEnv.lo
../../../build/jk2/apache2/jk_worker_ajp13.lo
../../../build/jk2/apache2/jk_worker_jni.lo
../../../build/jk2/apache2/jk_worker_lb.lo
../../../build/jk2/apache2/jk_worker_run.lo
../../../build/jk2/apache2/jk_worker_status.lo
../../../build/jk2/apache2/jk_jni_aprImpl.lo
../../../build/jk2/apache2/jk_logger_apache2.lo
../../../build/jk2/apache2/jk_map_aprtable.lo
../../../build/jk2/apache2/jk_service_apache2.lo
../../../build/jk2/apache2/mod_jk2.lo

cd ../../../build/jk2/apache2/.libs

cp libmod_jk2.so /apps/usr/local/apache2/modules/

-- Daniel R. <da...@neophi.com> [http://www.neophi.com/]


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>