You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ga...@Holset.com on 2002/05/03 12:32:34 UTC

Apache 2.0.35 and Mod_jk 4.0.2-01 on sparc solaris 7 (2.7) link problems

Hello all

As I see many others have had the same problems Im having building the mod_jk.so.
After trying everything recommended Im still having problems.

Quick history -

Downloaded and built the apache server v2.0.35 - no problems
Downloaded and unpacked jakarta-tomcat-connectors-4.0.2-01-src.
Downloaded and installed gcc 2.95.3
Using the build-unix.sh in ~/jakarta-tomcat-connectors-4.0.2-01-src/jk/native/apache2

Which I modified for my setup

INCLUDE="-L$APACHE_HOME/lib -I../common -I/usr/lib -I$APACHE_HOME/include -I$APACHE_HOME/lib $JAVA_INCLUDE
$APXS -lposix4 -lxnet -ldl -c -o mod_jk.so $INCLUDE $SRC

I modified the vars in apxs as recommended by all the archives I had read.

     my $exec_prefix    = get_vars("exec_prefix");
     my $CFG_TARGET     = q(httpd);
     my $CFG_SYSCONFDIR = get_vars("sysconfdir");
     my $CFG_CFLAGS        = q( -DUSE_EXPAT -I/usr/local/include -I../lib/expat-lite);
     my $includedir     = get_vars("includedir");
     my $CFG_INCLUDEDIR = eval qq("$includedir");
     my $CFG_CC         = q(/usr/local/bin/gcc);
     my $libexecdir     = get_vars("libexecdir");
     my $CFG_LIBEXECDIR = eval qq("$libexecdir");
     my $sbindir        = get_vars("sbindir");
     my $CFG_SBINDIR    = eval qq("$sbindir");
     my $ltflags        = $ENV{'LTFLAGS'};
     my $CFG_CFLAGS_SHLIB  = q( -fPIC -DSHARED_MODULE);
     my $CFG_LD_SHLIB      = q(ld);
     my $CFG_LDFLAGS_SHLIB = q( -G);

At first I had link problems where the apxs script was pushing the .lo files and not .o files onto an array for the link command.
(After a hasty lesson in perl)

in apxs line 431

unshift(@objs, $lo);
should be
unshift(@objs, $o);

I now see a lot of undefined symbol errors mainly in the mod_jk.o file.

apr_date_parse_http                 mod_jk.o
ap_os_escape_path                   mod_jk.o
etc

I have found some of these symbols by doing a nm command on files in $APACHE_HOME/lib

cd $APACHE_HOME/lib
for file in `ls`
do
echo "Current file $file"
nm $file | grep apr_date_parse_http
done

and see results like

current file libaprutil.a
[15]    |       124|      20|OBJT |GLOB |0    |4      |$XBEwwXgMsRz8CPx.apr_date_parse_http.__func__

Im not a c programmer but I assume that means the symbol/function is available in that library.

After a auick lesson in gcc I added the -L$APACHE_HOME/lib and -laprutil to the link command but still get the same symbols missing.

After a couple of days on this I think I need help.

Gary




--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>