From: "jean-frederic clere" <[EMAIL PROTECTED]>
Clere, Jean-Frederic wrote:
Kurt Miller wrote:
Checking out the apache2 makefile it looks like apr-0 is right. Here's a revised patch (I missed a spot).
Index: jk/support/jk_apr.m4 =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v retrieving revision 1.3 diff -u -r1.3 jk_apr.m4 --- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 -0000 1.3 +++ jk/support/jk_apr.m4 30 Oct 2003 22:11:05 -0000 @@ -99,7 +99,7 @@ APR_CLEAN="apr-clean" APR_DIR=${tempval} APR_INCDIR="${tempval}/include" - APR_LDFLAGS="${tempval}/.libs/libapr.a" + APR_LDFLAGS="${tempval}/.libs/libapr-0.a" APR_LIBDIR="" use_apr=true COMMON_APR_OBJECTS="\${COMMON_APR_OBJECTS}" @@ -189,7 +189,7 @@ APR_CLEAN="" APR_DIR="" APR_LIBDIR=${tempval} - APR_LDFLAGS="-lapr -L${tempval}" + APR_LDFLAGS="-lapr-0 -L${tempval}" COMMON_APR_OBJECTS="\${COMMON_APR_OBJECTS}" use_apr=true fi
----- Original Message ----- From: "Kurt Miller" <[EMAIL PROTECTED]> To: "Tomcat Developers List" <[EMAIL PROTECTED]> Sent: Thursday, October 30, 2003 4:32 PM Subject: jk2/apr patch
Getting ready for jk2 requiring apr (even for Apache13)... Building
jk2
using:
./configure --with-apxs=/usr/sbin/apxs --with-apr=<apr src loc> &&
make
linking fails because the apr library is not named libapr.a it is
named
libapr-0.a. I'm not sure if this naming problem is universal for all platforms, but libapr-0.a appears to be the correct name for OpenBSD,
FreeBSD and NetBSD. If it is universal then here's a quick patch to change it:
Index: jk/support/jk_apr.m4 =================================================================== RCS file: /home/cvspublic/jakarta-tomcat-connectors/jk/support/jk_apr.m4,v retrieving revision 1.3 diff -u -r1.3 jk_apr.m4 --- jk/support/jk_apr.m4 25 Sep 2003 15:23:56 -0000 1.3 +++ jk/support/jk_apr.m4 30 Oct 2003 21:03:16 -0000 @@ -99,7 +99,7 @@ APR_CLEAN="apr-clean" APR_DIR=${tempval} APR_INCDIR="${tempval}/include" - APR_LDFLAGS="${tempval}/.libs/libapr.a" + APR_LDFLAGS="${tempval}/.libs/libapr-0.a" APR_LIBDIR="" use_apr=true COMMON_APR_OBJECTS="\${COMMON_APR_OBJECTS}"
If this name needs to be libapr.a for other platforms, then I guess I
could
patch the apr-build target in Makefile.in to rename it. Any thoughts?
-1. We have to use apr-config to get the name of the apr library. Look in the web-app deprecated code (in wa_apr.m4).
For example I have with APR for CVS: +++ [EMAIL PROTECTED]:~/apr > apr-config --link-ld --libs -L/home/jfclere/apr -lapr-1 -lrt -lm -lcrypt -lnsl -lpthread -ldl [EMAIL PROTECTED]:~/apr > find . -name "*.so" -print ./.libs/libapr-1.so +++
Ok thanks for the heads up, I've look briefly at wa_apr.m4 now. I've got a question or two.... I think there are two cases:
1) when --with-apr is specified 2) when --with-apr-include and --with-apr-lib are specified
In case one the apr src directory is given and jk2 builds apr using the apr-build target in the native2 makefile. The apr-build target does a ./configure && make for apr when building jk2. When configuring jk2, apr-config is not guaranteed to be available.
Right apr-config is not available before configuring apr.
The webapp connector required apr to be built from source for Apache13 and configured apr while configuring itself. Should jk2 also make this requirement?
Yes.
It appears the webapp connector did it to ensure the same complier was used and that apr was configured without threads for Apache13.
In the second case the apr src dir is not specified, so apr-config is not available again. The webap connector used it to get the lib name. I'm not sure what the best method for determining the lib name in this case. Currently the the lib name is hardcoded to libapr.a for apache13 and libapr-0 for apache2. Any suggestions?
find + awk?
+++
NUMVERAPR=`find ${tempval} -name "*.la" | awk -F - '{ print $2 }' | awk -F . '{ print $1 }'
APR_LDFLAGS="-lapr-${NUMVERAPR} -L${tempval}"
+++
-Kurt
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]