[ODBC-346] MacOS ODBC connector package is missing Connector/C runtime library. Created: 2021-12-08  Updated: 2022-09-14  Resolved: 2022-06-18

Status: Closed
Project: MariaDB Connector/ODBC
Component/s: General
Affects Version/s: 3.1.15
Fix Version/s: 3.1.16

Type: Bug Priority: Critical
Reporter: Berk Akinci Assignee: Lawrin Novitsky
Resolution: Fixed Votes: 0
Labels: None
Environment:

MacBook Air (Retina, 13-inch, 2020)
macOS 11.6 (20G165)


Issue Links:
Relates

 Description   

This appears to be related to incomplete task ODBC-201

I've attempted an installation with the package downloaded from https://dlm.mariadb.com/1936452/connectors/odbc/connector-odbc-3.1.15/mariadb-connector-odbc-3.1.15-osx-x86_64.pkg

It appears the libmariadb dependency is missing. This according to tool:

	@rpath/libmariadb.3.dylib (compatibility version 3.0.0, current version 3.0.0)

The message as relayed by Excel is:

[iODBC][Driver Manager]dlopen(/Library/MariaDB/MariaDB-Connector-ODBC/libmaodbc.dylib, 6): Library not loaded: @rpath/libmariadb.3.dylib
Referenced from: /Library/MariaDB/MariaDB-Connector-ODBC/libmaodbc.dylib
Reason: image not found

I thought it must be a path problem. I can't find that file on my disk. I expanded the .pkg file and its Payload. That file is not in this package.

The release notes say Connector/ODBC is "based on Connector/C"; not that it depends on it. Still, I attempted to download the Connector/C for macOS, in case I was supposed to get it separately. A package for macOS doesn't exist.

I am still digging into this issue on my setup. However, I think this is a bug: the download provided doesn't have any chance of working out of the box.



 Comments   
Comment by Berk Akinci [ 2021-12-09 ]

I decided to dig into this a little.
I was able to get through a build of source after some roadblocks:

  • cmake was unable to automagically find OpenSSL
  • cmake was unable to automagically find iODBC (as installed by their .dmg file.)
  • Issues within iODBC headers including each other. (Differences in .framework vs. unix-style.)
  • libmariadb/zlib/gzlib.c wouldn't compile because of missing <unistd.h>. (I added in zlib/gzguts.h)

Anyway, the end result: It appears the libmariadb is building fine after gzlib patch. However, it doesn't end up in the "osxinstall" directory. I'm guessing it's supposed to be in there to be included in the package:

Berks-Air:build berka$ find . -name "*.dylib" -o -name "*.so"
./libmaodbc.dylib
./osxinstall/ROOT/Library/MariaDB/MariaDB-Connector-ODBC/libmaodbc.dylib
./osxinstall/ROOT/Library/MariaDB/MariaDB-Connector-ODBC/plugin/mysql_clear_password.so
./osxinstall/ROOT/Library/MariaDB/MariaDB-Connector-ODBC/plugin/caching_sha2_password.so
./osxinstall/ROOT/Library/MariaDB/MariaDB-Connector-ODBC/plugin/dialog.so
./osxinstall/ROOT/Library/MariaDB/MariaDB-Connector-ODBC/plugin/client_ed25519.so
./osxinstall/ROOT/Library/MariaDB/MariaDB-Connector-ODBC/plugin/auth_gssapi_client.so
./osxinstall/ROOT/Library/MariaDB/MariaDB-Connector-ODBC/plugin/sha256_password.so
./libmariadb/mysql_clear_password.so
./libmariadb/caching_sha2_password.so
./libmariadb/libmariadb/libmysqlclient.dylib
./libmariadb/libmariadb/libmariadb.dylib
./libmariadb/libmariadb/libmariadb.3.dylib
./libmariadb/libmariadb/libmysqlclient_r.dylib
./libmariadb/dialog.so
./libmariadb/client_ed25519.so
./libmariadb/auth_gssapi_client.so
./libmariadb/sha256_password.so

Any pointers to where this would be fixed?

I should add I also updated OS since initial report. This is now on: macOS Big Sur 11.6.1 (20G224)

Comment by Lawrin Novitsky [ 2021-12-10 ]

Thank you for your report. This will be fixed in the next release. Since you could build the connector from the source, that can be a workaround for you - using either libmariadb library from that build, or use that libmaodbc entirely.
I don't think this is related to ODBC-201

Comment by Berk Akinci [ 2021-12-10 ]

Thanks. I also need the fix for a customer. I suspect I'll have code signing issues there. Actually, the customer system is older (macOS High Sierra 10.13.6) and is crashing (SIGSEGV) at the iODBC driver manager. So we're not even here yet...

Do you have an estimate of when the next release is coming?

Comment by Lawrin Novitsky [ 2022-06-18 ]

As temporary solution I've returned static linking of mariadbclient. Not closing the ticket, as this is not the final decision, but I am kinda inclined to have it this way.

Comment by Lawrin Novitsky [ 2022-06-18 ]

On 2nd thought I've decided to close it, so it will make to release notes, and open new task for dynamic linking on MacOS

Comment by Berk Akinci [ 2022-06-19 ]

Thanks for fixing this. After spending way too much time on this, I just updated my instructions to point MacOS users to MySQL ODBC connector.
I see that release 3.1.16 progress is 10-out-of-11, but that doesn't tell me the release date. When do you think this fix will be available for binary download?

Comment by Lawrin Novitsky [ 2022-06-20 ]

Sorry for such a long delay with this release. The reason behind it is more like a "force-major", but anyway - sorry. I am planning to finish everything related release build today, so hopefully it will be also published today, or maybe tomorrow.

Comment by Berk Akinci [ 2022-09-13 ]

I don't think this is fixed as of 3.1.17.

I still don't see libmariadb in the package:

Berks-Air:libmaodbc.pkg berka$ tar -zxvf Payload 
x .
x ./Library
x ./Library/MariaDB
x ./Library/MariaDB/MariaDB-Connector-ODBC
x ./Library/MariaDB/MariaDB-Connector-ODBC/libmaodbc.dylib
x ./Library/MariaDB/MariaDB-Connector-ODBC/bin
x ./Library/MariaDB/MariaDB-Connector-ODBC/bin/install_driver
x ./Library/MariaDB/MariaDB-Connector-ODBC/plugin
x ./Library/MariaDB/MariaDB-Connector-ODBC/plugin/mysql_clear_password.so
x ./Library/MariaDB/MariaDB-Connector-ODBC/plugin/caching_sha2_password.so
x ./Library/MariaDB/MariaDB-Connector-ODBC/plugin/dialog.so
x ./Library/MariaDB/MariaDB-Connector-ODBC/plugin/client_ed25519.so
x ./Library/MariaDB/MariaDB-Connector-ODBC/plugin/auth_gssapi_client.so
x ./Library/MariaDB/MariaDB-Connector-ODBC/plugin/sha256_password.so

Comment by Berk Akinci [ 2022-09-13 ]

Also, there is no MacOS versions of C/C++ connector for download on the web site.

Comment by Lawrin Novitsky [ 2022-09-14 ]

berka it's linked statically again on MacOS, thus there is no libmariadb library file in the package.

Comment by Berk Akinci [ 2022-09-14 ]

Sorry about that. Thanks. I was thrown off because the library size is still tiny compared to other platforms.

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