tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Janon <fja...@gmail.com>
Subject Issue building the Unix daemon (jsvc) with the "configure" script in Tomcat7
Date Thu, 23 Aug 2012 20:12:56 GMT
Hi,

I am trying to build the Unix deamon jsvc in AWS EC2 Linux. I did not
install Tomcat7 that comes with the AWS Linux, I downloaded Tomcat7 from
the Apache Tomcat website, I installed it and ran Tomcat7 successfully. Now
I am trying to build the daemon to run Tomcat7 as a daemon. I get an error
running the "configure" script as indicated in the Tomcat documentation. I
did a lot of searching on the web and cannot find a solution to this issue.
I am not fluent in shell scripting, so my understanding of "configure" is
very limited.

Do I need to regenerate the "configure" script or do I need to modify the
script?

The error is:
*checking for JDK os include directory... Cannot find jni_md.h in
/usr/lib/jvm/jre/*
*configure: error: You should retry --with-os-type=SUBDIR*
*
*
It looks like *"jni_md.h"* is part of the Windows JDK, *but it's not in the
Linux OpenJDK on CentOS.*

I don't really understand why the message says "*with-os-type*" where it
seems to mean JDK?

As indicated in the INSTALL.txt below, I am reporting the issue, hoping
that someone can give me a solution or a patch for the script...

"Depending on your JDK layout, configure might fail to find the JNI
machine dependant include file (jni_md.h). If that's the case use the
--with-os-type=<subdir> parameter where subdir points to the directory
within JDK include directory containing jni_md.h file.
If your operating system is supported, configure will go thru cleanly,
otherwise it will report an error (please send us the details of your
OS/JDK, or a patch against the sources)."

Below is the console output running configure and some information about
the jdk installed.

[ec2-user@ip-10-244-162-78 unix]$ *./configure*
*** Current host ***
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking cached host system type... ok
*** C-Language compilation tools ***
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking for strip... strip
*** Host support ***
checking C flags dependant on host system type... ok
*** Java compilation tools ***
*checking for JDK os include directory... Cannot find jni_md.h in
/usr/lib/jvm/jre/*
*configure: error: You should retry --with-os-type=SUBDIR*

[ec2-user@ip-10-244-162-78 unix]$ find / -name 'jni_md.h' 2>/dev/null

[ec2-user@ip-10-244-162-78 unix]$ find / -name '*jni*' 2>/dev/null
/usr/share/java-jni
/datadisk1/tomcat/bin/commons-daemon-1.0.10-native-src/windows/src/javajni.c
/datadisk1/tomcat/bin/commons-daemon-1.0.10-native-src/windows/include/javajni.h

Installed Packages
java-1.6.0-openjdk.i686                                   installed

----------------------------------------
[ec2-user@ip-10-244-162-78 unix]$ *./configure
-with-java=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre*
*** Current host ***
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking cached host system type... ok
*** C-Language compilation tools ***
checking for gcc... gcc
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 gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ranlib... ranlib
checking for strip... strip
*** Host support ***
checking C flags dependant on host system type... ok
*** Java compilation tools ***
checking JAVA_HOME... /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre
*checking for JDK os include directory... Cannot find jni_md.h in
/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/*
*configure: error: You should retry --with-os-type=SUBDIR*

-----------------------------------------
configure script excerpt:

    echo "$as_me:$LINENO: checking for JDK os include directory" >&5
echo $ECHO_N "checking for JDK os include directory... $ECHO_C" >&6
    JAVA_OS=NONE
    if test -f $JAVA_HOME/$JAVA_INC/jni_md.h
    then
      JAVA_OS=""
    else
      for f in $JAVA_HOME/$JAVA_INC/*/jni_md.h
      do
        if test -f $f; then
            JAVA_OS=`dirname $f`
            JAVA_OS=`basename $JAVA_OS`
            echo " $JAVA_OS"
            break
        fi
      done
      if test "x$JAVA_OS" = "xNONE"; then
        echo "$as_me:$LINENO: result: Cannot find jni_md.h in
${JAVA_HOME}/${OS}" >&5
echo "${ECHO_T}Cannot find jni_md.h in ${JAVA_HOME}/${OS}" >&6
        { { echo "$as_me:$LINENO: error: You should retry
--with-os-type=SUBDIR" >&5
echo "$as_me: error: You should retry --with-os-type=SUBDIR" >&2;}
   { (exit 1); exit 1; }; }
      fi
    fi

-----------------------------------------

Thanks

Fred

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message