HI Rainer,
Interestingly i tried this as well.

*APR,*
*CC="cc" CFLAGS="-m64" LDFLAGS="-m64" ./configure*

*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*

*But i get this error,*

*ld: fatal: file /usr/local/ssl/lib/libssl.so: wrong ELF class: ELFCLASS32*
*ld: fatal: file /usr/local/ssl/lib/libcrypto.so: wrong ELF class:
ELFCLASS32*
*ld: fatal: file processing errors. No output written to
.libs/libtcnative-1.so.0.1.33*
**** Error code 2*
*make: Fatal error: Command failed for target `libtcnative-1.la
<http://libtcnative-1.la>'*
*Current working directory /tomcat/bin/tomcat-native-1.1.33-src/jni/native*


Does it mean my openssl is not 64 bit, actually i'm not sure about my
openssl architecture ?

Thanks,
Nithesh KB

On Sat, Dec 12, 2015 at 10:52 PM, Nithesh Kb <nitheshk...@gmail.com> wrote:

> HI Rainer,
> Thanks i was able to succeed this step but still tomcat is not starting.
>
> *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*
>
>
> *but i get this error in tomcat logs,*
>
> 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
>
>
>
> On Sat, Dec 12, 2015 at 9:35 PM, Rainer Jung <rainer.j...@kippdata.de>
> wrote:
>
>> Am 11.12.2015 um 20:27 schrieb Nithesh Kb:
>>
>>> *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
>>>
>>
>> From your other mail it seems you are using gcc to do the build. If so,
>> make sure to include "-m64" in your CFLAGS for all components (OpenSSL,
>> APT, tcnative). To build tcnative for 65 Bits, you need to have 64 Bit
>> OpenSSL and 64 Bit APR first.
>>
>> The 64 Bit part of the JVM will then be chosen automatically, not sparcv9
>> or similar needed.
>>
>> Regards,
>>
>> Rainer
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>
>>
>

Reply via email to