UDF

Problems with the Linux version of XAMPP, questions, comments, and anything related.

UDF

Postby erelsgl » 20. May 2007 13:16

Hi,

I am trying to load the open-source MySQL-UDFs available here:
http://mysql-udf.sourceforge.net

It compiles OK...:
Code: Select all
> gcc -Wall -I /usr/include/mysql -I /usr/local/include -c udf_median.cc -o udf_median.o


...Links OK...:
Code: Select all
> ld -shared -o udf_median.so udf_median.o


...I copy it to the correct directory...:
Code: Select all
> cp udf_median.so /opt/lampp/lib


...Go into MySQL:...
Code: Select all
> /opt/lampp/bin/mysql -uroot


... But, when I try to load the function into MySQL:
Code: Select all
mysql> CREATE AGGREGATE FUNCTION median RETURNS REAL SONAME 'udf_median.so';


I get the following error:
Code: Select all
ERROR 1126 (HY000): Can't open shared library 'udf_median.so' (errno: 22 /opt/lampp/lib/udf_median.so: undefined symbol: _Znwj)


Does any of you have an idea, what I am doing wrong?
erelsgl
 
Posts: 7
Joined: 03. December 2006 10:00

Postby Wiedmann » 20. May 2007 13:31

You have compiled and linked this lib with/against your system MySQL and not the MySQL from XAMPP.

--> download the XAMPP devel package and compile this again with the XAMPP MySQL headers
Wiedmann
AF Moderator
 
Posts: 17106
Joined: 01. February 2004 12:38
Location: Stuttgart / Germany


Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 3 guests