Bug 32787

Summary: apxs reports the wrong location for LIBTOOL
Product: Apache httpd-2 Reporter: william.barker
Component: supportAssignee: Apache HTTPD Bugs Mailing List <bugs>
Status: CLOSED FIXED    
Severity: normal Keywords: PatchAvailable
Priority: P2    
Version: 2.1-HEAD   
Target Milestone: ---   
Hardware: PC   
OS: Solaris   
URL: http://brutus.apache.org/gump/public/jakarta-tomcat-connectors/jakarta-tomcat-jk-native/gump_work/build_jakarta-tomcat-connectors_jakarta-tomcat-jk-native.html
Attachments: Patch based on httpd.spec to set LIBTOOL correctly
Patch to set ${LTFLAGS}

Description william.barker 2004-12-21 06:02:57 UTC
Using with-layout=Apache and the latest version of apr, the command 
`${prefix}/bin/apxs -q LIBTOOL` reports the location as 
${prefix}/build/libtool.  However, there is no such file at that location.  It 
looks like it should be reporting ${apr}/build-1/libtool.
Comment 1 Paul Querna 2005-03-08 22:29:40 UTC
The httpd.spec file already has an evil work around for this:
sed -e "/^LIBTOOL/s|/[^ ]*/libtool|`/usr/bin/apr-1-config --apr-libtool`|" \

I guess we need move that into the Makefile itself sometime.
Comment 2 william.barker 2005-03-11 04:44:08 UTC
Created attachment 14460 [details]
Patch based on httpd.spec to set LIBTOOL correctly

Some of the other edits done by httpd.spec might be worth including, but they
look like they are mostly for cleaness.  

The patch works for me both with APR packaged, and separate.
Comment 3 jfclere 2005-05-19 12:53:25 UTC
The patch also fix problems like the following (when using
--enable-experimental-libtool in Apache configure):
+++
jfclere@vtxclere:~/jakarta-tomcat-connectors/jk/native> make
Making all in common
make[1]: Entering directory
`/home/jfclere/jakarta-tomcat-connectors/jk/native/common'
/bin/sh /home/apache20/apache20/build/libtool --silent --mode=compile gcc
-I/home/apache20/apache20/include -g -O2 -g -O2 -pthread -DHAVE_APR 
-I/home2/apache20/apache/httpd-2.0/srclib/apr/include -g -O2 -DLINUX=2
-D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
-I/home2/apache20/apache/httpd-2.0/srclib/pcre -I
/home2/java/j2sdk1.4.2_03/include -I /home2/java/j2sdk1.4.2_03/include/ -c
jk_ajp12_worker.c
/home/apache20/apache20/build/libtool: /home/apache20/apache20/build/libtool:
cannot execute binary file
make[1]: *** [jk_ajp12_worker.lo] Error 126
make[1]: Leaving directory
`/home/jfclere/jakarta-tomcat-connectors/jk/native/common'
make: *** [all-recursive] Error 1
+++
Comment 4 william.barker 2005-06-03 00:58:44 UTC
jfclere has already applied the patch
Comment 5 william.barker 2005-06-16 04:31:14 UTC
This is back to being broken again.  Now, due to an unexpanded variable being 
saved off, it simply returns an error when you attempt to do `apxs -q LIBTOOL`.
Comment 6 william.barker 2005-06-16 04:36:22 UTC
Created attachment 15429 [details]
Patch to set ${LTFLAGS}

This patch uses the value of LTFLAGS that is in effect when 'configure' is run.
 This seems to be the most sensible value to use.  Before (when axps was last
working), it was using the value in effect when 'make install' was run, which
seems a bit strange.
Comment 7 Joe Orton 2005-06-16 12:23:21 UTC
Thanks for the patch William, committed to the trunk.

http://svn.apache.org/viewcvs.cgi?rev=190893&view=rev
Comment 8 william.barker 2005-06-18 05:27:20 UTC
Gump is now happily building mod_jk once again against httpd-SVN-trunk, and 
the Tomcat developers are now spared getting all of the build-failed messages.

Thanks much!