cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Curl library problem - symbols not found

From: Patrick Galbraith <patg_at_patg.net>
Date: Tue, 05 Aug 2008 13:51:59 -0400

Wei Weng wrote:
> Patrick Galbraith wrote:
>> Hi all,
>>
>> I'm working on a book about MySQL/Perl, etc, and writing a
>> demonstration of how to write a MySQL UDF. I wanted to use libcurl
>> and write a simple function called http_get(). I have the program
>> compile and everything looks good, but when I run:
>>
>> 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)
>>
>> When I run nm on my library, I get:
>>
>> U curl_easy_cleanup
>> U curl_easy_init
>> U curl_easy_perform
>> U curl_easy_setopt
>> U curl_global_init
>>
>
> Patrick:
>
> What does "ldd -r curl_functions_mysql.so" tell you?
>
> Thanks
> Wei
Wei,

root_at_hanuman:~# ldd -r /usr/lib/curl_functions_mysql.so
undefined symbol: curl_easy_setopt (/usr/lib/curl_functions_mysql.so)
undefined symbol: curl_easy_init (/usr/lib/curl_functions_mysql.so)
undefined symbol: curl_easy_perform (/usr/lib/curl_functions_mysql.so)
undefined symbol: curl_easy_cleanup (/usr/lib/curl_functions_mysql.so)
undefined symbol: curl_global_init (/usr/lib/curl_functions_mysql.so)
    libc.so.6 => /lib/libc.so.6 (0x00002ba2c971d000)
    /lib64/ld-linux-x86-64.so.2 (0x0000555555554000)

I am using the correct flags from "curl-config", as in my Makefile
(which autoconf creates)

LIBCURL = -lcurl -lgssapi_krb5

--Patrick

-- 
Satyam Eva Jayate - Truth Alone Triumphs
Mundaka Upanishad
Received on 2008-08-05