Subject RE: [firebird-support] UDF Meltdown
Author Helen Borrie
At 12:02 PM 15/07/2008, you wrote:
>Thanks for the reply!
>I am trying to get this to work on both Linux and Win32 environments. I am being very careful about the case, especially on Linux.
>I know the "full" setting in firebird.conf is a bad idea. Setting it was a move of desperation more than anything. Previously I had been working with default of "Restrict UDF".
>I keep ALL my UDF libraries in the UDF folder under the Firebird installation. On my win32 machine that is \FireBird_1_5\UDF and on Linux is /opt/firebird/UDF.
>After every change in the firebird.conf I have shutdown the databases and restarted the firebird service. I have even gone so far as to restart the whole server.
>On the Linux Server right now I am:
>1) Running
>2) I have firebird installed at /opt/firebird. The UDF that I am using is which is supposed to be compatible and tested.
>3) The permissions on the UDF directory is firebird:firebird and the permissions on the file are firebird:firebird as well.
>4) The firebird.conf file is set to default with Restrict UDF.
>5) I have restarted the firebird service as well.
>This is my declaration for the UDF function:
> CSTRING(16383)
> ENTRY_POINT 'fn_md5sum' MODULE_NAME '/opt/firebird/UDF/FreeAdhocUDF_fb2x';

The module_name argument is wrong for the Restrict config. The declaration should be nothing else except:
ENTRY_POINT 'fn_md5sum'
MODULE_NAME 'FreeAdhocUDF_fb2x';

>When attempting to commit the transaction creating the procedure I get: ".. BLR Offset 49 function MD5SUM is not defined module name or entrypoint could not be found"
>I have tried the MODULE_NAME with the full path, with and without the .so extension on the UDF.

Well, I can only say that *something* isn't right there. It works fine here... Exasperating as it surely is, I think you are stuck with a need to continue retracking your steps until you find that *one thing* that is messing this up for you.

I'd want to:

drop your UDF declarations
restart the FB server (with an offline setting if need be)
redeclare those UDFs as indicated above (they won't work under Restrict if you include path and/or suffix!)
test the functions using isql, first with a 'from rdb$database' type of query, then by executing your SPs
..... whatever else you're doing to test