Hi Christopher,

this usually happens, if the value of the CC environment variable during the creation of libtool differs from the one used when you are using libtool.

For example: one might use CC="gcc -specs=/my/own/specs/file" when libtool gets created and later use CC=gcc during mod_jk compilation. This will result in the same error message.

libtool will ignore additional params relative to the original CC, but not missing ones.

If I check for the CC settings in my libtool it says:

% grep CC= libtool
LTCC="gcc "
CC="gcc "
LTCC="gcc "
CC="g++"
LTCC="gcc "
CC="g77"

The last two pairs come from the configurations for C++ and Fortran, the first one is the one used for C.

I instrumented my libtool like this, when I first ran into the same problem:

--- libtool.orig        2007-02-09 16:16:53.000000000 +0100
+++ libtool     2007-05-11 18:17:11.697064728 +0200
@@ -537,6 +537,9 @@
 # arg is usually of the form 'gcc ...'
 func_infer_tag ()
 {
+    echo "Starting func_infer_tag..."
+    echo "available_tags: $available_tags"
+    echo "tagname: $tagname"
     if test -n "$available_tags" && test -z "$tagname"; then
       CC_quoted=
       for arg in $CC; do
@@ -547,6 +550,7 @@
        esac
        CC_quoted="$CC_quoted $arg"
       done
+ echo "Checking against: $CC * | $CC * | `$echo $CC` * | `$echo $CC` * | $CC_quoted* | $CC_quoted * | `$echo $CC_quoted` * | `$echo $CC_quoted` *)"
       case $@ in
       # Blanks in the command may have been stripped by the calling shell,
       # but not from the CC environment variable when configure was run.
@@ -1063,6 +1067,7 @@
       ;;
     esac

+    echo "Calling func_infer_tag $base_compile"
     func_infer_tag $base_compile

     for arg in $later; do
@@ -1424,6 +1429,7 @@
     vinfo=
     vinfo_number=no

+    echo "Calling func_infer_tag $base_compile"
     func_infer_tag $base_compile

     # We need to know -static, to get the right output filenames.

Yours might vary slightly, depending on your libtool version.

HTH.

Regards,

Rainer

Christopher Schultz wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

All,

I finally beat my Debian installation into submission so it would
install "apxs" so I could build mod_jk for my package-managed apache2
(have been running from source for a loooong time).

Right out of the box, mod_jk won't build:

$ wget
'http://www.ibiblio.org/pub/mirrors/apache/tomcat/tomcat-connectors/jk/source/jk-1.2.22/tomcat-connectors-1.2.22-src.tar.gz'
$ tar xzf tomcat-connectors-1.2.22-src.tar.gz
$ cd cd tomcat-connectors-1.2.22-src/native
$ ./configure --with-apxs=/usr/bin/apxs2
$ make

Making all in common
make[1]: Entering directory
`/usr/local/src/tomcat-connectors-1.2.22-src/native/common'
/usr/share/apr-1.0/build/libtool --silent --mode=compile gcc
- -I/usr/include/apache2 -g -O2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
- -DLINUX=2 -D_REENTRANT -I/usr/include/apr-1.0 -I/usr/include/openssl
- -I/usr/include/postgresql -I/usr/include/xmltok -pthread   -DHAVE_APR
- -I/usr/include/apr-1.0 -I/usr/include/apr-1.0 -g -O2  -I /include -I
/include/ -c jk_ajp12_worker.c -o jk_ajp12_worker.lo
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make[1]: *** [jk_ajp12_worker.lo] Error 1
make[1]: Leaving directory
`/usr/local/src/tomcat-connectors-1.2.22-src/native/common'
make: *** [all-recursive] Error 1

I searched for similar errors online and I found this "workaround" that
frankly doesn't make any sense to me (the instructions don't appear to
allow me to make any progress):

http://www.trustix.net/wiki/index.php?title=Mod_JK&printable=yes (search
for "unable to infer").

For instance, the "workaround" suggests that I should look for messages
about the configure script creating libtool and then "appending
configuration tags". I don't see that when I run configure, so I'm
unsure of what to do next.

It seems obvious that I should try to simply add the CXX tag to the
libtool invocation (even though I'm not entirely sure it's what I need)
but can anyone explain what's going wrong and why it doesn't work out of
the box?

I'd be happy to try a bunch of things to help the super mod_jk
developers improve the package.

Thanks,
- -chris

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to