You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2007/05/11 15:51:34 UTC
[mod_jk] 1.2.22 won't build (libtool error) :(
-----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
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGRHTm9CaO5/Lv0PARAjxGAJ40wrviGtDwqgZnBV2udp2mXnGZbQCeMC/G
PN4W2s78DlxrC1e26w3/V/Y=
=JXCs
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :(
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Mladen,
Mladen Turk wrote:
> Christopher Schultz wrote:
>
>> 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
>>
>
> Can you compile the Apache Httpd with that libtool?
I'm building mod_jk for a binary (package-managed) installation of
Apache, so I don't actually have the source of the package-managed
binary (for neither libapr - the source of this libtool - nor httpd itself).
>> I'd be happy to try a bunch of things to help the super mod_jk
>> developers improve the package.
>
> The best would be you provide a working patch :)
Of course. :)
Unfortunately, I have no idea what's actually going on. This is pretty
much my first look ever at libtool. I don't even know what it does. :(
> I'm sure it works with 'libtool --version'
> ltmain.sh (GNU libtool) 1.5.6 (1.1220.2.95 2004/04/11 05:50:42)
It looks like I have a /usr/bin/libtool:
$ /usr/bin/libtool --version
ltmain.sh (GNU libtool) 1.5.22 Debian 1.5.22-4 (1.1220.2.365 2005/12/18
22:14:06)
and I have a /usr/share/apr-1.0/build/libtool:
$ /usr/share/apr-1.0/build/libtool --version
ltmain.sh (GNU libtool) 1.5.20 (1.1220.2.287 2005/08/31 18:54:15)
Since apxs has apparently configured the mod_jk build to use
/usr/share/apr-1.0/build/libtool, that's the one I modified at Rainer's
request (see my other post).
> You might try deleting configure and running
> buildconf.sh by yourself. It might help, but not sure.
Uh... okay. How do I do that? (Sorry for the request for baby-stepping
me through this... I just don't want to run around like a bull in a
china shop when I don't know what I'm doing.)
Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGRMF29CaO5/Lv0PARAvNgAKC1T5IlI8R2bqERUEKEBjUNVYZ1JACfWXbD
OXVL1MHcuMO0msHGjA0eyV0=
=lxvx
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :(
Posted by Mladen Turk <ml...@gmail.com>.
Christopher Schultz wrote:
> 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
>
Can you compile the Apache Httpd with that libtool?
>
> I'd be happy to try a bunch of things to help the super mod_jk
> developers improve the package.
>
The best would be you provide a working patch :)
I'm sure it works with 'libtool --version'
ltmain.sh (GNU libtool) 1.5.6 (1.1220.2.95 2004/04/11 05:50:42)
You might try deleting configure and running
buildconf.sh by yourself. It might help, but not sure.
Regards,
Mladen.
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :(
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
All,
How does CC get picked when configure runs? I tried reading the
configure script but got lost pretty quickly.
It looks like apxs knows what CC should be set to, though:
$ apxs2 -q CC
i486-linux-gnu-gcc
Does it make sense for configure to use apxs to configure its compiler?
I would certainly try this and submit a patch if I knew the right way to
do it ;)
Thanks for the continued help,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGROHh9CaO5/Lv0PARAivhAKCE4id93MtAEKevc3m7J+jlaib4mQCghYdc
QQUgN3RTWnfPhor8ifrt/Y4=
=VOC8
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :( [SOLVED]
Posted by Rainer Jung <ra...@kippdata.de>.
All changes to project files are done via version control (svn) and get
automatically send out to the dev list. Any tomcat-dev archive contains
the messages.
This one for instance can be found at:
http://marc.info/?l=tomcat-dev&m=117908298415733&w=2
The only file which changed was configure.in. The diff looks longer than
it is logically, because a long part had to be moved and thus we have a
long block of "+" and corresponding "-".
Regards,
Rainer
Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Rainer,
>
> Rainer Jung wrote:
>> Hi Christopher,
>>
>> I've now reordered configure and added a warning at the end, in case
>> CC doesn't really fit, to what apxs spits out.
>
> Excellent!
>
>> You might want to test the new configure script. For convenience you
>> can find it at http://people.apache.org/~rjung/mod_jk-dev/configure
>
> Here's the new configure output:
>
> $ ./configure --with-apxs=/usr/bin/apxs2
> ...
> checking for gcc... i486-linux-gnu-gcc (used to say "gcc")
> ...
>
> $ make
>
> (works)
>
> I'd be interested to see the changes to the sources that generate the
> configure script (then I might know enough to be dangerous).
>
> Thanks for looking into this, Rainer.
>
> - -chris
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :( [SOLVED]
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Rainer,
Rainer Jung wrote:
> Hi Christopher,
>
> I've now reordered configure and added a warning at the end, in case
> CC doesn't really fit, to what apxs spits out.
Excellent!
> You might want to test the new configure script. For convenience you
> can find it at http://people.apache.org/~rjung/mod_jk-dev/configure
Here's the new configure output:
$ ./configure --with-apxs=/usr/bin/apxs2
...
checking for gcc... i486-linux-gnu-gcc (used to say "gcc")
...
$ make
(works)
I'd be interested to see the changes to the sources that generate the
configure script (then I might know enough to be dangerous).
Thanks for looking into this, Rainer.
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGSFwl9CaO5/Lv0PARAmcTAJ99EVNbsOC7dq7qRucctg0w7VAbKACgiV2X
h5XKmTFAEVJ4ywYRZRMwqX4=
=O7S4
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :(
Posted by Rainer Jung <ra...@kippdata.de>.
Hi Christopher,
> Perhaps this (potential - I've /never/ seen it on other systems) issue
> could be avoided by adding a bit of documentation to the BUILD.txt file
> that says "if you get a weird error about tags not being defined, try
> running this:
>
> export CC=`apxs -q CC`
>
I've now reordered configure and added a warning at the end, in case CC
doesn't really fit, to what apxs spits out.
You might want to test the new configure script. For convenience you can
find it at
http://people.apache.org/~rjung/mod_jk-dev/configure
Regards,
Rainer
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :(
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Rainer,
Thanks for the explanations of everything. I'm still certainly not ready
to become an autoconf master, but...
Rainer Jung wrote:
> In case we build an Apache httpd 2.x module, we are using the httpd
> provided instance of libtool for maximum module compatibility. We find
> this libtool by querying apxs -q LIBTOOL.
Okay, this makes sense, then: I'm using Apache httpd 2.x, so the local
libtool is ignored.
> ==== From your other message ====
>
>> How does CC get picked when configure runs? I tried reading the
>> configure script but got lost pretty quickly.
>
> configure is produced out of configure.in by a toolchain including
> autoconf and automake. In configure.in there is an autoconf macro named
> AC_PROG_CC that includes a predefined script to detect the correct
> compiler.
My configure.in contains only this line:
AC_PROG_CC
... with nothing specified.
I wish I knew enough about m4 and autoconf to be able to even guess what
to put in here.
Perhaps this (potential - I've /never/ seen it on other systems) issue
could be avoided by adding a bit of documentation to the BUILD.txt file
that says "if you get a weird error about tags not being defined, try
running this:
export CC=`apxs -q CC`
?
Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGRcPP9CaO5/Lv0PARAuMqAKCIow33Rcm1+4eluLniYqOO0cc2MgCfct6f
t/8cqe+Clonk2kLk41H5Jac=
=DXLc
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :(
Posted by Rainer Jung <ra...@kippdata.de>.
> Okay, I tried this:
>
> $ export CC=i486-linux-gnu-gcc
> $ make clean
> $ ./configure --with-apxs=/usr/bin/apxs2
> $ make
>
> Looks like it works this way. Weird. Why should the name of the compiler
> matter?
The TODO file of libtool says:
* ... This includes writing libtool not to be so dependent on the
compiler used to configure it.
In fact libtool is there to hide platform specifics from everyone, who
wants to build libraries (or shared object files). This is done in a
way, that during libtool creation it analyzes your platform and includes
its specifics into the libtool file. So the resulting libtool file is
not portable. Of course all your gcc links were pointing to the same
file, but libtool simply remembers the name of the compiler.
> Here's another question: why does the configure script build a 'libtool'
> script in the current directory and then not use it? Also, "CC" is set
> correctly in /usr/share/apr-1.0/build/libtool (which appears to be the
> actual libtool being invoked, since I get that debugging output I added
> to it earlier), so what am I missing, here?
We still use the libtool we generate ourselves for building the Apache
httpd 1.3 mod_jk. Apache httpd 1.3 does not directly use libtool,
instead it calls gcc -shared to create its own module files.
In case we build an Apache httpd 2.x module, we are using the httpd
provided instance of libtool for maximum module compatibility. We find
this libtool by querying apxs -q LIBTOOL.
==== From your other message ====
> How does CC get picked when configure runs? I tried reading the
> configure script but got lost pretty quickly.
configure is produced out of configure.in by a toolchain including
autoconf and automake. In configure.in there is an autoconf macro named
AC_PROG_CC that includes a predefined script to detect the correct
compiler. Autoconf contains an info file (documentation), that explains:
-- Macro: AC_PROG_CC ([COMPILER-SEARCH-LIST])
Determine a C compiler to use. If `CC' is not already set in the
environment, check for `gcc' and `cc', then for other C compilers.
Set output variable `CC' to the name of the compiler found.
...
So it respects an externally set CC environment variable, and otherwise
tries to autodetect using build in rules.
> It looks like apxs knows what CC should be set to, though:
>
> $ apxs2 -q CC
> i486-linux-gnu-gcc
>
> Does it make sense for configure to use apxs to configure its compiler?
> I would certainly try this and submit a patch if I knew the right way to
> do it ;)
Yes it would make sense. We would need to move the apache specific parts
(or maybe all of the web server specific parts) from nearly the end of
configure.in close to the beginning of the file and do the CC and
LIBTOOL handling only after that. Of course we would need to check for
settings inside available environment variables, which should still be
allowed to override the intelligent defaults from apxs. And we could
produce libtool only for the cases we need it.
I think it's simply a matter of reordering and checking/testing, if we
don't break any dependencies (like needing to compile something in a
test before determining the compiler).
Unfortunately I'm not really an autoconf/automake expert (the tools
which generate configure, Makefile etc. from the *.am and *.in files),
but I should be able to rearrange the existing configure.in.
Or maybe you'll like to play around a little with configure.in? After
you change it, you'll need to run buildconf.sh. To be able to use
buildconf.sh, you'll need autoconf, automake and m4 on your system.
I'm using versions autoconf 2.1, automake 1.10 and m4 1.4.8. Others
should be OK, if they are not to old.
Regards,
Rainer
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :(
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Rainer,
Rainer Jung wrote:
> that means the guys who built APR (and most likely httpd) for Debian
> used i486-linux-gnu-gcc and not gcc as their compiler. Those might be
> the same (symlinks or so), but libtool remembers the compilatrion
> environment it was created in and refuses to work in another one.
Gotcha. Here's what I've got on the system in question:
$ which i486-linux-gnu-gcc
/usr/bin/i486-linux-gnu-gcc
$ ls -l `which cc`
lrwxrwxrwx 1 root root 20 Apr 29 2004 /usr/bin/cc -> /etc/alternatives/cc
$ ls -l /etc/alternatives/cc
lrwxrwxrwx 1 root root 12 Jan 19 14:33 /etc/alternatives/cc -> /usr/bin/gcc
$ ls -l /usr/bin/gcc
lrwxrwxrwx 1 root root 7 Jan 19 14:31 /usr/bin/gcc -> gcc-4.1
$ ls -l /usr/bin/gcc-4.1
- -rwxr-xr-x 1 root root 183444 Dec 10 09:46 /usr/bin/gcc-4.1
/usr/bin/gcc-4.1 is actually a binary.
$ ls -l /usr/bin/i486-linux-gnu-gcc
lrwxrwxrwx 1 root root 7 Jan 19 14:31 /usr/bin/i486-linux-gnu-gcc -> gcc-4.1
So, it looks like everything points to gcc-4.1 no matter what name is
used (which sounds good to me).
> So the *correct* solution should be:
>
> export CC=i486-linux-gnu-gcc
> configure ..
> make
Okay, I tried this:
$ export CC=i486-linux-gnu-gcc
$ make clean
$ ./configure --with-apxs=/usr/bin/apxs2
$ make
Looks like it works this way. Weird. Why should the name of the compiler
matter?
Here's another question: why does the configure script build a 'libtool'
script in the current directory and then not use it? Also, "CC" is set
correctly in /usr/share/apr-1.0/build/libtool (which appears to be the
actual libtool being invoked, since I get that debugging output I added
to it earlier), so what am I missing, here?
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGRN5/9CaO5/Lv0PARAm+fAJ45MpkFoMmiVOftRI3s/bPCoOhw5ACgmZGE
KBKAUCjUcGLIMyTeuSIDxZ4=
=1t1j
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :(
Posted by Rainer Jung <ra...@kippdata.de>.
Hi Christopher,
that means the guys who built APR (and most likely httpd) for Debian
used i486-linux-gnu-gcc and not gcc as their compiler. Those might be
the same (symlinks or so), but libtool remembers the compilatrion
environment it was created in and refuses to work in another one.
If
which i486-linux-gnu-gcc
produces a result, i.e. there is a binary i486-linux-gnu-gcc in your
binary search path, you should be able to build httpd modules with the
apr libtool by specifying
export CC=i486-linux-gnu-gcc
before running configure.
If i486-linux-gnu-gcc is not in your PATH, you might still find it in
some dirctory you simply need to add to your PATH.
Google suggests, that it is
usr/bin/i486-linux-gnu-gcc in package devel/gcc
And from
http://buildd.debian.org/fetch.cgi?pkg=apr;ver=1.2.7-8.2;arch=i386;stamp=1166604063
we can guess, that in fact debian builds apr with gcc renamed to
i486-linux-gnu-gcc.
So the *correct* solution should be:
export CC=i486-linux-gnu-gcc
configure ..
make
Regards,
Rainer
Christopher Schultz wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Rainer,
>
> Thanks for the quick response. I took another look at the configure
> output and it appears that workaround I found was valid. I (blindly)
> followed the instructions and was able to build a binary.
>
> Rainer Jung wrote:
>> 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.
>
> I'm using binary packages directly from Debian. It looks like libtool
> comes from the "libapr1-dev" packages, I have no idea how it was created. :(
>
>> If I check for the CC settings in my libtool it says:
>
> Okay, mine says:
>
> LTCC="i486-linux-gnu-gcc"
> CC="i486-linux-gnu-gcc"
> LTCC="i486-linux-gnu-gcc"
> CC="i486-linux-gnu-g++"
>
> I made your suggested changes to libtool and here's the output of make, now:
>
> $ make clean
> $ ./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
> Calling func_infer_tag 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
> Starting func_infer_tag...
> available_tags: CXX
> tagname:
> Checking against: i486-linux-gnu-gcc * | i486-linux-gnu-gcc * |
> i486-linux-gnu-gcc * | i486-linux-gnu-gcc * | i486-linux-gnu-gcc* |
> i486-linux-gnu-gcc * | i486-linux-gnu-gcc * | i486-linux-gnu-gcc *)
> 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
>
> Oddly enough, it looks like it already recognizes the "CXX" tag as being
> available. Note that I have no idea what I'm talking about at all ;)
>
> - -chris
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :(
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Rainer,
Thanks for the quick response. I took another look at the configure
output and it appears that workaround I found was valid. I (blindly)
followed the instructions and was able to build a binary.
Rainer Jung wrote:
> 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.
I'm using binary packages directly from Debian. It looks like libtool
comes from the "libapr1-dev" packages, I have no idea how it was created. :(
> If I check for the CC settings in my libtool it says:
Okay, mine says:
LTCC="i486-linux-gnu-gcc"
CC="i486-linux-gnu-gcc"
LTCC="i486-linux-gnu-gcc"
CC="i486-linux-gnu-g++"
I made your suggested changes to libtool and here's the output of make, now:
$ make clean
$ ./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
Calling func_infer_tag 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
Starting func_infer_tag...
available_tags: CXX
tagname:
Checking against: i486-linux-gnu-gcc * | i486-linux-gnu-gcc * |
i486-linux-gnu-gcc * | i486-linux-gnu-gcc * | i486-linux-gnu-gcc* |
i486-linux-gnu-gcc * | i486-linux-gnu-gcc * | i486-linux-gnu-gcc *)
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
Oddly enough, it looks like it already recognizes the "CXX" tag as being
available. Note that I have no idea what I'm talking about at all ;)
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGRMA49CaO5/Lv0PARAod3AJ47BNgv21lyyJRO+bLzwUjxBlex9wCfX10P
xVoMT0r27f1Q9yaiAld6fHQ=
=5Xcq
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: [mod_jk] 1.2.22 won't build (libtool error) :(
Posted by Rainer Jung <ra...@kippdata.de>.
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: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org