You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
UDFs in Firebird 3.0.4 on macOS Mojave - when trying to call UDF from fbudf.dylib in isql, a message "Statement failed, SQLSTATE = 39000 invalid request BLR at offset 35" is displayed [CORE6122]
#6371
Submitted by: Krzysztof Gałka (DGCS S.A.) (krzysztof_galka_dgcs_sa)
Hello,
after installing Firebird 3.0.4 on macOS Mojave (10.14.3, 64-bit), when trying to call a UDF from file fbudf.dylib (using isql), for example trying to call ADDYEAR using the command
SELECT ADDYEAR(CAST('2019-08-13' AS TIMESTAMP), 1) FROM RDB$DATABASE;
the following mesage is shown:
Statement failed, SQLSTATE = 39000
invalid request BLR at offset 35
-function ADDYEAR is not defined
-module name or entrypoint could not be found
The UDFs from file ib_udf.dylib, for example STRLEN, seem to work correctly (when called using isql).
Firebird 3.0.4 was installed using the Firebird-3.0.4-33054-lipo-x86_64.pkg package. Function ADDYEAR was declared by copying and pasting its declaration from file fbudf.sql in isql. Similarly, function STRLEN was declared by copying and pasting its declaration from file ib_udf2.sql in isql. Running "SHOW FUNCTIONS;" in isql produces the following output:
Global functions
Function Name Invalid Dependency, Type
================================= ======= =====================================
ADDYEAR
STRLEN
After checking the file fbudf.dylib with otool - by running "otool -L fbudf.dylib" - the following output is produced:
fbudf.dylib:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
/Users/pbeach/firebird304/gen/Release/firebird/lib/libfbclient.dylib.3.0.4 (compatibility version 3.0.4, current version 3.0.4)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)
Probably fbudf.dylib contains an incorrect link (the second path in the message above).
The UDFs from file fbudf.dylib seem to work correctly in Firebird 2.5.5. After running otool - again with "otool -L fbudf.dylib" - on fbudf.dylib from Firebird 2.5.5, the output is:
fbudf.dylib:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
Mark, its a bug in the creation of the Firebird framework, I am testing the fix for postfix.darwin now.
The bug is also easy to fix manually using otool to change the location of the libfbclient referred to in my build directory (/Users/pbeach/firebird304/gen/Release/firebird/lib/libfbclient.dylib.3.0.4) to the libfbclient.dylib found in the framework (Library/Frameworks/Firebird.framework/Versions/A/Firebird)
Submitted by: Krzysztof Gałka (DGCS S.A.) (krzysztof_galka_dgcs_sa)
Hello,
after installing Firebird 3.0.4 on macOS Mojave (10.14.3, 64-bit), when trying to call a UDF from file fbudf.dylib (using isql), for example trying to call ADDYEAR using the command
SELECT ADDYEAR(CAST('2019-08-13' AS TIMESTAMP), 1) FROM RDB$DATABASE;
the following mesage is shown:
Statement failed, SQLSTATE = 39000
invalid request BLR at offset 35
-function ADDYEAR is not defined
-module name or entrypoint could not be found
The UDFs from file ib_udf.dylib, for example STRLEN, seem to work correctly (when called using isql).
Firebird 3.0.4 was installed using the Firebird-3.0.4-33054-lipo-x86_64.pkg package. Function ADDYEAR was declared by copying and pasting its declaration from file fbudf.sql in isql. Similarly, function STRLEN was declared by copying and pasting its declaration from file ib_udf2.sql in isql. Running "SHOW FUNCTIONS;" in isql produces the following output:
Global functions
Function Name Invalid Dependency, Type
================================= ======= =====================================
ADDYEAR
STRLEN
After checking the file fbudf.dylib with otool - by running "otool -L fbudf.dylib" - the following output is produced:
fbudf.dylib:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)
/Users/pbeach/firebird304/gen/Release/firebird/lib/libfbclient.dylib.3.0.4 (compatibility version 3.0.4, current version 3.0.4)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.0)
Probably fbudf.dylib contains an incorrect link (the second path in the message above).
The UDFs from file fbudf.dylib seem to work correctly in Firebird 2.5.5. After running otool - again with "otool -L fbudf.dylib" - on fbudf.dylib from Firebird 2.5.5, the output is:
fbudf.dylib:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 104.1.0)
Kind regards,
Krzysztof Gałka
Commits: 46c797f
The text was updated successfully, but these errors were encountered: