Re: Curl library problem - symbols not found
Date: Thu, 07 Aug 2008 01:21:16 -0400
Patrick, and helpful curl development folk (this is a great mailing
Thank you very much! I was using a little too much cut-n-paste from my
other UDF and not paying attention to the compile output.
Now I have it working on a different ubuntu box, and need to play with
the output, which is garbled.
I used this example to do storing the output of curl_easy_perform()
All I really want is a char array of the site I fetch. Is there a better
way to do this?
Patrick MONNERAT wrote:
> On Wed, 2008-08-06 at 10:39 -0400, Patrick Galbraith wrote:
>>>> 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.
> I think I've found it:
> 1) Your configure.ac file uses macro LIBCURL_CHECK_CONFIG from included
> file config/ac_curl.m4.This macro defines libcurl cflags in variable
> LIBCURL_CPPFLAGS and libs in LIBCURL (see header comment in this file).
> 2) Still in configure.ac, you define with AC_SUBST variables
> CURL_CONFIG, CURL_INC and CURL_LIBS that are never initialized.
> 3) In src/Makefile.am, you use CURL_INC (uninitialized, thus empty
> string) as cflags (in INCLUDES definition) and as additional libraries
> (?) in curl_functions_mysql_la_LIBADD definition --> both have NULL
> EFFECT !!!
> My solution: get rid of CURL_CONFIG, CURL_INC and CURL_LIBS (suppress
> AC_SUBSTs), replace their references by the appropriate symbol according
> to macro LIBCURL_CHECK_CONFIG. That is (in src/Makefile.am):
> INCLUDES = ... $(LIBCURL_CPPFLAGS) ...
> curl_functions_mysql_la_LIBADD = ... $(LIBCURL)
> I did not check if there are other references like that in other files:
> I let you do it. But the fix listed above produces a shared library that
> has no undefined symbol.
> Little trick: if you examine the link command listed at "make" time, you
> would have noticed that "-lcurl" was not listed... thus not linked !
> Good luck and success for the follow-up.
-- Satyam Eva Jayate - Truth Alone Triumphs Mundaka UpanishadReceived on 2008-08-07