All,

On 6/18/14, 1:50 PM, Christopher Schultz wrote:
> All,
> 
> On 6/13/14, 5:36 PM, Christopher Schultz wrote:
>> I've spent some time trying to script a soup-to-nuts repeatable build of
>> tcnative on win32. I've made some progress but I'm hitting a few snags
>> that perhaps some folks could help with.
> 
> I've got openssl and libapr patched and built. Now, I'm working on
> Mladen's instructions for building tcnative itself. Quoting from his BZ
> comment:
> 
>> It's very simple. The biggest problem is compiling apr and openssl.
>> OpenSSL needs to be patched to allow /MD with static lib (something I
>> tried to convince openssl developers for years without luck). We have
>> the patch in the source dist. Then you have to put apr and openssl
>> include and lib files to some directory
>>
>> C:\foo\bar\include
>> C:\foo\bar\lib
>>
>> Then execute:
>> nmake -f NMAKEMakefile WITH_APR=C:\foo\bar WITH_OPENSSL=C:\foo\bar 
>> APR_DECLARE_STATIC=1 [ENABLE_OCSP=1]
>>
>> When building APR I also modify apr.hw and set  APR_HAVE_IPV6 to 1.
> 
> I have patched APR appropriately and executed this command:
> 
> C:\work\tomcat-native-1.1.30-src> nmake -f NMAKEMakefile
> "WITH_APR=%MYTEMP%\build\apr"
> "WITH_OPENSSL=%MYTEMP%\build\openssl-%OPENSSL_VERSION%" APR_DECLARE_STATIC=1
> 
> (MYTEMP\build\apr contains the apr build and
> MYTEMP\build\openssl-OPENSSL_VERSION contains the openssl build)
> 
> nmake responds with the following:
> 
> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
> NMAKEmakefile.inc(123) : fatal error U1050: Must specify CPU environment
> variable (X86, X64, I64) x86
> Stop.
> 
> Okay, so I have to set the CPU environment variable. I didn't know that,
> but the build script helpfully tells me I have to, and gives me a list
> of recognized values.
> 
> I also noticed that I hadn't installed Java (duh) and so the next build
> failed because jni.h could not be found. After installing Java and
> setting JAVA_HOME appropriately, nmake now reports:
> 
> C:\work\tomcat-native-1.1.30-src> SET CPU=X86
> C:\work\tomcat-native-1.1.30-src> SET JAVA_HOME="C:\Program
> Files\Java\jdk1.7.0_60"
> C:\work\tomcat-native-1.1.30-src> nmake -f NMAKEMakefile
> "WITH_APR=%MYTEMP%\build\apr"
> "WITH_OPENSSL=%MYTEMP%\build\openssl-%OPENSSL_VERSION%" APR_DECLARE_STATIC=1
> 
> Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
> Copyright (C) Microsoft Corporation.  All rights reserved.
> 
> NMAKEmakefile.inc(330) : fatal error U1023: syntax error in expression
> Stop.
> 
> This is NMAKEmakefile.inc, starting on line 330:
> !IF DEFINED(JAVA_HOME) && "$(JAVA_HOME)" != ""
> JAVA_INCLUDES=-I "$(JAVA_HOME)\include" -I "$(JAVA_HOME)\include\win32"
> !ENDIF
> 
> I'm not nmake expert, but I don't see any problems with the above
> make-script. I checked to see that things like DEFINED(), &&, and != are
> used in other places, and everything seems in order.
> 
> Any suggestions?

Aw, geez. Evidently, among other things, Windows is bad at quotes, too.

There is a difference between:

C:\work\tomcat-native-1.1.30-src> SET JAVA_HOME="C:\Program
Files\Java\jdk1.7.0_60"

AND

C:\work\tomcat-native-1.1.30-src> SET JAVA_HOME=C:\Program
Files\Java\jdk1.7.0_60

(note the lack of quotes around the path in the second example)

So, tcnative is building, now.

I'm getting a lot of crypto-related build (not link) errors, so I'll
have to follow-up on those.

-chris

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to