skip to Main Content

We have problems to use the FreeAdhocUDF library http://freeadhocudf.org with Firebird on Debian 11.

Some basic info:

  • Debian 11 64bit

  • uname -a says:

    Linux RMVM18 5.10.0-21-amd64 #1 SMP Debian 5.10.162-1 (2023-01-21)
    x86_64 GNU/Linux
    

Firebird was installed via apt, with these packages:

firebird3.0-common 3.0.7.33374.ds
firebird3.0-server 3.0.7.33374.ds
firebird3.0-server-core q3.0.7.33374.ds
firebird3.0-utils q3.0.7.33374.ds

and later directly using the installation packages from https://firebirdsql.org/en/firebird-3-0/#Linux_AMD64.

Finally, we tried the version 4 of Firebird, but with no luck either: https://github.com/FirebirdSQL/firebird/releases/download/v4.0.2/Firebird-4.0.2.2816-0.amd64.tar.gz

Firebird itself runs perfect in both versions. Only the usage of the FreeAdhocUDF fails.

We checked the dependencies of the lib with

ldd FreeAdhocUDF.so

successfully, result was:

cd.1 (0x00007fff557da000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fae5a559000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fae5a384000)
libib_util.so => /lib/x86_64-linux-gnu/libib_util.so (0x00007fae5a37f000)
libicudataFAU.so.44 => /lib/x86_64-linux-gnu/libicudataFAU.so.44
(0x00007fae5933f000)
libicui18nFAU.so.44 => /lib/x86_64-linux-gnu/libicui18nFAU.so.44
(0x00007fae58f65000)
libicuucFAU.so.44 => /lib/x86_64-linux-gnu/libicuucFAU.so.44
(0x00007fae58c12000)
libfbclient.so.2 => /lib/x86_64-linux-gnu/libfbclient.so.2
(0x00007fae58a6e000)
/lib64/ld-linux-x86-64.so.2 (0x00007fae5a8d3000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0
(0x00007fae58a4c000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fae58a46000)
libstdc++.so.6 => /lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fae58879000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fae5885f000)
libtommath.so.1 => /lib/x86_64-linux-gnu/libtommath.so.1
(0x00007fae5883d000)

Settings in firebird.conf:

UdfAccess = Restrict (we tried several options including Full)

No matter which of the variants described below we tried, the result was always this:

Select f_abs(-1) from rdb$database;
Unsuccessful execution caused by a system error that precludes
successful execution of subsequent statements.
Use of UDF/BLOB-filter module at location FreeAdhocUDF is not
allowed by server configuration.
-------------------------------------------------------------------------------------------------------------
SQLCODE: -902
SQLSTATE: 28000
GDSCODE: 335544831

What is wrong? What else can we try?

2

Answers


  1. Chosen as BEST ANSWER

    The problem was: We worked with symbolic links all over the place (the usual strategy), but finally we had to copy FreeAdhocUDF_FB2x_amd64.so explicitly to FreeAdhocUDF.so. That solved the problem.

    Further info: We used the directory /UDF/ as the location for the UDF and had UdfAccess = Restrict /UDF in the firebird.config (Firebird 4.)


  2. Error text is: "Use of UDF/BLOB-filter module at location FreeAdhocUDF is not allowed by server configuration". Failed dependency or missed library would give you "module name or entrypoint could not be found" error.

    Value "Restict" must be followed by list of directories where UDF libraries are allowed (and actually looked for). Simple "Restrict" is meaningless and most likely allow UDF libraries to reside only in Firebird root directory which is a bad idea.

    If you set UdfAccess to "full" you have to provide an absolute path to the library in "DECLARE FUNCTION" query.

    Remember that Firebird server (if configured as SuperServer or SuperClassic) must be restarted to reflect changes in configuration.

    For detailed investigation you can use dltrace utility to see where the library is tried to be loaded from.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search