MySql UDF using shared library won't load
Posted
by Jarrod
on Stack Overflow
See other posts from Stack Overflow
or by Jarrod
Published on 2010-06-01T16:20:58Z
Indexed on
2010/06/01
16:23 UTC
Read the original article
Hit count: 333
I am attempting to create a mysql UDF which will match a fingerprint using Digital Persona's free linux SDK library. I have written a trivial UDF as a learning experience which worked fine. However, when I added a dependency to Digital Persona's shared object I can no longer get MySql to load my UDF.
I added includes to DP's headers and compiled my UDF using:
gcc -fPIC -Wall -I/usr/src/mysql-5.0.45-linux-i686-icc-glibc23/include -shared -o dp_udf.so dp_udf.cc
I also tried adding the -static argument, but whenever I restart MySql, I get the error:
Can't open shared library 'dp_udf.so' (errno: 0 /usr/local/mysql/lib/plugin/dp_udf.so: undefined symbol: MC_verifyFeaturesEx)
MC_verifyFeaturesEx is a function defined "dpMatch.h" which I included, and is implemented in libdpfpapi.so which I have tried placing in the same location as my dp_udf.so and in /usr/lib.
Am I doing something wrong with my call to gcc (my C++ skills are rusty) or does MySql not allow UDFs to use additional shared objects?
© Stack Overflow or respective owner