You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by William Claxton <wi...@openasia.net> on 2003/04/25 04:59:08 UTC

problem compiling modJK2, library not found

Hi folks, 

Fairly new to compilation in Unix here, and trying to compile modJK2
connector, for Apache 2.0.40.  Apparently, we have a library not found
error, during linking.  

Our environment is RH Linux 8, Apache 2.0, and Tomcat 4.1.18.  We have
currently connected Apache and Tomcat using AJP13, but are trying JK2
because the output stream 'flush' function fails with standard modJK.

To prepare for compilation, we're using the configure option, as follows:

	$cd /usr/lib/httpd/jakarta-tomcat-connectors-jk-1.2.2-src/jk/native
	$./buildconf.sh 
	$./configure --with-apxs=/usr/sbin/apxs --with-java-home=${JAVA_HOME} 

A 'Makefile' is created.  Then we proceed with:

	$ make

The compilation fails, apparently during linking.  The last part of the
screen output shows:

	/usr/bin/ld: cannot find -lapr-0
	collect2: ld returned 1 exit status
	make[1]: *** [../../../build/jk2/apache2/jkjni.la] Error 1
	make: *** [jk2-build] Error 1   

A quick check for the 'libapr.so' libraries finds them here:

	$ locate libapr
	/usr/lib/libapr.so.0.0.0
	/usr/lib/libapr.so.0
	/usr/lib/libaprutil.so.0.0.0
	/usr/lib/libaprutil.so.0
	/usr/lib/libaprutil.so
	/usr/lib/libapr.so

Can anyone advise how to ensure that this library is found during linking,
or what we may do to rectify the compilation problem.  Thanks.





        Regards, Bill Claxton [williamc@openasia.net]
        OpenAsia Solutions provides streaming media & payment solutions.
        Check out http://www.openasia.net
........:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::



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


Re: problem compiling modJK2, library not found

Posted by William Claxton <wi...@openasia.net>.
So sorry, you are right.  I copied those lines from our documentation for
the the mod_JK.  The corrected lines (as entered during compilation) should
be:

	$cd jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2
	$./buildconf.sh 
	$./configure --with-apxs2=/usr/sbin/apxs --with-java-home=${JAVA_HOME}

Thanks for pointing this out.

At 09:42 PM 4/24/03 -0700, you wrote:
>I see two problems here:
>1) .../native is where mod_jk lives.  Jk2 is in .../native2.
>2) the configure option --with-apxs is for Apache 1.3.x.  For Apache2 you
>want --with-apxs2.
>
>"William Claxton" <wi...@openasia.net> wrote in message
>news:3.0.1.32.20030425105908.012d22d8@miami...
>> Hi folks,
>>
>> Fairly new to compilation in Unix here, and trying to compile modJK2
>> connector, for Apache 2.0.40.  Apparently, we have a library not found
>> error, during linking.
>>
>> Our environment is RH Linux 8, Apache 2.0, and Tomcat 4.1.18.  We have
>> currently connected Apache and Tomcat using AJP13, but are trying JK2
>> because the output stream 'flush' function fails with standard modJK.
>>
>> To prepare for compilation, we're using the configure option, as follows:
>>
>> $cd /usr/lib/httpd/jakarta-tomcat-connectors-jk-1.2.2-src/jk/native
>> $./buildconf.sh
>> $./configure --with-apxs=/usr/sbin/apxs --with-java-home=${JAVA_HOME}
>>
>> A 'Makefile' is created.  Then we proceed with:
>>
>> $ make
>>
>> The compilation fails, apparently during linking.  The last part of the
>> screen output shows:
>>
>> /usr/bin/ld: cannot find -lapr-0
>> collect2: ld returned 1 exit status
>> make[1]: *** [../../../build/jk2/apache2/jkjni.la] Error 1
>> make: *** [jk2-build] Error 1
>>
>> A quick check for the 'libapr.so' libraries finds them here:
>>
>> $ locate libapr
>> /usr/lib/libapr.so.0.0.0
>> /usr/lib/libapr.so.0
>> /usr/lib/libaprutil.so.0.0.0
>> /usr/lib/libaprutil.so.0
>> /usr/lib/libaprutil.so
>> /usr/lib/libapr.so
>>
>> Can anyone advise how to ensure that this library is found during linking,
>> or what we may do to rectify the compilation problem.  Thanks.
>>
>>
>>
>>
>>
>>         Regards, Bill Claxton [williamc@openasia.net]
>>         OpenAsia Solutions provides streaming media & payment solutions.
>>         Check out http://www.openasia.net
>> ........:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>

        Regards, Bill Claxton [williamc@openasia.net]
        OpenAsia Solutions provides streaming media & payment solutions.
        Check out http://www.openasia.net
........:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::



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


Re: problem compiling modJK2, library not found

Posted by Bill Barker <wb...@wilshire.com>.
I see two problems here:
1) .../native is where mod_jk lives.  Jk2 is in .../native2.
2) the configure option --with-apxs is for Apache 1.3.x.  For Apache2 you
want --with-apxs2.

"William Claxton" <wi...@openasia.net> wrote in message
news:3.0.1.32.20030425105908.012d22d8@miami...
> Hi folks,
>
> Fairly new to compilation in Unix here, and trying to compile modJK2
> connector, for Apache 2.0.40.  Apparently, we have a library not found
> error, during linking.
>
> Our environment is RH Linux 8, Apache 2.0, and Tomcat 4.1.18.  We have
> currently connected Apache and Tomcat using AJP13, but are trying JK2
> because the output stream 'flush' function fails with standard modJK.
>
> To prepare for compilation, we're using the configure option, as follows:
>
> $cd /usr/lib/httpd/jakarta-tomcat-connectors-jk-1.2.2-src/jk/native
> $./buildconf.sh
> $./configure --with-apxs=/usr/sbin/apxs --with-java-home=${JAVA_HOME}
>
> A 'Makefile' is created.  Then we proceed with:
>
> $ make
>
> The compilation fails, apparently during linking.  The last part of the
> screen output shows:
>
> /usr/bin/ld: cannot find -lapr-0
> collect2: ld returned 1 exit status
> make[1]: *** [../../../build/jk2/apache2/jkjni.la] Error 1
> make: *** [jk2-build] Error 1
>
> A quick check for the 'libapr.so' libraries finds them here:
>
> $ locate libapr
> /usr/lib/libapr.so.0.0.0
> /usr/lib/libapr.so.0
> /usr/lib/libaprutil.so.0.0.0
> /usr/lib/libaprutil.so.0
> /usr/lib/libaprutil.so
> /usr/lib/libapr.so
>
> Can anyone advise how to ensure that this library is found during linking,
> or what we may do to rectify the compilation problem.  Thanks.
>
>
>
>
>
>         Regards, Bill Claxton [williamc@openasia.net]
>         OpenAsia Solutions provides streaming media & payment solutions.
>         Check out http://www.openasia.net
> ........:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::




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


Re: problem compiling modJK2, library not found

Posted by Mark Eggers <it...@yahoo.com>.
William,

It looks like there are a couple of things going on.

You said you would like to try mod_jk2, but the source
you have referenced is for mod_jk.

Here's the stuff I wrote up earlier.  It's based on
Redhat Linux 9.

1. Download
jakarta-tomcat-connectors-jk2-2.0.2-src.tar.gz from
  
http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk2/release/v2.0.2/src/

2. Uncompress it and extract the tar file.

3. cd to
jakarta-tomcat-connectors-jk2-2.0.2-src/jk/native2

4. chmod u+x configure

5. Run configure with:

./configure
  --with-apxs2=<apache-root-directory>/bin/apxs \
  --with-tomcat41=<tomcat-root-directory> \
  --with-java-home=<java-root-directory> \
  --with-jni \
  --with-pcre

For example:

./configure --with-apxs2=/home/apache/bin/apxs \
  --with-tomcat41=/home/tomcat \
  --with-java-home=/usr/java \
  --with-jni \
  --with-pcre

6. Run make

7. The two .so files (mod_jk2.so and jkjni.so) will be
in:

jakarta-tomcat-connectors-jk2-2.0.2-src/jk/build/jk2/apache2

8. Copy those to files to
<apache-root-directory>/modules with the proper
permissions.

9. Configure and restart

Second of all, it looks like you're using the Redhat
RPM for Apache 2.0.40.  Redhat places stuff all over
the map, and since it wasn't compiled that way apxs
has no clue as to where to look.

You can try to get around it by saying:

--with-apr-lib=<directory>
--with-apr-include=<directory>

Do a ./configure --help for the exact syntax since I
am writing this from my Windows box and can't check
it.

I recommend uninstalling both the Redhat Apache RPM
and the Apache config RPM.  Then download
httpd-2.0.45.tar.gz, uncompress, and untar it.

Change to the directory and run configure with:

--enable-modules=all --enable-shared=most
--enable-module-ssl --enable-mod-shared=ssl

Again, check the exact syntax with ./configure --help

Compile, install, and then you can build mod_jk2
without having to specify where the apr libraries are.

HTH

/mde/
just my two cents . . .

__________________________________________________
Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo
http://search.yahoo.com

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