Uploaded image for project: 'MariaDB Connector/ODBC'
  1. MariaDB Connector/ODBC
  2. ODBC-340

FreeBSD - Undefined symbol "OPENSSL_init_ssl"

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 3.1.11, 3.1.12, 3.1.13
    • 3.1.14
    • General
    • None
    • FreeBSD 13.0 and FreeBSD 12.2

    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

      Attachments

        Activity

          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?

          Lawrin Lawrin Novitsky added a comment - 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?

          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

          rjvvliet Richard van Vliet added a comment - 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

          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!

          Lawrin Lawrin Novitsky added a comment - 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!

          People

            Lawrin Lawrin Novitsky
            rjvvliet Richard van Vliet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.