List:General Discussion« Previous MessageNext Message »
From:Dan Nelson Date:November 18 2001 5:20am
Subject:Re: Fwd: Help? create function returns errno 0: unsupported file type
View as plain text  
In the last episode (Nov 17), Troy Bowman said:
> On Sat, 17 Nov 2001, Sinisa Milivojevic wrote:
> > > mysql> CREATE FUNCTION lookup RETURNS STRING SONAME
> "libudf_example.so";
> > > ERROR 1126: Can't open shared library 'libudf_example.so' (errno: 0
> /usr/lib/libudf_example.so: unsupported file type)
> >
> > Please check a type of the above ...so file with a file command.
> > Also check execute permissions.
> 
> File type is:
> /usr/lib/libudf_int_ip.so: ELF 32-bit LSB relocatable, Intel 80386, version 1
> (FreeBSD), not stripped
> 
> What should it be?  Any hints on how to get it right?

The file type should read "shared object" instead of "relocatable". 
The correct procedure for building a udf is in the manual, under
"Compiling and Installing User-definable Functions".  For FreeBSD, you
can pretty much use the example in the docs:

gcc -I /usr/local/include/mysql -shared -o udf_myfunc.so myfunc.c

If your file is c++, add "-felide-constructors -fno-implicit-templates
-fno-exceptions fno-rtti", just to match the rest of mysqld (not sure
if it's required or not).

-- 
	Dan Nelson
	dnelson@stripped
Thread
Fwd: Help? create function returns errno 0: unsupported file typeTroy Bowman17 Nov
  • Re: Fwd: Help? create function returns errno 0: unsupported file typeSinisa Milivojevic17 Nov
    • Re: Fwd: Help? create function returns errno 0: unsupported filetypeTroy Bowman18 Nov
      • Re: Fwd: Help? create function returns errno 0: unsupported file typeDan Nelson18 Nov