Summary: | databases/mariadb-connector-odbc: fix Undefined symbol "OPENSSL_init_ssl" | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Robert Nagy <robert> | ||||||
Component: | Individual Port(s) | Assignee: | Bernard Spil <brnrd> | ||||||
Status: | Closed FIXED | ||||||||
Severity: | Affects Many People | CC: | r.vvliet | ||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(brnrd) |
||||||
Version: | Latest | ||||||||
Hardware: | Any | ||||||||
OS: | Any | ||||||||
Attachments: |
|
Thanks for the patch! Have you reported this upstream as well? https://jira.mariadb.org/projects/ODBC I did not report it upstream, I will leave that to someone else. A commit references this bug: Author: brnrd Date: Wed Jun 17 17:49:42 UTC 2020 New revision: 539435 URL: https://svnweb.freebsd.org/changeset/ports/539435 Log: databases/mariadb-connector-odbc: Update to 3.1.7 * Fix SSL detection as well PR: 247344 Reported by: Robert Nagy <robert openbsd org> Changes: head/databases/mariadb-connector-odbc/Makefile head/databases/mariadb-connector-odbc/distinfo Updated Connector/C and Connector/ODBC to 3.1 branch. The detection in the configure stage now works proper. If there's still an issue, please reopen and I'll have a look. I didn't find references to OPENSSL_init_ssl in the 3.1.7 code. Your commit does not change the fact that the port does not link to libssl. Also: nm -a work/mariadb-connector-odbc-3.1.7-ga-src/libmaodbc.so | grep OPENSSL U OPENSSL_init_ssl A commit references this bug: Author: brnrd Date: Mon Jun 22 09:48:39 UTC 2020 New revision: 539799 URL: https://svnweb.freebsd.org/changeset/ports/539799 Log: databases/mariadb-connector-odbc: Fix linking libssl PR: 247344 Submitted by: Robert Nagy <robert openbsd org> Changes: head/databases/mariadb-connector-odbc/Makefile head/databases/mariadb-connector-odbc/files/ head/databases/mariadb-connector-odbc/files/patch-CMakeLists.txt Hi, I hope opening an old issue is correct. I think this bug had been reintroduced with the remove of the Cmake patch. I am using FreeBSD 13.0-RELEASE The Patch changed the CmakeLists.txt line to : SET(PLATFORM_DEPENDENCIES ${PLATFORM_DEPENDENCIES} ${LIB_MATH}) But the tar stil has the old line : SET(PLATFORM_DEPENDENCIES ${LIB_MATH}) I have no experience with C of Linking so i hope i have supplied sufficient info # isql connection database PASSWORD select 1 ld-elf.so.1: /usr/local/lib/mariadb/libmaodbc.so: Undefined symbol "OPENSSL_init_ssl" # readelf -a /usr/local/lib/mariadb/libmaodbc.so | grep 'SSL_init' 000000095c98 007300000007 R_X86_64_JUMP_SLOT 0000000000000000 OPENSSL_init_ssl + 0 115: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND OPENSSL_init_ssl # pkg info mariadb-connector-odbc mariadb-connector-odbc-3.1.11 Name : mariadb-connector-odbc Version : 3.1.11 Installed on : Tue Oct 19 18:31:16 2021 CEST Origin : databases/mariadb-connector-odbc Architecture : FreeBSD:13:amd64 Prefix : /usr/local Categories : databases Licenses : LGPL21 Maintainer : brnrd@FreeBSD.org WWW : https://mariadb.com/kb/en/mariadb/mariadb-connector-odbc/ Comment : MariaDB database connector for odbc Options : SSL : on Shared Libs required: libodbcinst.so.2 Shared Libs provided: libmaodbc.so Annotations : FreeBSD_version: 1300139 repo_type : binary repository : newimage Flat size : 616KiB The poudriere build logs are here. For Quarterly Q3 http://builder.newimage.nl/logs/bulk/FreeBSD_13-0_amd64-2021Q3/2021-09-15_01h03m11s/logs/mariadb-connector-odbc-3.1.11.log For Latest http://builder.newimage.nl/logs/bulk/FreeBSD_13-0_amd64-latest/2021-09-15_07h37m11s/logs/mariadb-connector-odbc-3.1.11.log Created attachment 228861 [details]
Pathc to make sure SSL is linked
I have recreated the patch (Attached) and tested this on my system.
Tested with Ports tree 2021Q3
The log shows it's linked now
-- Linking Connector/C library statically(mariadbclient)
-- Version script: /wrkdirs/usr/ports/databases/mariadb-connector-odbc/work/mariadb-connector-odbc-3.1.11-ga-src/maodbc.def
-- All linked targets/external dependencies: mariadbclient odbcinst /usr/lib/libssl.so;/usr/lib/libcrypto.so;m
#ldd /usr/local/lib/mariadb/libmaodbc.so
/usr/local/lib/mariadb/libmaodbc.so:
libodbcinst.so.2 => /usr/local/lib/libodbcinst.so.2 (0x80070c000)
libssl.so.111 => /usr/lib/libssl.so.111 (0x800727000)
libcrypto.so.111 => /lib/libcrypto.so.111 (0x801000000)
libm.so.5 => /lib/libm.so.5 (0x8007bf000)
libc.so.7 => /lib/libc.so.7 (0x800263000)
libthr.so.3 => /lib/libthr.so.3 (0x8012f5000)
isql now gives a Connected prompt.
Can this patch be included in the port.
Richard
I have reported this also to upstream here : https://jira.mariadb.org/browse/ODBC-340 Richard Hi Upstream has accepted the bug and marked is for fix in 3.1.14 Cloud this patch be included in the current port until it is upgraded. Upstream issue https://jira.mariadb.org/browse/ODBC-340 |
Created attachment 215659 [details] fix The mariadb-connector-odbc port requires libssl however it does not link with it. The attached patch fixes that issue.