You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2017/05/08 18:23:33 UTC

Had trouble building libtcnative [openssl]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

All,

I'm trying to do a complete test of 8.5.15 (candidate) and I can't
seem to build tcnative because of the OpenSSL dependency.

On my system, I've got OpensSSL 1.0.1t installed globally, but I have
openssl 1.0.2f installed locally for the purposes of building
tcnative. This has worked in the past. When I run configure, it's
telling me that I have 1.0.1t available:

checking for OpenSSL library... using openssl from
/usr/${exec_prefix}/lib and /usr/include
checking OpenSSL library version >= 1.0.2...

Found   OPENSSL_VERSION_NUMBER 0x1000114f (OpenSSL 1.0.1t  3 May 2016)
Require OPENSSL_VERSION_NUMBER 0x1000200f or greater (1.0.2)
configure: error: Your version of OpenSSL is not compatible with this
version of tcnative

If I specify --with-ssl, it's giving me roughly the same behavior:

checking for OpenSSL library... using openssl from
/home/cschultz/projects/apache-tomcat/openssl-1.0.2f/${exec_prefix}/lib
and
/home/cschultz/projects/apache-tomcat/openssl-1.0.2f/include
checking OpenSSL library version >= 1.0.2... configure: error: Your
version of OpenSSL is not compatible with this version of tcnative

Oddly, it doesn't tell me what my current version actually is.

In the openssl-1.0.2f directory, I have the expected libssl.* files
but there was no "lib" directory, so I created a lib/ directory and
symlinked all of the ../libssl.* files into it.

Running openssl-1.0.2f/apps/openssl version confirms that the
command-line app has the proper OpenSSL version, and it's using the
right version of the shared library (confirmed with ldd). It looks
like I was missing the symlinks for the libcrypto.* objects. Once I
added those symlinks, I was able to call configure.

AFAIK, my openssl-1.0.2f/ local directory is a legitimately-built
OpenSSL, but the tcnative build process is looking for things in odd
places. I realize that 1.0.2f is a bit behind the times (1+ year old)
but has the build process changed that much? Also, what about people
using these older versions?

I'm building 1.0.2k from source now to see if any post-build
modifications need to made in order for tcnative's build to pick-up
the libraries, headers, etc. from that version.

Thanks,
- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJZELelAAoJEBzwKT+lPKRYrwsP/2KP8b/VrptcGLHPLIf75kwE
RxGqKbz2HqkUvhfoIJScmVFx9iucBFyR22QOgzOazSOQOImNCOE6CvWngBcr/EJS
8jHp1XUlxcNT3kudFFaF47fnGYQWuXAko1AvDm1AYH56jVvo7YcD+CQkQmBSUC5p
WOpy8+SdmOtf+scgmmT0Uybpau0uj5nLpUQT5NgD3oQvuWwego49r8USh/S7LM/V
a/6FgPp+Jy8AzcVevyl7fz9tI3ITkoi8JHwlGFl3h6QR4vbhQJp0Spv4MCT2JHnR
rFYFi/ecf/6rpw+xxff7T1vsYNxLmhBBjDtRuKajs4r4SATp8bJIjTUJWfZSSx87
4W3kTuOm2LBrBOO3VxNRjxzgAzZ770Cz5XaSCiAKvIXzn9EOdozP+pwp4E7ZB9r9
bYmIfszNNo/GfR1ZPlS7+VJiQTNzOnPvQpyQII4hqoGlGLq41i74qrpOrSYChxml
WzhyoXzNMO5Ee0rSS57ulvxqudSjSpwJxvLHbIZ6qCbD36BcKF9SelhmFmYQ9zub
hF2BAUtB6Bvc7lE8kTe/ED5+o+0OBr+hriiBEyHIXzdL8oZmuzw8KGgUNj5x3pNQ
Uar5Td983A+6CCdvrGmLV+IkL7n7NkAWhQ6Swfbx8oKl3W7SyA3HVG7DN8lOGFWN
Hr+/CtCEoMyL3RTpTsJQ
=2H4K
-----END PGP SIGNATURE-----

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


Re: Had trouble building libtcnative [openssl]

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

All,

On 5/8/17 2:23 PM, Christopher Schultz wrote:
> All,
> 
> I'm trying to do a complete test of 8.5.15 (candidate) and I can't 
> seem to build tcnative because of the OpenSSL dependency.
> 
> On my system, I've got OpensSSL 1.0.1t installed globally, but I
> have openssl 1.0.2f installed locally for the purposes of building 
> tcnative. This has worked in the past. When I run configure, it's 
> telling me that I have 1.0.1t available:
> 
> checking for OpenSSL library... using openssl from 
> /usr/${exec_prefix}/lib and /usr/include checking OpenSSL library
> version >= 1.0.2...
> 
> Found   OPENSSL_VERSION_NUMBER 0x1000114f (OpenSSL 1.0.1t  3 May
> 2016) Require OPENSSL_VERSION_NUMBER 0x1000200f or greater (1.0.2) 
> configure: error: Your version of OpenSSL is not compatible with
> this version of tcnative
> 
> If I specify --with-ssl, it's giving me roughly the same behavior:
> 
> checking for OpenSSL library... using openssl from 
> /home/cschultz/projects/apache-tomcat/openssl-1.0.2f/${exec_prefix}/li
b
>
> 
and
> /home/cschultz/projects/apache-tomcat/openssl-1.0.2f/include 
> checking OpenSSL library version >= 1.0.2... configure: error:
> Your version of OpenSSL is not compatible with this version of
> tcnative
> 
> Oddly, it doesn't tell me what my current version actually is.
> 
> In the openssl-1.0.2f directory, I have the expected libssl.*
> files but there was no "lib" directory, so I created a lib/
> directory and symlinked all of the ../libssl.* files into it.
> 
> Running openssl-1.0.2f/apps/openssl version confirms that the 
> command-line app has the proper OpenSSL version, and it's using
> the right version of the shared library (confirmed with ldd). It
> looks like I was missing the symlinks for the libcrypto.* objects.
> Once I added those symlinks, I was able to call configure.
> 
> AFAIK, my openssl-1.0.2f/ local directory is a legitimately-built 
> OpenSSL, but the tcnative build process is looking for things in
> odd places. I realize that 1.0.2f is a bit behind the times (1+
> year old) but has the build process changed that much? Also, what
> about people using these older versions?
> 
> I'm building 1.0.2k from source now to see if any post-build 
> modifications need to made in order for tcnative's build to
> pick-up the libraries, headers, etc. from that version.

A fresh build of 1.0.2k allows tcnative to build out-of-the box with
no alterations. I may go back and try 1.0.2f again just to see... the
openssl build seems not very repeatable.

For example, if I do "./config && make" I won't get any .so files. If
I then run "./config shared && make" the build fails with a
nonsensical error message. Basically, you either have to "make clean"
or just blow-away the local copy and re-build from scratch (which was
what I did) in order to get a working build.

- -chris
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJZEL1NAAoJEBzwKT+lPKRYRgMP/i7rlD7C/xBNUzPVcT1tAJ/p
KDjWJ1SoecA8FTtuY1cJx7Rd12HoeLeCspVaeeXaBG2kaskIK+qDxjSNQBQ85CgG
mvm8QQq7tvxUsa00x3rms/HXcR4/NLLbCd40Cn6GHBBsBvuirQxMG1i0Kwp+p7WY
l9e9tu9klqqc3pmxHAGSjZjPmrivw5Ag6FYGKjrwQDRSCyWLfp6D6UiH/pge6iLY
rhJ43xYrx2UAidwk8MULWQFsGZoCpLxX/1Q1TYdsCJKB8K17NT0ErMYPjygJymK0
syI6bmtvA9t+7iyUwc8G6oLzSm04bmQ5RdkS5hxgaFUt2JOqnI7yIt47Hs/OJ+uk
OfPaQO1mVhYkNwaI9QdkX5H7LyyRiABHHNKhK7OAbolT0ckySAAzhP02VpPYUUIW
vkEdaPS18sihZGufUXJtxfBlxiRwe3Rv7SoSpnUgwnmXfUI5d8in5AJsGay+6fEb
cYEh4cjkd3RgX7YthFU/j3Sk8m4N7pNIuykHSkZQpu9YWpYfhjxnulLGAt5f/9YM
1wzH7pDxs1f+8Q8weDG1Y26MA2NM6O4OW4FqfiUJIqZWYbS3FOv4imArmypkMfBD
1t7WTTVoVn1F1if6tX37W89JEFlV/j0JiW7AoiGq5Q8uhxYGFc12/LPmsVL7al/s
erCk6jE3FQki88S5ucvd
=Mipo
-----END PGP SIGNATURE-----

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


Re: Had trouble building libtcnative [openssl]

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

Rainer,

On 5/8/17 5:00 PM, Rainer Jung wrote:
> Hi Chris,
>
> Am 08.05.2017 um 20:23 schrieb Christopher Schultz:
>> I'm trying to do a complete test of 8.5.15 (candidate) and I can't
>> seem to build tcnative because of the OpenSSL dependency.
>>
>> On my system, I've got OpensSSL 1.0.1t installed globally, but I have
>> openssl 1.0.2f installed locally for the purposes of building
>> tcnative. This has worked in the past. When I run configure, it's
>> telling me that I have 1.0.1t available:
>>
>> checking for OpenSSL library... using openssl from
>> /usr/${exec_prefix}/lib and /usr/include
>> checking OpenSSL library version >= 1.0.2...
>>
>> Found   OPENSSL_VERSION_NUMBER 0x1000114f (OpenSSL 1.0.1t  3 May 2016)
>> Require OPENSSL_VERSION_NUMBER 0x1000200f or greater (1.0.2)
>> configure: error: Your version of OpenSSL is not compatible with this
>> version of tcnative
>>
>> If I specify --with-ssl, it's giving me roughly the same behavior:
>
> the logic for the test is contained in file build/tcnative.m4.
>
> The macro is named TCN_CHECK_SSL_TOOLKIT and most is just plain shell
> syntax.
>
> If you tell configure a directory using --with-ssl, then yes, this macro
> needs an include and a lib or lib64 sub directory.
>
> If you do not give it a specific directory, it will try /usr /usr/local
> /usr/local/ssl /usr/pkg /usr/sfw.

Oddly enough, the openssl build process never creates a directory called
"lib/" unless you "make install" it. I never do that because I have
nowhere to "install" it to.

>> checking for OpenSSL library... using openssl from
>> /home/cschultz/projects/apache-tomcat/openssl-1.0.2f/${exec_prefix}/lib
>> and
>> /home/cschultz/projects/apache-tomcat/openssl-1.0.2f/include
>> checking OpenSSL library version >= 1.0.2... configure: error: Your
>> version of OpenSSL is not compatible with this version of tcnative
>>
>> Oddly, it doesn't tell me what my current version actually is.
>
> Can you have a look at the contents of config.log? Any line there that
> contains "OPENSSL_VERSION_NUMBER"?

I can check that, but I think it would be helpful if the configure
script could say "Your 1.0.1f version is too old -- you need 1.0.2 or
later." It would make it more clear as to what effective version had
been detected.

>> In the openssl-1.0.2f directory, I have the expected libssl.* files
>> but there was no "lib" directory, so I created a lib/ directory and
>> symlinked all of the ../libssl.* files into it.
>>
>> Running openssl-1.0.2f/apps/openssl version confirms that the
>> command-line app has the proper OpenSSL version, and it's using the
>> right version of the shared library (confirmed with ldd). It looks
>> like I was missing the symlinks for the libcrypto.* objects. Once I
>> added those symlinks, I was able to call configure.
>>
>> AFAIK, my openssl-1.0.2f/ local directory is a legitimately-built
>> OpenSSL, but the tcnative build process is looking for things in odd
>> places. I realize that 1.0.2f is a bit behind the times (1+ year old)
>> but has the build process changed that much? Also, what about people
>> using these older versions?
>
> No it is not a 2f versus 2k problem. When you say "legitimately-built",
> is the directory you pass to configure the build directory or an install
> directory? We do assume an install directory, which should automatically
> have the right layout (sub dirs include and lib or lib64).

It's a build directory, which is certainly a part of the problem. Oddly
enough, a re-build from scratch seems to have cleared things up.

>> I'm building 1.0.2k from source now to see if any post-build
>> modifications need to made in order for tcnative's build to pick-up
>> the libraries, headers, etc. from that version.

Thanks,
-chris



Re: Had trouble building libtcnative [openssl]

Posted by Rainer Jung <ra...@kippdata.de>.
Hi Chris,

Am 08.05.2017 um 20:23 schrieb Christopher Schultz:
> I'm trying to do a complete test of 8.5.15 (candidate) and I can't
> seem to build tcnative because of the OpenSSL dependency.
>
> On my system, I've got OpensSSL 1.0.1t installed globally, but I have
> openssl 1.0.2f installed locally for the purposes of building
> tcnative. This has worked in the past. When I run configure, it's
> telling me that I have 1.0.1t available:
>
> checking for OpenSSL library... using openssl from
> /usr/${exec_prefix}/lib and /usr/include
> checking OpenSSL library version >= 1.0.2...
>
> Found   OPENSSL_VERSION_NUMBER 0x1000114f (OpenSSL 1.0.1t  3 May 2016)
> Require OPENSSL_VERSION_NUMBER 0x1000200f or greater (1.0.2)
> configure: error: Your version of OpenSSL is not compatible with this
> version of tcnative
>
> If I specify --with-ssl, it's giving me roughly the same behavior:

the logic for the test is contained in file build/tcnative.m4.

The macro is named TCN_CHECK_SSL_TOOLKIT and most is just plain shell 
syntax.

If you tell configure a directory using --with-ssl, then yes, this macro 
needs an include and a lib or lib64 sub directory.

If you do not give it a specific directory, it will try /usr /usr/local 
/usr/local/ssl /usr/pkg /usr/sfw.

> checking for OpenSSL library... using openssl from
> /home/cschultz/projects/apache-tomcat/openssl-1.0.2f/${exec_prefix}/lib
> and
> /home/cschultz/projects/apache-tomcat/openssl-1.0.2f/include
> checking OpenSSL library version >= 1.0.2... configure: error: Your
> version of OpenSSL is not compatible with this version of tcnative
>
> Oddly, it doesn't tell me what my current version actually is.

Can you have a look at the contents of config.log? Any line there that 
contains "OPENSSL_VERSION_NUMBER"?

> In the openssl-1.0.2f directory, I have the expected libssl.* files
> but there was no "lib" directory, so I created a lib/ directory and
> symlinked all of the ../libssl.* files into it.
>
> Running openssl-1.0.2f/apps/openssl version confirms that the
> command-line app has the proper OpenSSL version, and it's using the
> right version of the shared library (confirmed with ldd). It looks
> like I was missing the symlinks for the libcrypto.* objects. Once I
> added those symlinks, I was able to call configure.
>
> AFAIK, my openssl-1.0.2f/ local directory is a legitimately-built
> OpenSSL, but the tcnative build process is looking for things in odd
> places. I realize that 1.0.2f is a bit behind the times (1+ year old)
> but has the build process changed that much? Also, what about people
> using these older versions?

No it is not a 2f versus 2k problem. When you say "legitimately-built", 
is the directory you pass to configure the build directory or an install 
directory? We do assume an install directory, which should automatically 
have the right layout (sub dirs include and lib or lib64).

> I'm building 1.0.2k from source now to see if any post-build
> modifications need to made in order for tcnative's build to pick-up
> the libraries, headers, etc. from that version.

Regards,

Rainer


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