Configuring Tomcat5 and Apache2 - unable to infer tagged configuration

Discussion in 'HOWTO-Related Questions' started by smitchell, Jun 20, 2007.

  1. smitchell

    smitchell New Member

    I followed Configuring Tomcat5 and Apache2 on Ubuntu 7.0.4 using tomcat-connectors-1.2.23-src. I get the following error:

    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/src/tomcat-connectors-1.2.23-src/native/common'
    make: *** [all-recursive] Error 1


    There are no tags in the generated Makefile. I exported CC=gcc-4.1, but from what I've read makefile should have a tag=CC. A simple cut and paste of the LTCOMPILE line with the tag settings from the examples on the web break my makefile.

    Has anybody else run into this? Any suggestions?

    Steve Mitchell
    http://www.byteworksinc.com
     
  2. falko

    falko Super Moderator ISPConfig Developer

    I'm not sure, but maybe installing another gcc version helps?
     
  3. smitchell

    smitchell New Member

    GCC-2.95 and GCC-3.4 didn't do it either

    I pulled down GCC 2.95 and 3.4 then:
    1) export CC=/usr/bin/GCC-2.95
    2) re-ran configure
    3) re-ran make

    I tried that with both versions and even tried adding --tag=CC to the LIBTOOL line in the Makefile. In both cases the Makefile referred to the CC I exported, but still no joy :(

    If found a post that exactly describes what is happening (see http://metastatic.org/text/libtool.html) but I haven't been able to figure out how to apply it to the jk_mod build process. I thought that by adding "--tag=CC" to the LIBTOOL line in the make fine that would do it. The post mentions pulling down a cross libtool, but I'm not sure what that means. My Ubuntu system's libtool is listed by dpkg as "1.5.22-4 Generic library support script," so I think I'm covered. I'm going to contact the author at http://metastatic.org to get his input.

    Steve Mitchell
    http://www.byteworksinc.com
     
  4. smitchell

    smitchell New Member

    Here are the gory details....

    sudo ./configure --with-apxs=/usr/bin/apxs2
    checking build system type... i686-pc-linux-gnu
    checking host system type... i686-pc-linux-gnu
    checking target system type... i686-pc-linux-gnu
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking whether make sets $(MAKE)... yes
    checking for working aclocal-1.4... found
    checking for working autoconf... found
    checking for working automake-1.4... found
    checking for working autoheader... found
    checking for working makeinfo... missing
    checking for gcc... /usr/bin/gcc-3.4
    checking for C compiler default output file name... a.out
    checking whether the C compiler works... yes
    checking whether we are cross compiling... no
    checking for suffix of executables...
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether /usr/bin/gcc-3.4 accepts -g... yes
    checking for /usr/bin/gcc-3.4 option to accept ISO C89... none needed
    checking for a sed that does not truncate output... /bin/sed
    checking for grep that handles long lines and -e... /bin/grep
    checking for egrep... /bin/grep -E
    checking for ld used by /usr/bin/gcc-3.4... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for /usr/bin/ld option to reload object files... -r
    checking for BSD-compatible nm... /usr/bin/nm -B
    checking whether ln -s works... yes
    checking how to recognise dependent libraries... pass_all
    checking how to run the C preprocessor... /usr/bin/gcc-3.4 -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking dlfcn.h usability... yes
    checking dlfcn.h presence... yes
    checking for dlfcn.h... yes
    checking for g++... g++
    checking whether we are using the GNU C++ compiler... yes
    checking whether g++ accepts -g... yes
    checking how to run the C++ preprocessor... g++ -E
    checking for g77... no
    checking for xlf... no
    checking for f77... no
    checking for frt... no
    checking for pgf77... no
    checking for cf77... no
    checking for fort77... no
    checking for fl32... no
    checking for af77... no
    checking for xlf90... no
    checking for f90... no
    checking for pgf90... no
    checking for pghpf... no
    checking for epcf90... no
    checking for gfortran... no
    checking for g95... no
    checking for xlf95... no
    checking for f95... no
    checking for fort... no
    checking for ifort... no
    checking for ifc... no
    checking for efc... no
    checking for pgf95... no
    checking for lf95... no
    checking for ftn... no
    checking whether we are using the GNU Fortran 77 compiler... no
    checking whether accepts -g... no
    checking the maximum length of command line arguments... 32768
    checking command to parse /usr/bin/nm -B output from /usr/bin/gcc-3.4 object... ok
    checking for objdir... .libs
    checking for ar... ar
    checking for ranlib... ranlib
    checking for strip... strip
    checking if /usr/bin/gcc-3.4 supports -fno-rtti -fno-exceptions... no
    checking for /usr/bin/gcc-3.4 option to produce PIC... -fPIC
    checking if /usr/bin/gcc-3.4 PIC flag -fPIC works... yes
    checking if /usr/bin/gcc-3.4 static flag -static works... yes
    checking if /usr/bin/gcc-3.4 supports -c -o file.o... yes
    checking whether the /usr/bin/gcc-3.4 linker (/usr/bin/ld) supports shared libraries... yes
    checking whether -lc should be explicitly linked in... no
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking for shl_load... no
    checking for shl_load in -ldld... no
    checking for dlopen... no
    checking for dlopen in -ldl... yes
    checking whether a program can dlopen itself... yes
    checking whether a statically linked program can dlopen itself... no
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... yes
    checking whether to build static libraries... yes
    configure: creating libtool
    appending configuration tag "CXX" to libtool
    checking for ld used by g++... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
    checking for g++ option to produce PIC... -fPIC
    checking if g++ PIC flag -fPIC works... yes
    checking if g++ static flag -static works... yes
    checking if g++ supports -c -o file.o... yes
    checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    appending configuration tag "F77" to libtool
    checking for test... /usr/bin/test
    checking for rm... /bin/rm
    checking for grep... (cached) /bin/grep
    checking for echo... /bin/echo
    checking for sed... /bin/sed
    checking for cp... /bin/cp
    checking for mkdir... /bin/mkdir
    checking for char... yes
    checking size of char... 1
    checking for int... yes
    checking size of int... 4
    checking for long... yes
    checking size of long... 4
    checking for short... yes
    checking size of short... 2
    checking for long double... yes
    checking size of long double... 12
    checking for long long... yes
    checking size of long long... 8
    checking for longlong... no
    checking size of longlong... 0
    checking for snprintf... yes
    checking for vsnprintf... yes
    checking for flock... yes
    checking for setsockopt in -lsocket... no
    checking sys/filio.h usability... no
    checking sys/filio.h presence... no
    checking for sys/filio.h... no
    checking whether to use SO_RCVTIMEO with setsockopt()... yes
    checking whether to use SO_SNDTIMEO with setsockopt()... yes
    need to check for Perl first, apxs depends on it...
    checking for perl... /usr/bin/perl
    APRINCLUDEDIR is -I/usr/include/apr-1.0 -I/usr/include/apr-1.0
    building connector for "apache-2.0"
    checking for target platform... unix
    no apache given
    no netscape given
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: WARNING: Makefile.in seems to ignore the --datarootdir setting
    config.status: creating apache-1.3/Makefile
    config.status: creating apache-1.3/Makefile.apxs
    config.status: creating apache-2.0/Makefile
    config.status: creating apache-2.0/Makefile.apxs
    config.status: creating common/Makefile
    config.status: creating common/list.mk
    config.status: creating common/jk_types.h
    config.status: creating jni/Makefile
    config.status: creating common/portable.h
    config.status: common/portable.h is unchanged
    scm005@www:/usr/src/tomcat-connectors-1.2.23-src/native$ sudo make; make install
    Making all in common
    make[1]: Entering directory `/usr/src/tomcat-connectors-1.2.23-src/native/common'
    /usr/share/apr-1.0/build/libtool --silent --mode=compile /usr/bin/gcc-3.4 -I/usr/include/apache2 -g -O2 -DLINUX=2 -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -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 /usr/lib/jvm/java-6-sun/include -I /usr/lib/jvm/java-6-sun/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/src/tomcat-connectors-1.2.23-src/native/common'
    make: *** [all-recursive] Error 1
    Making install in common
    make[1]: Entering directory `/usr/src/tomcat-connectors-1.2.23-src/native/common'
    make[1]: Nothing to be done for `install'.
    make[1]: Leaving directory `/usr/src/tomcat-connectors-1.2.23-src/native/common'
    Making install in apache-2.0
    make[1]: Entering directory `/usr/src/tomcat-connectors-1.2.23-src/native/apache-2.0'

    Installing files to Apache Modules Directory...
    /usr/bin/apxs2 -i mod_jk.la
    perl: warning: Setting locale failed.
    perl: warning: Please check that your locale settings:
    LANGUAGE = (unset),
    LC_ALL = (unset),
    LC_CTYPE = "en_US.ISO8859-1",
    LC_COLLATE = "en_US.ISO8859-1",
    LC_MESSAGES = "en_US.ISO8859-1",
    LC_NUMERIC = "en_US.ISO8859-1",
    LC_TIME = "en_US.ISO8859-1",
    LC_MONETARY = "en_US.ISO8859-1",
    LANG = "en_US.UTF-8"
    are supported and installed on your system.
    perl: warning: Falling back to the standard locale ("C").
    /usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' mod_jk.la /usr/lib/apache2/modules
    /usr/share/apr-1.0/build/libtool --mode=install cp mod_jk.la /usr/lib/apache2/modules/
    libtool: install: `mod_jk.la' is not a valid libtool archive
    Try `libtool --help --mode=install' for more information.
    apxs:Error: Command failed with rc=65536
    .
    make[1]: *** [install_dynamic] Error 1
    make[1]: Leaving directory `/usr/src/tomcat-connectors-1.2.23-src/native/apache-2.0'
    make: *** [install-recursive] Error 1
     
  5. iccode

    iccode New Member

    You have to modify the Makefile and common/Makefile, add the extra parameter "--tag CC" to the libtool command, everything will be ok.
     
  6. smitchell

    smitchell New Member

    Thanks, ICCODE. "--tag CC" worked.

    Thanks, ICCODE. I had only updated Makefile, not common/Makefile. That did the trick. The only glitch I ran into was that using SUDO I got permission denied on /usr/lib/apache2/modules/mod_jk.so. I cheated and created a password for root and then re-ran make as root and was successful.

    Steve Mitchell
    http://www.byteworksinc.com
     

Share This Page