I'm using Solaris Sparc 64 bit machine. I want to build Tomcat native using 64 bit version of Java. I installed Java in my Solaris box according to JDK 7 Installation on the Oracle Solaris Operating System .
When i check the version of Java:
/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)
I also export JAVA_HOME
:
export JAVA_HOME=/usr/jdk/jdk1.7.0_80
I configure with:
./configure --with-apr=/usr/local/apr/bin/apr-1-config --with-java-home=$JAVA_HOME \
--with-ssl=/usr/local/ssl --prefix=$CATALINA_HOME
I am 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)
How do I tell my Tomcat-native configure to use 64 bit java instead of 32 bit java?
The issue is here is 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. If I use the same 32 bit Tomcat-native library it results in:
wrong ELF class: ELFCLASS32 (Possible cause: architecture word width mismatch)]
Update #1
INFO: Loaded APR based Apache Tomcat Native library 1.1.33 using APR version 1.5.2.
Dec 12, 2015 8:02:42 PM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
Dec 12, 2015 8:02:42 PM org.apache.catalina.core.AprLifecycleListener initializeSSL
INFO: OpenSSL successfully initialized (OpenSSL 1.0.1p 9 Jul 2015)
Dec 12, 2015 8:02:43 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-0.0.0.0-8081"]
Dec 12, 2015 8:02:43 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-0:0:0:0:0:0:0:0-8081"]
Dec 12, 2015 8:02:43 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-apr-0.0.0.0-8444"]
ld.so.1: java: fatal: relocation error: file /tomcat7/lib/libtcnative-1.so.0.1.33: symbol EC_KEY_new_by_curve_name: referenced symbol not found
APR,
CFLAGS="-m64" ./configure
TC-native,
CFLAGS="-m64" ./configure --with-apr=/usr/local/apr/bin/apr-1-config --with-java-home=/usr/jdk/instances/jdk1.7.0/ --with-ssl=/usr/local/ssl --prefix=/tomcat7
Worked!! -----------------------------------------------------------------------
build openssl,
export KERNEL_BITS=64
./config shared
make
make install
Build APR
CC="cc" CFLAGS="-m64" LDFLAGS="-m64" ./configure
make
make install
Build tc-native
CC="cc" CFLAGS="-m64 -fPIC" LDFLAGS="-m64" ./configure --with-apr=/usr/local/apr/bin/apr-1-config --with-java-home=/usr/jdk/jdk1.7.0_80/ --with-ssl=/usr/local/ssl --prefix=/tomcat
make
make install
There doesn't look to be an option to specify a 64 bit sparc target.
Perhaps the build system would figure it by itself from the compiler flags.
I would try:
CFLAGS="-m 64" ./configure ...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.