Subject Re: [ib-support] Disapointed (was: Writing UDF for Linux)
Author John Croft
You probably need to add a path to the /etc/ld.so.conf file. Then after
that run ldconfig. That should
take care of finding the library but you may also need to restart firebird.
- Croft

Milan Babuskov wrote:

>Hi all,
>
>I've been using Firebird and reading this list for several months
>now, and just can't believe that noone had any hint, idea or
>whatsoever regarding my question. I've seen questions with less data
>in them, and someone always answered at least with RTFM, but my post
>got zero replies so far.
>
>Cheers,
>Milan.
>
>P.S. Sorry for top posting, I just put the original post below if
>someone might be interested. I'd also like to add that I read the
>Dev. Guide, but didn't find anything that could resolve my problem.
>
>--- In ib-support@y..., "Milan Babuskov" <milanb@Y...> wrote:
>
>>I'm trying to learn how to write UDF funcions for Linux, but fail at
>>first steps. I read this document on ibphoenix:
>>
>>http://www.ibphoenix.com/main.nfs?a=ibphoenix&page=ibp_howto2
>>
>>And followed the instructions from the example. Compiling the file
>>went ok:
>>
>>gcc -c -O -fpic -fwritable-strings modulo.c
>>ld -G modulo.o -lm -lc -o modulo.so
>>cp modulo.so /opt/interbase/UDF
>>
>>I run RH7, and the Firebird is installed in /opt/interbase, which
>>has
>>UDF directory with all letters uppercase, so I copied the .so file
>>there. (Later I thought this may be the problem, and I copied
>>
>the .so
>
>>file to lib also, and also created udf directory (lowercase) and
>>
>made
>
>>one copy there also)
>>
>>Then I declared the udf with the query from article:
>>
>>declare external function f_Modulo
>>integer, integer
>>returns
>>integer by value
>>entry_point 'modulo' module_name 'modulo';
>>
>>commit;
>>
>>So far, so good. But when I try:
>>
>>select f_Modulo(3, 2) from rdb$database;
>>
>>I get:
>>
>>Invalid request BLR at offset 60
>>function F_MODULO is not defined
>>module name or entry point could not be found
>>
>>I also tried renaming file to modulo (without extension), but it
>>didn't work. What am I doing wrong here? Is there a way to check
>>
>where
>
>>the database looks for .so file?
>>
>>TIA
>>Milan.
>>
>
>
>
>To unsubscribe from this group, send an email to:
>ib-support-unsubscribe@egroups.com
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>