Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide a clang-compiled version of libdb2.dylib on macOS #3

Open
pavelzw opened this issue Aug 7, 2024 · 0 comments
Open

Provide a clang-compiled version of libdb2.dylib on macOS #3

pavelzw opened this issue Aug 7, 2024 · 0 comments

Comments

@pavelzw
Copy link

pavelzw commented Aug 7, 2024

Downloading and extracting https://github.com/ibmdb/db2drivers/blob/main/clidriver/macos64_odbc_cli.tar.gz and executing the following:

❯ otool -L clidriver/lib/libdb2.dylib
clidriver/lib/libdb2.dylib:
	libdb2.dylib (compatibility version 0.0.0, current version 0.0.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1677.104.0)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	/usr/lib/libresolv.9.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/lib/gcc/8/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.25.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
	/usr/local/lib/gcc/8/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)

A large part of the macOS ecosystem relies on clang being used for compiling packages.
For example, when building the python bindings from source (and very small patches of https://github.com/ibmdb/python-ibmdb/blob/master/ibm_db.c) leads to the compilation working but during runtime I get the following issue:

import: 'ibm_db'
Traceback (most recent call last):
  File "/Users/runner/miniforge3/conda-bld/ibm_db_1722957211176/test_tmp/run_test.py", line 2, in <module>
    import ibm_db
ImportError: dlopen(.../lib/python3.11/site-packages/ibm_db.cpython-311-darwin.so, 0x0002): Symbol not found: (__ZNKSt8__detail20_Prime_rehash_policy14_M_need_rehashEmmm)
  Referenced from: '.../lib/python3.11/site-packages/clidriver/lib/libdb2.dylib'
  Expected in: '/usr/lib/libstdc++.6.dylib'

It would help a lot if there was a libdb2.dylib available that is build with clang from macOS.
I know that installing GCC via homebrew would solve this issue but this is not an option for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant