tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: Need guidance for writing unit tests for 55317
Date Tue, 20 Aug 2013 17:55:48 GMT
Nick,

On 8/20/13 1:41 PM, Christopher Schultz wrote:
> Nick,
> 
> On 8/20/13 1:25 PM, Christopher Schultz wrote:
>> tcnative can be built on Max OS X like this:
>>
>> $ cd $CATALINA_HOME/bin
>> $ tar xzf tomcat-native.tar.gz
>> $ cd tomcat-native-*-src/jni/native
>> $ ./configure --with-apr=/usr/bin/apr-1-config --with-ssl
>> --with-java-home=`/usr/libexec/java_home`
>>
>> At this point, configure chokes on my system because it's trying to find
>> 'cc' under Xcode.app and I'm not sure where it's sniffing that directory
>> base from. Maybe you'll have better luck. I'll reply if I figure it out.
> 
> Okay, it seems that apr-1-config is giving the wrong path for 'cc' to
> configure. I'm investigating...

Okay, you can simply trump apr-1-config's (incorrect) path for cc like this:

$ CC=/usr/bin/gcc ./configure --with-apr=/usr/bin/apr-1-config
--with-ssl --with-java-home=`/usr/libexec/java_home`

Unfortunately, make then chokes with a similar problem, and make doesn't
want to allow you to override CC on the command-line.

Instead, I had to hack /usr/share/apr-1/build-1/apr_rules.mk and modify
the existing CC definition:

CC=/Applications/Xcode.app/Contents/Developer/Toolchains/OSX10.8.xctoolchain/usr/bin/cc

... to instead point to where cc actually lives:

CC=/usr/bin/gcc

I had to re-run ./configure (as above, including the CC=... stuff) and
now make is complaining about something else:

$ make
/bin/sh /usr/share/apr-1/build-1/libtool --silent --mode=compile
/usr/bin/gcc   -g -Os -pipe  -DHAVE_CONFIG_H -DDARWIN
-DSIGPROCMASK_SETS_THREAD_MASK   -g -O2 -DHAVE_OPENSSL
-I/Users/chris/packages/apache-tomcat-7.0.42/bin/temp/tomcat-native-1.1.27-src/jni/native/include
-I/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/include -I/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/include/darwin
 -I/usr/include/apr-1   -o src/address.lo -c src/address.c && touch
src/address.lo
libtool: compile: unable to infer tagged configuration
libtool: compile: specify a tag with `--tag'
make[1]: *** [src/address.lo] Error 1
make: *** [all-recursive] Error 1

:(

-chris


Mime
View raw message