curl-library
Re: Curl library problem - symbols not found
Date: Wed, 06 Aug 2008 08:48:55 -0400
Daniel,
I do see them with the -D flag.
The libmemcached UDF functions I wrote, I notice libmemcached has the
same issue (the libmemcached functions the UDF uses show up undefined)
-- but the UDF works.
There's really no way to specify how MySQL loads the UDFs. How would you
load libraries that depend on yet other dynamic libraries?
Is there something about libcurl that differs from libmemcached, I
wonder, that makes it so libmemcached functions work?
I wonder if simply compiling my UDFs statically might be the solution.
I really wanted to demo these UDFs (showing off both Curl and UDF API)
in the book, but since I'm on a deadline, I may have to look at another
example. Plus, it could prove to be an excellent project that people
find useful - http_get is the only one I have for now, but I'm thinking
of all the possibilities.
If anyone on this list would, could, be interested in trying these out
and seeing if I"m missing something (particularly with compile, autoconf
issues), I could gladly send the source.
Thanks!
Patrick
(Daniel Stenberg wrote:
> On Tue, 5 Aug 2008, Patrick Galbraith wrote:
>
>> mysql> CREATE FUNCTION http_get RETURNS STRING SONAME
>> "curl_functions_mysql.so";ERROR 1126 (HY000): Can't open shared
>> library 'curl_functions_mysql.so' (errno: 22
>> /usr/lib/curl_functions_mysql.so: undefined symbol: curl_easy_setopt)
>
> ...
>
>> patg_at_hanuman:~/wrox/code$ nm /usr/lib/libcurl.so
>> nm: /usr/lib/libcurl.so: no symbols
>
> It's a shared object file, you need to use -D, like "nm -D
> /usr/lib/libcurl.so"
>
> That command lists lots of curl_* symbols for me.
>
>> Am I missing something obvious here?
>
> I would say that it looks like your mysql line doesn't properly load
> the lib dependencies but only loads exactly the
> curl_functions_mysql.so file which obviously isn't good enough. But
> that's just a guess.
>
-- Satyam Eva Jayate - Truth Alone Triumphs Mundaka UpanishadReceived on 2008-08-06