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
---
Key: CORE-6122
URL: http://tracker.firebirdsql.org/browse/CORE-6122
Project: Firebird Core
Issue Type: Bug
Components: UDF
Affects Versions: 3.0.4
Environment: Firebird 3.0.4, macOS Mojave (10.14.3, 64-bit)
Reporter: Krzysztof Gałka (DGCS S.A.)
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
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel