You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mark Thomas <ma...@apache.org> on 2015/11/04 02:00:06 UTC

Tomcat Native 1.2.2

I've just finished running the unit tests for APR on OSX with the
current 1.2.x trunk and 9.0.x, 8.0.x and 7.0.x and all pass.

I plan to tag 1.2.2 tomorrow morning and will hopefully be able to start
a new vote later in the day.

Mark

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


Re: Tomcat Native 1.2.2

Posted by Rémy Maucherat <re...@apache.org>.
2015-11-04 20:22 GMT+01:00 Christopher Schultz <chris@christopherschultz.net
>:

> At some point, tcnative won't have to exist at all. There have been some
> efforts to provide an OpenSSL-based JSSE provider, at which point little
> needs to be done to use OpenSSL under the hood, and I think the APR
> connector can be discarded.
>

Are you talking about JCE ? If so, then you need to think about it some
more, everything about it is extremely complex. Including for the end user
setup.

>
> JSSE w/OpenSSL + NIO(2) seems like it would be a great combination, and
> it would remove a *lot* of code in Tomcat.
>
> The APR connector is not that much code, and it has somewhat different
characteristics, it could still be an interesting tool sometimes (like with
HTTP/2 recently).

Rémy

Re: Tomcat Native 1.2.2

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Mark,

On 11/4/15 4:39 AM, Mark Thomas wrote:
> On 04/11/2015 09:32, jean-frederic clere wrote:
>> On 11/04/2015 02:00 AM, Mark Thomas wrote:
>>> I've just finished running the unit tests for APR on OSX with the
>>> current 1.2.x trunk and 9.0.x, 8.0.x and 7.0.x and all pass.
>>>
>>> I plan to tag 1.2.2 tomorrow morning and will hopefully be able to start
>>> a new vote later in the day.
>>
>> I am trying some small changes to allow to use the keystore with the
>> openssl engine, I need a few days more, do you want to wait or should we
>> add that later.
> 
> I think we can add that later.
> 
> If you can get this working then I think we need to look very hard at a
> Tomcat Native 2.0.0 that depends solely on OpenSSL (i.e. remove the APR
> dependency).

At some point, tcnative won't have to exist at all. There have been some
efforts to provide an OpenSSL-based JSSE provider, at which point little
needs to be done to use OpenSSL under the hood, and I think the APR
connector can be discarded.

JSSE w/OpenSSL + NIO(2) seems like it would be a great combination, and
it would remove a *lot* of code in Tomcat.

-chris

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


Re: Tomcat Native 1.2.2

Posted by Mark Thomas <ma...@apache.org>.
On 04/11/2015 09:32, jean-frederic clere wrote:
> On 11/04/2015 02:00 AM, Mark Thomas wrote:
>> I've just finished running the unit tests for APR on OSX with the
>> current 1.2.x trunk and 9.0.x, 8.0.x and 7.0.x and all pass.
>>
>> I plan to tag 1.2.2 tomorrow morning and will hopefully be able to start
>> a new vote later in the day.
> 
> I am trying some small changes to allow to use the keystore with the
> openssl engine, I need a few days more, do you want to wait or should we
> add that later.

I think we can add that later.

If you can get this working then I think we need to look very hard at a
Tomcat Native 2.0.0 that depends solely on OpenSSL (i.e. remove the APR
dependency).

Mark


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


Re: Tomcat Native 1.2.2

Posted by jean-frederic clere <jf...@gmail.com>.
On 11/04/2015 02:00 AM, Mark Thomas wrote:
> I've just finished running the unit tests for APR on OSX with the
> current 1.2.x trunk and 9.0.x, 8.0.x and 7.0.x and all pass.
> 
> I plan to tag 1.2.2 tomorrow morning and will hopefully be able to start
> a new vote later in the day.

I am trying some small changes to allow to use the keystore with the
openssl engine, I need a few days more, do you want to wait or should we
add that later.

Cheers

Jean-Frederic

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


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


Re: Tomcat Native 1.2.2

Posted by Huxing Zhang <hu...@alibaba-inc.com>.
Hi Christopher,

Thanks for your comments.
I used to compile openssl under linux, when I switched my OS to Mac OSX, the openssl building env was not completely clean, which lead to the problem.
Will use brew to update openssl later on.

Thanks,
Huxing
------------------------------------------------------------------
From:Christopher Schultz <ch...@christopherschultz.net>
Time:2015 Nov 6 (Fri) 20:18
To:Tomcat Developers List <de...@tomcat.apache.org>
Subject:Re: Tomcat Native 1.2.2


Huxing,

On 11/5/15 7:08 PM, Huxing Zhang wrote:
> Hi All,
> 
> I have solved the problem building tcnative on Mac OSX.
> 
> The message worth noticing is:
> ld: warning: ld: warning: ignoring file /usr/local/openssl/lib/libcrypto.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libcrypto.aignoring file /usr/local/openssl/lib/libssl.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libssl.a

I'm sorry I hadn't noticed that before. It's obviously the problem.

> The root cause is openssl is not correctly compiled with the right architecture.
> 
> Recompile openssl with the following configuration will solve this problem.

That openssl is one that you must have provided yourself in the past...
Mac OS has been 64-bit-only for quite a while, now, and the OpenSSL
binaries shipped with Mac OS X are dual-architecture:

$ file /usr/lib/libssl.dylib
/usr/lib/libssl.dylib: Mach-O universal binary with 2 architectures
/usr/lib/libssl.dylib (for architecture i386): Mach-O dynamically linked
shared library i386
/usr/lib/libssl.dylib (for architecture x86_64): Mach-O 64-bit
dynamically linked shared library x86_64

On Mac OS X, consider using something like Brew for things like newer
versions of OpenSSL.

-chris

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

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


Re: Tomcat Native 1.2.2

Posted by Christopher Schultz <ch...@christopherschultz.net>.
Huxing,

On 11/5/15 7:08 PM, Huxing Zhang wrote:
> Hi All,
> 
> I have solved the problem building tcnative on Mac OSX.
> 
> The message worth noticing is:
> ld: warning: ld: warning: ignoring file /usr/local/openssl/lib/libcrypto.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libcrypto.aignoring file /usr/local/openssl/lib/libssl.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libssl.a

I'm sorry I hadn't noticed that before. It's obviously the problem.

> The root cause is openssl is not correctly compiled with the right architecture.
> 
> Recompile openssl with the following configuration will solve this problem.

That openssl is one that you must have provided yourself in the past...
Mac OS has been 64-bit-only for quite a while, now, and the OpenSSL
binaries shipped with Mac OS X are dual-architecture:

$ file /usr/lib/libssl.dylib
/usr/lib/libssl.dylib: Mach-O universal binary with 2 architectures
/usr/lib/libssl.dylib (for architecture i386):	Mach-O dynamically linked
shared library i386
/usr/lib/libssl.dylib (for architecture x86_64):	Mach-O 64-bit
dynamically linked shared library x86_64

On Mac OS X, consider using something like Brew for things like newer
versions of OpenSSL.

-chris

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


Re: Tomcat Native 1.2.2

Posted by Huxing Zhang <hu...@alibaba-inc.com>.
Hi All,

I have solved the problem building tcnative on Mac OSX.

The message worth noticing is:
ld: warning: ld: warning: ignoring file /usr/local/openssl/lib/libcrypto.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libcrypto.aignoring file /usr/local/openssl/lib/libssl.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libssl.a

The root cause is openssl is not correctly compiled with the right architecture.

Recompile openssl with the following configuration will solve this problem.

cd $openssl_source_dir
./Configure darwin64-x86_64-cc --prefix=/usr/local/openssl shared
make
make install

I am sorry for posting such an email in dev list.

Best regards,
Huxing

------------------------------------------------------------------
From:Huxing Zhang <hu...@alibaba-inc.com>
Time:2015 Nov 4 (Wed) 17:37
To:Tomcat Developers List <de...@tomcat.apache.org>
Subject:Re: Tomcat Native 1.2.2


Hi All,

I have trouble running tcnative test under Mac OSX(EI Capitan).

I used the jdk8,  apr 1.5.2, openssl 1.0.2d(OpenSSL 1.0.2d 9 Jul 2015) to build the tcnative code in trunk.

I followed the instructions described in native/BUILDING:

Step by step build output is:
1) sh buildconf --with-apr=/Users/wangtao/work/apache-tomcat/apr/apr-1.5.2

Looking for apr source in /Users/wangtao/work/apache-tomcat/apr/apr-1.5.2
Creating configure ...
Generating 'make' outputs ...
rebuilding rpm spec file
Using version '1.2.2' and release '1' in RPM spec file

2) ./configure --with-apr=/usr/local/apr --with-ssl=/usr/local/openssl
checking build system type... x86_64-apple-darwin15.0.0
checking host system type... x86_64-apple-darwin15.0.0
checking target system type... x86_64-apple-darwin15.0.0
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
Tomcat Native Version: 1.2.2
checking for chosen layout... tcnative
checking for APR... yes
configure: APR 1.5.2 detected.
  setting CC to "gcc"
  setting CPP to "gcc -E"
  adding "-I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include" to TCNATIVE_PRIV_INCLUDES
checking for JDK os include directory...  darwin
  adding "-I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin" to TCNATIVE_PRIV_INCLUDES
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 ISO C89... none needed
checking for OpenSSL library... using openssl from /usr/local/openssl/lib and /usr/local/openssl/include
checking OpenSSL library version >= 1.0.2... ok
checking for OpenSSL DSA support... yes
  adding "-I/usr/local/openssl/include" to TCNATIVE_PRIV_INCLUDES
  setting TCNATIVE_LDFLAGS to "-L/usr/local/openssl/lib -lssl -lcrypto"
  adding "-DHAVE_OPENSSL" to CFLAGS
  setting TCNATIVE_LIBS to ""
  setting TCNATIVE_LIBS to " /usr/local/apr/lib/libapr-1.la -lpthread"
checking for apr_pollset_wakeup in -lapr-1... yes
  adding "-DHAVE_POLLSET_WAKEUP" to CFLAGS
configure: creating ./config.status
config.status: creating tcnative.pc
config.status: creating Makefile
config.status: executing default commands

3) make
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/address.lo -c src/address.c && touch src/address.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/bb.lo -c src/bb.c && touch src/bb.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/dir.lo -c src/dir.c && touch src/dir.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/error.lo -c src/error.c && touch src/error.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/file.lo -c src/file.c && touch src/file.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/info.lo -c src/info.c && touch src/info.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/jnilib.lo -c src/jnilib.c && touch src/jnilib.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/lock.lo -c src/lock.c && touch src/lock.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/misc.lo -c src/misc.c && touch src/misc.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/mmap.lo -c src/mmap.c && touch src/mmap.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/multicast.lo -c src/multicast.c && touch src/multicast.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/network.lo -c src/network.c && touch src/network.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/os.lo -c src/os.c && touch src/os.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/poll.lo -c src/poll.c && touch src/poll.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/pool.lo -c src/pool.c && touch src/pool.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/proc.lo -c src/proc.c && touch src/proc.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/shm.lo -c src/shm.c && touch src/shm.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/ssl.lo -c src/ssl.c && touch src/ssl.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/sslcontext.lo -c src/sslcontext.c && touch src/sslcontext.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/sslinfo.lo -c src/sslinfo.c && touch src/sslinfo.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/sslnetwork.lo -c src/sslnetwork.c && touch src/sslnetwork.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/sslutils.lo -c src/sslutils.c && touch src/sslutils.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/stdlib.lo -c src/stdlib.c && touch src/stdlib.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/thread.lo -c src/thread.c && touch src/thread.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/user.lo -c src/user.c && touch src/user.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o os/unix/system.lo -c os/unix/system.c && touch os/unix/system.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o os/unix/uxpipe.lo -c os/unix/uxpipe.c && touch os/unix/uxpipe.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=link  gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -version-info 2:2:2    -o libtcnative-1.la -rpath /usr/local/apr/lib src/address.lo src/bb.lo src/dir.lo src/error.lo src/file.lo src/info.lo src/jnilib.lo src/lock.lo src/misc.lo src/mmap.lo src/multicast.lo src/network.lo src/os.lo src/poll.lo src/pool.lo src/proc.lo src/shm.lo src/ssl.lo src/sslcontext.lo src/sslinfo.lo src/sslnetwork.lo src/sslutils.lo src/stdlib.lo src/thread.lo src/user.lo os/unix/system.lo os/unix/uxpipe.lo -L/usr/local/openssl/lib -lssl -lcrypto  /usr/local/apr/lib/libapr-1.la -lpthread
ld: warning: ld: warning: ignoring file /usr/local/openssl/lib/libcrypto.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libcrypto.aignoring file /usr/local/openssl/lib/libssl.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libssl.a

Everything looks fine, and I get libtcnative-1.0.dylib produced in .libs/, the dir looks like as follows:
.libs  ll
total 2840
-rwxr-xr-x  1 wangtao  staff   200K Nov  4 17:28 libtcnative-1.0.dylib
-rw-r--r--  1 wangtao  staff   1.2M Nov  4 17:28 libtcnative-1.a
lrwxr-xr-x  1 wangtao  staff    21B Nov  4 17:28 libtcnative-1.dylib -> libtcnative-1.0.dylib
lrwxr-xr-x  1 wangtao  staff    19B Nov  4 17:28 libtcnative-1.la -> ../libtcnative-1.la
-rw-r--r--  1 wangtao  staff   1.0K Nov  4 17:28 libtcnative-1.lai

And then after I ant jar and ant run-echo, I got the following errors:

Buildfile: /Users/wangtao/work/apache-tomcat/tcnative/trunk/build.xml

env:
     [echo] java.home = /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre
     [echo] user.home = /Users/wangtao
     [echo] tc.library.path = /Users/wangtao/work/apache-tomcat/tcnative/trunk/native/.libs
     [echo]

prepare:

compile:
    [javac] /Users/wangtao/work/apache-tomcat/tcnative/trunk/build.xml:220: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

compile-examples:
    [javac] /Users/wangtao/work/apache-tomcat/tcnative/trunk/build.xml:346: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

run-echo:
     [echo] Running Tomcat Native Echo example ...
     [java] Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/wangtao/work/apache-tomcat/tcnative/trunk/native/.libs/libtcnative-1.0.dylib: dlopen(/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/.libs/libtcnative-1.0.dylib, 1): Symbol not found: _OCSP_RESPONSE_new
     [java]   Referenced from: /Users/wangtao/work/apache-tomcat/tcnative/trunk/native/.libs/libtcnative-1.0.dylib
     [java]   Expected in: flat namespace
     [java]  in /Users/wangtao/work/apache-tomcat/tcnative/trunk/native/.libs/libtcnative-1.0.dylib
     [java]  at java.lang.ClassLoader$NativeLibrary.load(Native Method)
     [java]  at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
     [java]  at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)
     [java]  at java.lang.Runtime.loadLibrary0(Runtime.java:870)
     [java]  at java.lang.System.loadLibrary(System.java:1122)
     [java]  at org.apache.tomcat.jni.Library.<init>(Unknown Source)
     [java]  at org.apache.tomcat.jni.Library.initialize(Unknown Source)
     [java]  at org.apache.tomcat.jni.Echo.main(Unknown Source)
     [java] Java Result: 1

Any ideas about what is going wrong here?

------------------------------------------------------------------
From:Mark Thomas <ma...@apache.org>
Send Time:2015年11月4日(星期三) 09:00
To:Tomcat Developers List <de...@tomcat.apache.org>
Subject:Tomcat Native 1.2.2


I've just finished running the unit tests for APR on OSX with the
current 1.2.x trunk and 9.0.x, 8.0.x and 7.0.x and all pass.

I plan to tag 1.2.2 tomorrow morning and will hopefully be able to start
a new vote later in the day.

Mark

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

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


Re: Tomcat Native 1.2.2

Posted by Huxing Zhang <hu...@alibaba-inc.com>.
Hi All,

I have trouble running tcnative test under Mac OSX(EI Capitan).

I used the jdk8,  apr 1.5.2, openssl 1.0.2d(OpenSSL 1.0.2d 9 Jul 2015) to build the tcnative code in trunk.

I followed the instructions described in native/BUILDING:

Step by step build output is:
1) sh buildconf --with-apr=/Users/wangtao/work/apache-tomcat/apr/apr-1.5.2

Looking for apr source in /Users/wangtao/work/apache-tomcat/apr/apr-1.5.2
Creating configure ...
Generating 'make' outputs ...
rebuilding rpm spec file
Using version '1.2.2' and release '1' in RPM spec file

2) ./configure --with-apr=/usr/local/apr --with-ssl=/usr/local/openssl
checking build system type... x86_64-apple-darwin15.0.0
checking host system type... x86_64-apple-darwin15.0.0
checking target system type... x86_64-apple-darwin15.0.0
checking for a BSD-compatible install... /usr/bin/install -c
checking for working mkdir -p... yes
Tomcat Native Version: 1.2.2
checking for chosen layout... tcnative
checking for APR... yes
configure: APR 1.5.2 detected.
  setting CC to "gcc"
  setting CPP to "gcc -E"
  adding "-I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include" to TCNATIVE_PRIV_INCLUDES
checking for JDK os include directory...  darwin
  adding "-I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin" to TCNATIVE_PRIV_INCLUDES
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
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 ISO C89... none needed
checking for OpenSSL library... using openssl from /usr/local/openssl/lib and /usr/local/openssl/include
checking OpenSSL library version >= 1.0.2... ok
checking for OpenSSL DSA support... yes
  adding "-I/usr/local/openssl/include" to TCNATIVE_PRIV_INCLUDES
  setting TCNATIVE_LDFLAGS to "-L/usr/local/openssl/lib -lssl -lcrypto"
  adding "-DHAVE_OPENSSL" to CFLAGS
  setting TCNATIVE_LIBS to ""
  setting TCNATIVE_LIBS to " /usr/local/apr/lib/libapr-1.la -lpthread"
checking for apr_pollset_wakeup in -lapr-1... yes
  adding "-DHAVE_POLLSET_WAKEUP" to CFLAGS
configure: creating ./config.status
config.status: creating tcnative.pc
config.status: creating Makefile
config.status: executing default commands

3) make
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/address.lo -c src/address.c && touch src/address.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/bb.lo -c src/bb.c && touch src/bb.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/dir.lo -c src/dir.c && touch src/dir.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/error.lo -c src/error.c && touch src/error.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/file.lo -c src/file.c && touch src/file.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/info.lo -c src/info.c && touch src/info.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/jnilib.lo -c src/jnilib.c && touch src/jnilib.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/lock.lo -c src/lock.c && touch src/lock.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/misc.lo -c src/misc.c && touch src/misc.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/mmap.lo -c src/mmap.c && touch src/mmap.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/multicast.lo -c src/multicast.c && touch src/multicast.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/network.lo -c src/network.c && touch src/network.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/os.lo -c src/os.c && touch src/os.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/poll.lo -c src/poll.c && touch src/poll.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/pool.lo -c src/pool.c && touch src/pool.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/proc.lo -c src/proc.c && touch src/proc.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/shm.lo -c src/shm.c && touch src/shm.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/ssl.lo -c src/ssl.c && touch src/ssl.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/sslcontext.lo -c src/sslcontext.c && touch src/sslcontext.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/sslinfo.lo -c src/sslinfo.c && touch src/sslinfo.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/sslnetwork.lo -c src/sslnetwork.c && touch src/sslnetwork.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/sslutils.lo -c src/sslutils.c && touch src/sslutils.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/stdlib.lo -c src/stdlib.c && touch src/stdlib.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/thread.lo -c src/thread.c && touch src/thread.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o src/user.lo -c src/user.c && touch src/user.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o os/unix/system.lo -c os/unix/system.c && touch os/unix/system.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -o os/unix/uxpipe.lo -c os/unix/uxpipe.c && touch os/unix/uxpipe.lo
/bin/sh /usr/local/apr/build-1/libtool --silent --mode=link  gcc -g -O2   -DHAVE_CONFIG_H  -DDARWIN -DSIGPROCMASK_SETS_THREAD_MASK -DDARWIN_10   -g -O2 -DHAVE_OPENSSL -DHAVE_POLLSET_WAKEUP   -I/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include -I/Users/wangtao/.jenv/candidates/java/1.8.0_51/include/darwin -I/usr/local/openssl/include  -I/usr/local/apr/include/apr-1   -version-info 2:2:2    -o libtcnative-1.la -rpath /usr/local/apr/lib src/address.lo src/bb.lo src/dir.lo src/error.lo src/file.lo src/info.lo src/jnilib.lo src/lock.lo src/misc.lo src/mmap.lo src/multicast.lo src/network.lo src/os.lo src/poll.lo src/pool.lo src/proc.lo src/shm.lo src/ssl.lo src/sslcontext.lo src/sslinfo.lo src/sslnetwork.lo src/sslutils.lo src/stdlib.lo src/thread.lo src/user.lo os/unix/system.lo os/unix/uxpipe.lo -L/usr/local/openssl/lib -lssl -lcrypto  /usr/local/apr/lib/libapr-1.la -lpthread
ld: warning: ld: warning: ignoring file /usr/local/openssl/lib/libcrypto.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libcrypto.aignoring file /usr/local/openssl/lib/libssl.a, file was built for archive which is not the architecture being linked (x86_64): /usr/local/openssl/lib/libssl.a

Everything looks fine, and I get libtcnative-1.0.dylib produced in .libs/, the dir looks like as follows:
.libs  ll
total 2840
-rwxr-xr-x  1 wangtao  staff   200K Nov  4 17:28 libtcnative-1.0.dylib
-rw-r--r--  1 wangtao  staff   1.2M Nov  4 17:28 libtcnative-1.a
lrwxr-xr-x  1 wangtao  staff    21B Nov  4 17:28 libtcnative-1.dylib -> libtcnative-1.0.dylib
lrwxr-xr-x  1 wangtao  staff    19B Nov  4 17:28 libtcnative-1.la -> ../libtcnative-1.la
-rw-r--r--  1 wangtao  staff   1.0K Nov  4 17:28 libtcnative-1.lai

And then after I ant jar and ant run-echo, I got the following errors:

Buildfile: /Users/wangtao/work/apache-tomcat/tcnative/trunk/build.xml

env:
     [echo] java.home = /Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home/jre
     [echo] user.home = /Users/wangtao
     [echo] tc.library.path = /Users/wangtao/work/apache-tomcat/tcnative/trunk/native/.libs
     [echo]

prepare:

compile:
    [javac] /Users/wangtao/work/apache-tomcat/tcnative/trunk/build.xml:220: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

compile-examples:
    [javac] /Users/wangtao/work/apache-tomcat/tcnative/trunk/build.xml:346: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds

run-echo:
     [echo] Running Tomcat Native Echo example ...
     [java] Exception in thread "main" java.lang.UnsatisfiedLinkError: /Users/wangtao/work/apache-tomcat/tcnative/trunk/native/.libs/libtcnative-1.0.dylib: dlopen(/Users/wangtao/work/apache-tomcat/tcnative/trunk/native/.libs/libtcnative-1.0.dylib, 1): Symbol not found: _OCSP_RESPONSE_new
     [java]   Referenced from: /Users/wangtao/work/apache-tomcat/tcnative/trunk/native/.libs/libtcnative-1.0.dylib
     [java]   Expected in: flat namespace
     [java]  in /Users/wangtao/work/apache-tomcat/tcnative/trunk/native/.libs/libtcnative-1.0.dylib
     [java] 	at java.lang.ClassLoader$NativeLibrary.load(Native Method)
     [java] 	at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1937)
     [java] 	at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1855)
     [java] 	at java.lang.Runtime.loadLibrary0(Runtime.java:870)
     [java] 	at java.lang.System.loadLibrary(System.java:1122)
     [java] 	at org.apache.tomcat.jni.Library.<init>(Unknown Source)
     [java] 	at org.apache.tomcat.jni.Library.initialize(Unknown Source)
     [java] 	at org.apache.tomcat.jni.Echo.main(Unknown Source)
     [java] Java Result: 1

Any ideas about what is going wrong here?

------------------------------------------------------------------
From:Mark Thomas <ma...@apache.org>
Send Time:2015年11月4日(星期三) 09:00
To:Tomcat Developers List <de...@tomcat.apache.org>
Subject:Tomcat Native 1.2.2


I've just finished running the unit tests for APR on OSX with the
current 1.2.x trunk and 9.0.x, 8.0.x and 7.0.x and all pass.

I plan to tag 1.2.2 tomorrow morning and will hopefully be able to start
a new vote later in the day.

Mark

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

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