...
You may have to set your JAVA_HOME
environment variable and/or specify the full path to your ant
binary.
Building libtcnative
Building libtcnative
it fairly straightforward as well, but you will need a number of prerequisites that are not terribly obvious as to how to get them.
- Xcode command-line tools, available from Apple's developer tools download site. Make sure you get the proper version for your XCode version (if you have XCode already installed) and your OS version (10.x)
Wiki Markup Apache Portal Runtime (APR), available either directly from Apache ([APR downloads|https://apr.apache.org/download.cgi]) or by using [https://brew.sh/|brew] ({{brew install apr}}) 1. (Optional) OpenSSL 1.1.1 (latest at the time of this writing), available either directly from OpenSSL ([|OpenSSL Downloads]) or by using [brew|] ({{{brew install openssl1
Download and unpack the libtcnative sources:
$ tar xzf tomcat-native-x.y.x.tar.gz
$ cd tomcat-native-x.y.z/native
Using OpenSSL
If using OpenSSL:
Wiki Markup |
---|
{{$ ./configure \-\-with-ssl=\[path to OpenSSL\] --with-apr=\[path to APR\] --with-java-home=\[your java home\]}} |
For example:
$ ./configure --with-ssl=/usr/local/Cellar/openssl@1.1/1.1.1 --with-apr=/usr/local/Cellar/apr/1.6.5 --with-java-home=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home
...
./configure --with-ssl=yes --with-apr=/usr/local/Cellar/apr/1.6.5 --with-java-home=/Library/Java/JavaVirtualMachines/jdk1.8.0_181.jdk/Contents/Home
In either case (OpenSSL or not), proceed with the build process:
make
Once this process has completed, your built libraries can be found in .libs/
.
Installing libtcnative
While you can set ld.library.path
to include libraries from all over the place, I recommend that you copy everything into one place so you can easily find everything and it won't interfere with anything else on your system.
First, copy the libtcnative
binaries from where they were built:
No Format |
---|
$ cp -aR tomcat-native-x.y.z/native/.libs/* apache-tomcat-x.y.z-src/output/build/bin/ |
Next, copy the APR libraries:
No Format |
---|
$ cp -a$ $APR_HOME/libexec/lib/* apache-tomcat-x.y.z-src/output/build/bin/ |
Finally, if you are using a custom OpenSSL build, copy those libraries as well:
No Format |
---|
$ cp -a$ $OPENSSL_HOME/lib/* apache-tomcat-x.y.z-src/output/build/bin/ |