Bug 59996 - tcnative.m4 always refers to lib directory
Summary: tcnative.m4 always refers to lib directory
Status: RESOLVED FIXED
Alias: None
Product: Tomcat Native
Classification: Unclassified
Component: Library (show other bugs)
Version: 1.2.9
Hardware: PC Linux
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-12 14:45 UTC by Coty Sutherland
Modified: 2017-01-30 11:38 UTC (History)
0 users



Attachments
patch proposal (1.41 KB, patch)
2016-08-12 14:47 UTC, Coty Sutherland
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Coty Sutherland 2016-08-12 14:45:17 UTC
When building tomcat-native on a 64-bit system and using a 64-bit openssl distribution that isn't the in the /usr directory tcnative always generates a configure script that references /lib instead of /lib64.

To reproduce:

1) Build openssl locally (for example, /tmp/openssl) or you can just point to a random directory like /tmp/test that has a lib64 subdirectory (you don't need to build to reproduce)
2) Run buildconf to generate `configure`
3) Execute configure and observe output:

$ ./configure --with-apr=/usr/bin/apr-1-config --with-java-home=$JAVA_HOME --with-ssl=/tmp/openssl --prefix=/dist | grep "using openssl from"
checking for OpenSSL library... using openssl from /tmp/openssl/lib and /tmp/openssl/include

This causes an invalid path to be configured into rpath for 64-bit machines and prevents 64-bit distributions of tcnative that install in openssl non-standard locations from working as expected (which is referencing the correct openssl distribution).
Comment 1 Coty Sutherland 2016-08-12 14:47:20 UTC
Created attachment 34143 [details]
patch proposal

This patch adds a test for $use_openssl/lib64 and if it succeeds, updates the lib directory in use to be lib64 instead of lib. It defaults to lib if lib64 is not present.
Comment 2 Mark Thomas 2017-01-30 11:38:30 UTC
Fixed for 1.2.11 onwards.