When i try and build version 5.0 of firebird on a mac (either intel or m1 based), everything works fine. I can also make the installer and install everything fine on either style of mac. I can use all the tools like isql and can connect via database tools like datagrip (which uses jdbc). The only problem is when i try and access the database from python using firebird-driver everything dies.
There are 2 problems. These are:-
- the firebird driver can't find the libfbclient.dylib file, but this is easy to fix by doing the following:-
driver_config.fb_client_library.value = "/Library/Frameworks/Firebird.framework/Resources/lib/libfbclient.dylib"
- when you try to connect to a database or do any operation on the database it fails with the following
firebird.driver.types.DatabaseError: Error loading plugin Engine13
-Module /Library/Frameworks/Firebird.framework/Versions/A/Resources/plugins/libEngine13.dylib exists but can not be loaded
-dlopen(/Library/Frameworks/Firebird.framework/Versions/A/Resources/plugins/libEngine13.dylib, 0x0001): symbol not found in flat namespace '_fb_cancel_operation'
None
This is due to the firebird driver connecting to the libfbclient.dylib and making direct calls to the exported functions. It appears that all the functions are exported in the libfbclient.dylib (via the nm -gC tool), but then in libEngine13.dylib none of these symbols are exported. nm -gC looks like this for libEngine13.dylib:
U _fb_cancel_operation
U _fb_database_crypt_callback
U _fb_dsql_set_timeout
U _fb_get_master_interface
U _fb_interpret
U _fb_print_blr
U _fb_shutdown
U _fb_shutdown_callback
U _fb_sqlstate
.....
U _find_cipher
U _find_hash
00000000001deba0 T _firebird_plugin
U _flock
U _fopen
....
I am assuming that libfbclient.dylib calls the libEngine13.dylib but the functions aren't exported. Is this something that is broken in the mac build ? I am assuming people using firebird with python on other platforms.
To build the firebird I follow the readme.build.macosx doco and everything builds successfully, tests run fine, installation is fine.
When i try and build version 5.0 of firebird on a mac (either intel or m1 based), everything works fine. I can also make the installer and install everything fine on either style of mac. I can use all the tools like isql and can connect via database tools like datagrip (which uses jdbc). The only problem is when i try and access the database from python using firebird-driver everything dies.
There are 2 problems. These are:-
driver_config.fb_client_library.value = "/Library/Frameworks/Firebird.framework/Resources/lib/libfbclient.dylib"This is due to the firebird driver connecting to the libfbclient.dylib and making direct calls to the exported functions. It appears that all the functions are exported in the libfbclient.dylib (via the nm -gC tool), but then in libEngine13.dylib none of these symbols are exported. nm -gC looks like this for libEngine13.dylib:
I am assuming that libfbclient.dylib calls the libEngine13.dylib but the functions aren't exported. Is this something that is broken in the mac build ? I am assuming people using firebird with python on other platforms.
To build the firebird I follow the readme.build.macosx doco and everything builds successfully, tests run fine, installation is fine.