tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aja...@sdyn.com
Subject Problems building mod_jk and mod_jk2 for apache2, tomcat41 on redhat 6.2
Date Sun, 01 Jun 2003 20:44:32 GMT
Hello tomcat-user experts,

I have been trying to build mod_jk and mod_jk2 for apache 2.0.45 (also
tried 2.0.46), tomcat 4.1.24 on redhat linux 6.2 (kernel 2.2.14-5.0), glibc
2.1.3-21, and libtool 1.3.4-3.  I can get both to configure and make ok,
but there is no resulting .so file(s) in the apache-2.0 directory.  At one
point, I did find an .so file in 1.3 directory (I'm also running 1.3 on
this system), but can not get one to create for 2.0.

On mod_jk 1.2.3, here is the output from buildconf.sh:
$ ./buildconf.sh
libtoolize --force --automake --copy
aclocal
automake -a --foreign -i --copy
automake: configure.in: installing `scripts/build/unix/install-sh'
    error while copying

automake: configure.in: installing `scripts/build/unix/mkinstalldirs'
    error while copying

automake: configure.in: installing `scripts/build/unix/missing'
    error while copying

autoconf
$

Here is the output from configure:
$ ./configure --with-apxs=/usr/local/apache2/bin/apxs
--with-java-home=/usr/local/jdk1.3.1_08 --with-java-platform=2 -enable-jni
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking host system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for ranlib... ranlib
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
updating cache ./config.cache
checking for object suffix... o
checking for executable suffix... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions ... yes
checking if gcc static flag -static works... -static
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking command to parse /usr/bin/nm -B output... ok
checking how to hardcode library paths into programs... immediate
checking for /usr/bin/ld option to reload object files... -r
checking dynamic linker characteristics... Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for objdir... .libs
checking for dlopen in -ldl... yes
checking for dlfcn.h... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
creating libtool
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -g -O2 ) works... yes
checking whether the C compiler (gcc -g -O2 ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for ld used by GCC... (cached) /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... (cached) yes
checking for test... /usr/bin/test
checking for rm... /bin/rm
checking for grep... /bin/grep
checking for echo... /bin/echo
checking for sed... /bin/sed
checking for cp... /bin/cp
checking for mkdir... /bin/mkdir
checking for libtool... /usr/bin/libtool
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
building connector for "apache-2.0"
checking for target platform... unix
no apache given
jni enable (need JDK)
checking for JDK location (please wait)... /usr/local/jdk1.3.1_08
checking Java platform... forced Java 2
checking os_type directory...  linux
updating cache ./config.cache
creating ./config.status
creating Makefile
creating apache-1.3/Makefile
creating apache-1.3/Makefile.apxs
creating apache-2.0/Makefile
creating apache-2.0/Makefile.apxs
creating common/Makefile
creating common/list.mk
creating jni/Makefile
$

Since moving to Apache 2.0.46, I've picked up some libtool errors I don't
remember getting while on 2.0.45.  They happen during link:

$ make
... <truncated> ...
make[1]: Entering directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native/jni'
/bin/sh /usr/local/apache2/build/libtool --silent --mode=compile gcc
-I/usr/local/apache2/include -g -O2 -DHAVE_JNI -I
/usr/local/jdk1.3.1_08/include -I /usr/local/jdk1.3.1_08/include/linux
-I../common -D_REENTRANT  -c jk_jnicb.c
/bin/sh /usr/local/apache2/build/libtool --silent --mode=link gcc
-I/usr/local/apache2/include -g -O2 -DHAVE_JNI -I
/usr/local/jdk1.3.1_08/include -I /usr/local/jdk1.3.1_08/include/linux
-I../common -D_REENTRANT  -module -o jk_jnicb.la -rpath `pwd` -g -O2
-avoid-version jk_jnicb.lo ../common/jk_map.lo ../common/jk_util.lo
../common/jk_pool.lo
libtool: link: `../common/jk_map.lo' is not a valid libtool object



Next, I tried without JNI (notice the error above happens in jk/native/jni
directory)

$ ./configure --with-apxs=/usr/local/apache2/bin/apxs
creating cache ./config.cache
checking for a BSD compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking whether make sets ${MAKE}... yes
checking for working aclocal... found
checking for working autoconf... found
checking for working automake... found
checking for working autoheader... found
checking for working makeinfo... found
checking host system type... i686-pc-linux-gnu
checking build system type... i686-pc-linux-gnu
checking for ranlib... ranlib
checking for gcc... gcc
checking whether the C compiler (gcc  ) works... yes
checking whether the C compiler (gcc  ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking for ld used by GCC... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
updating cache ./config.cache
checking for object suffix... o
checking for executable suffix... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.lo... yes
checking if gcc supports -fno-rtti -fno-exceptions ... yes
checking if gcc static flag -static works... -static
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the linker (/usr/bin/ld) supports shared libraries... yes
checking command to parse /usr/bin/nm -B output... ok
checking how to hardcode library paths into programs... immediate
checking for /usr/bin/ld option to reload object files... -r
checking dynamic linker characteristics... Linux ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for objdir... .libs
checking for dlopen in -ldl... yes
checking for dlfcn.h... yes
checking whether a program can dlopen itself... yes
checking whether a statically linked program can dlopen itself... no
creating libtool
loading cache ./config.cache
checking for gcc... (cached) gcc
checking whether the C compiler (gcc -g -O2 ) works... yes
checking whether the C compiler (gcc -g -O2 ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for ld used by GCC... (cached) /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... (cached) yes
checking for test... /usr/bin/test
checking for rm... /bin/rm
checking for grep... /bin/grep
checking for echo... /bin/echo
checking for sed... /bin/sed
checking for cp... /bin/cp
checking for mkdir... /bin/mkdir
checking for libtool... /usr/bin/libtool
need to check for Perl first, apxs depends on it...
checking for perl... /usr/bin/perl
building connector for "apache-2.0"
checking for target platform... unix
no apache given
updating cache ./config.cache
creating ./config.status
creating Makefile
creating apache-1.3/Makefile
creating apache-1.3/Makefile.apxs
creating apache-2.0/Makefile
creating apache-2.0/Makefile.apxs
creating common/Makefile
creating common/list.mk
creating jni/Makefile

then make:

$ make
... <truncated> ...
make[1]: Entering directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native/apache-2.0'
/bin/sh /usr/local/apache2/build/libtool --silent --mode=compile gcc
-I/usr/local/apache2/include -g -O2 -DUSE_APACHE_MD5 -I ../common  -I
/include -I /include/unix -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -pthread -g -O2 -g -O2
-pthread -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
-D_SVID_SOURCE -D_GNU_SOURCE -c mod_jk.c
/bin/sh /usr/local/apache2/build/libtool --silent --mode=link gcc
-I/usr/local/apache2/include -g -O2 -DUSE_APACHE_MD5 -I ../common  -I
/include -I /include/unix -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -pthread -g -O2 -g -O2
-pthread -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
-D_SVID_SOURCE -D_GNU_SOURCE -o mod_jk.la -module -rpath
/usr/local/apache2/modules -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
libtool: link: `../common/jk_ajp12_worker.lo' is not a valid libtool object
make[1]: *** [mod_jk.la] Error 1
make[1]: Leaving directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native/apache-2.0'
make: *** [all-recursive] Error 1


So, I tried moving back to Apache 2.0.45 (re-did make install from src
directory).  Then, make picked up where it left off, above, and worked:

$ make
Making all in common
make[1]: Entering directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native/common'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native/common'
Making all in apache-2.0
make[1]: Entering directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native/apache-2.0'
/bin/sh /usr/local/apache2/build/libtool --silent --mode=link gcc
-I/usr/local/apache2/include -g -O2 -DUSE_APACHE_MD5 -I ../common  -I
/include -I /include/unix -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500
-D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -g -O2 -pthread -g -O2 -g -O2
-pthread -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
-D_SVID_SOURCE -D_GNU_SOURCE -o mod_jk.la -module -rpath
/usr/local/apache2/modules -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 /usr/local/apache2/build/libtool --silent --mode=install cp
mod_jk.la `pwd`/mod_jk.so
libtool: install: warning: remember to run `libtool --finish
/usr/local/apache2/modules'
make[1]: Leaving directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native/apache-2.0'
make[1]: Entering directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native'
make[1]: Nothing to be done for `all-am'.
make[1]: Leaving directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native'
target="all"; \
list='common apache-2.0'; \
for i in $list; do \
    echo "Making $target in $i"; \
    if test "$i" != "."; then \
       (cd $i && make $target) || exit 1; \
    fi; \
done;
Making all in common
make[1]: Entering directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native/common'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native/common'
Making all in apache-2.0
make[1]: Entering directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native/apache-2.0'
/bin/sh /usr/local/apache2/build/libtool --silent --mode=install cp
mod_jk.la `pwd`/mod_jk.so
libtool: install: warning: remember to run `libtool --finish
/usr/local/apache2/modules'
make[1]: Leaving directory
`/usr/local/jakarta-tomcat-connectors-jk-1.2.3-src/jk/native/apache-2.0'


Everything seems to look fine, but there is no mod_jk.so file in the
apache-2.0 directory:

$ ls -al apache-2.0
total 1196
drwxr-xr-x    3 154      wheel        4096 Jun  1 17:46 .
drwxr-xr-x   13 154      wheel        4096 Jun  1 17:48 ..
-rw-r--r--    1 154      wheel          49 Aug 30  2001 .cvsignore
drwxrwxr-x    2 root     root         4096 Jun  1 17:46 .libs
-rw-rw-r--    1 root     root         2314 Jun  1 17:34 Makefile
-rw-rw-r--    1 root     root          727 Jun  1 17:34 Makefile.apxs
-rw-r--r--    1 154      wheel         661 May 22  2002 Makefile.apxs.in
-rwxr-xr-x    1 154      wheel        2131 Sep  9  2002 Makefile.in
-rw-r--r--    1 154      wheel        9060 Dec 17 04:44 bldjk.qclsrc
-rw-r--r--    1 154      wheel         448 Jul  6  2001 config.m4
-rw-r--r--    1 root     root       928482 Jun  1 17:46 mod_jk.a
-rw-r--r--    1 154      wheel       81570 May 15 17:35 mod_jk.c
-rw-r--r--    1 154      wheel        7129 Jan 16  2002 mod_jk.dsp
-rw-rw-r--    1 root     root          663 Jun  1 17:46 mod_jk.la
-rw-rw-r--    1 root     root          288 Jun  1 17:38 mod_jk.lo
-rw-rw-r--    1 root     root       132404 Jun  1 17:38 mod_jk.o


I notice the message "libtool: install: warning: remember to run `libtool
--finish /usr/local/apache2/modules'", and do so from the current
directory.  I get a nice message that libraries have been installed in
/usr/local/apache2/modules, but ls -al /usr/local/apache2/modules shows
nothing was actually installed:

$ libtool --finish /usr/local/apache2/modules
PATH="$PATH:/sbin" ldconfig -n /usr/local/apache2/modules
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/apache2/modules

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
$ ls -al /usr/local/apache2/modules
total 3472
drwxr-xr-x    2 root     root         4096 May 29 23:41 .
drwxr-xr-x   15 root     root         4096 May 25 01:33 ..
-rw-rw-r--    1 root     root         8145 May 25 01:31 httpd.exp
-rwxr-xr-x    1 root     root      3533003 May 26 20:18 libphp4.so

I tried the libtool command from the apache-2.0 directory with the same
results.

Next, tried doing a make clean and make distclean, then re-configured with
jni.  Configure and make gave no errors, but as with above, there were no
.so files in apache-2.0 or jni directory.  I backed out to the top level
src directory and did a find . -name "*.so" to verify they weren't stashed
somewhere else.

Can anyone tell me what I'm doing wrong??  Help would be truly
appreciated!!

Thanks kindly.

cheers,
albert



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message