[ODBC-340] FreeBSD - Undefined symbol "OPENSSL_init_ssl" Created: 2021-10-20  Updated: 2021-10-25  Resolved: 2021-10-25

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: 3.1.11, 3.1.12, 3.1.13
Fix Version/s: 3.1.14

Type: Bug Priority: Major
Reporter: Richard van Vliet Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None
Environment:

FreeBSD 13.0 and FreeBSD 12.2


Attachments: Text File patch-CMakeLists.txt    

 Description   

Package does not link against libssl on FreeBSD.
I have create a patch for the CMakeList.txt

This is tested on FreeBSD with the 2021Q3 and Latest Ports tree.
mariadb-connector-odbc-3.1.11 but newer versions are missing the same info.

Could this be updated upstream?

Richard



 Comments   
Comment by Lawrin Novitsky [ 2021-10-20 ]

Thank you for your report.
There is still
TARGET_LINK_LIBRARIES(${LIBRARY_NAME} ${MARIADB_CLIENT_TARGET_NAME} ${ODBC_INSTLIBS} ${PLATFORM_DEPENDENCIES})
That should link c/odbc library against openssl library. If it was found. and if it was not found, there should been the cmake error, I think

At very least, your change should be limited to freebsd. But it feels like either the reason for the error is different, or it should be fixed differently.
Could you please show your cmake output?

Comment by Richard van Vliet [ 2021-10-20 ]

Hi,

I a not very familiar with Cmake (or any make) so bare with me.

I have a build log from my poudriere server available here : http://builder.newimage.nl/logs/bulk/FreeBSD_13-0_amd64-2021Q3/2021-09-15_01h03m11s/logs/mariadb-connector-odbc-3.1.11.log

I am unable to find any errors in the log, is just simply seems to ignore any SSL when linking.

The CMake output seems to detect OpenSSL :
{{ – Found OpenSSL: /usr/lib/libcrypto.so (found version "1.1.1k")
– Configuring to build with OpenSSL /usr/lib/libssl.so;/usr/lib/libcrypto.so}}

But is does not link
{{ – All linked targets/external dependencies: mariadbclient odbcinst m }}

And with the patch it does link with libsssl.
{{ – All linked targets/external dependencies: mariadbclient odbcinst /usr/lib/libssl.so;/usr/lib/libcrypto.so;m }}

I use an old patch file example wich i recreated for this version.
The original Bug report at freeBSD is here : https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247344

What i can see is that any other line with a SET(PLATFORM_DEPENDENCIES .... it includes the current ${PLATFORM_DEPENDENCIES} value only line 243 does not and with the detection of the LIB_MATH it is being overwritten.

Regards richard

Comment by Lawrin Novitsky [ 2021-10-20 ]

Hmm... actually you are seemed to be right. m is not added to dependencies, but overwrite them. I misread the code =)
Ok, thanks. I'll take care of it, as I guess it needs a bit more than this. Thanks!

Generated at Thu Feb 08 03:27:59 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.