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 2015/12/11 22:08:42 UTC

Re: How to build tc-native for solaris sparc 64 bit using 64 bit java JDK

Nithesh,

On 12/11/15 2:27 PM, Nithesh Kb wrote:
> *HI, I'm using Solaris sparc 64 bit machine. i wanted to build tc native
> using 64 bit version of java.*
> 
> *i installed java in my Solaris box by referring*
> http://docs.oracle.com/javase/7/docs/webnotes/install/solaris/solaris-jdk.html
> 
> *when i check the*
> 
> /usr/jdk/jdk1.7.0_80/bin/java -version
> java version "1.7.0_80"Java(TM) SE Runtime Environment (build
> 1.7.0_80-b15)Java HotSpot(TM) Server VM (build 24.80-b11, mixed mode)
> 
> *export JAVA_HOME=/usr/jdk/jdk1.7.0_80*
> 
> *./configure --with-apr=/usr/local/apr/bin/apr-1-config
> --with-java-home=$JAVA_HOME --with-ssl=/usr/local/ssl
> --prefix=$CATALINA_HOME*
> 
> *i'm able to build using this java 32 bit but 64 bit java is there in*
> 
> /usr/jdk/jdk1.7.0_80/bin/sparcv9/java -version
> java version "1.7.0_80"Java(TM) SE Runtime Environment (build
> 1.7.0_80-b15)Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed
> mode)
> 
> *So how do i tell my tc-native configure to use 64 bit java instead of* 32
> bit java
> 
> Issue is here i can build with 32 bit java and tomcat will work. but in
> production there is no 32 bit JRE only 64 bit JRE is there is if is use the
> same 32 bit tc-native library i'l get
> 
> *wrong ELF class: ELFCLASS32 (Possible cause: architecture word width
> mismatch)]*
> 
> So i must use 64 JDK for tc native build. please help me

Try this:

$ ./configure ... --with-java-home=$JAVA_HOME --with-os-type=sparc9

Or, is there a way to remove the 32-bit JVM? (That may not be an option
for you long-term, but it would be interesting to see what happens).

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: How to build tc-native for solaris sparc 64 bit using 64 bit java JDK

Posted by Nithesh Kb <ni...@gmail.com>.
HI Chris,
Thanks for your reply.

Solaris 64bit JDK requires 32 bit JDK
        *http://docs.oracle.com/javase/7/docs/webnotes/install/solaris/solaris-jdk.html#install-svr4
<http://docs.oracle.com/javase/7/docs/webnotes/install/solaris/solaris-jdk.html#install-svr4>*
      "*Installing the JDK on a 64-bit system that allows a 32-bit JVM is a
two-step process: first install the 32-bit JDK and then install the
additional support for 64-bit operations*"


I tried whatever you told,

Set the java home
*export JAVA_HOME=/usr/jdk/jdk1.7.0_80*

Ran the tc-native configuration with *--with-os-type=sparcv9*

*./configure --with-apr=/usr/local/apr/bin/apr-1-config
--with-java-home=$JAVA_HOME --with-ssl=/usr/local/ssl
--prefix=$CATALINA_HOME --with-os-type=sparcv9*

here is the funda, it looks for sparcv9 in JAVA_HOME

checking build system type... sparc-sun-solaris2.10
checking host system type... sparc-sun-solaris2.10
checking target system type... sparc-sun-solaris2.10
checking for a BSD-compatible install... build/install.sh -c
checking for working mkdir -p... yes
Tomcat Native Version: 1.1.33
checking for chosen layout... tcnative
checking for APR... yes
  setting CC to "gcc"
  setting CPP to "gcc -E"
checking for JDK location (please wait)... /usr/jdk/jdk1.7.0_80/
checking Java platform... checking Java platform...
checking for sablevm... NONE
  adding "-I/usr/jdk/jdk1.7.0_80//include" to TCNATIVE_PRIV_INCLUDES
*configure: error: Not a directory: /usr/jdk/jdk1.7.0_80//sparcv9*


of course */usr/jdk/jdk1.7.0_80//sparcv9 *, this directory is not there in
JAVA_HOME. it is there in */usr/jdk/jdk1.7.0_80/bin/sparcv9*

But we cannot set JAVA_HOME to */usr/jdk/jdk1.7.0_80/bin*

*So how do we solve this ? is it a non-addressed scenario in TC-native
configuration ?*

*-Nithesh*



On Sat, Dec 12, 2015 at 2:38 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> Nithesh,
>
> On 12/11/15 2:27 PM, Nithesh Kb wrote:
> > *HI, I'm using Solaris sparc 64 bit machine. i wanted to build tc native
> > using 64 bit version of java.*
> >
> > *i installed java in my Solaris box by referring*
> >
> http://docs.oracle.com/javase/7/docs/webnotes/install/solaris/solaris-jdk.html
> >
> > *when i check the*
> >
> > /usr/jdk/jdk1.7.0_80/bin/java -version
> > java version "1.7.0_80"Java(TM) SE Runtime Environment (build
> > 1.7.0_80-b15)Java HotSpot(TM) Server VM (build 24.80-b11, mixed mode)
> >
> > *export JAVA_HOME=/usr/jdk/jdk1.7.0_80*
> >
> > *./configure --with-apr=/usr/local/apr/bin/apr-1-config
> > --with-java-home=$JAVA_HOME --with-ssl=/usr/local/ssl
> > --prefix=$CATALINA_HOME*
> >
> > *i'm able to build using this java 32 bit but 64 bit java is there in*
> >
> > /usr/jdk/jdk1.7.0_80/bin/sparcv9/java -version
> > java version "1.7.0_80"Java(TM) SE Runtime Environment (build
> > 1.7.0_80-b15)Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed
> > mode)
> >
> > *So how do i tell my tc-native configure to use 64 bit java instead of*
> 32
> > bit java
> >
> > Issue is here i can build with 32 bit java and tomcat will work. but in
> > production there is no 32 bit JRE only 64 bit JRE is there is if is use
> the
> > same 32 bit tc-native library i'l get
> >
> > *wrong ELF class: ELFCLASS32 (Possible cause: architecture word width
> > mismatch)]*
> >
> > So i must use 64 JDK for tc native build. please help me
>
> Try this:
>
> $ ./configure ... --with-java-home=$JAVA_HOME --with-os-type=sparc9
>
> Or, is there a way to remove the 32-bit JVM? (That may not be an option
> for you long-term, but it would be interesting to see what happens).
>
> -chris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>