On 2007-04-06 16:37:09 +0200, Vincent Lefevre wrote:
On 2007-04-06 09:31:56 -0400, Daniel J. Luke wrote:
On Apr 5, 2007, at 8:12 PM, Vincent Lefevre wrote:
On 2007-04-05 16:49:38 -0400, Daniel J. Luke wrote:
The problem IIRC has to do with mismatched headers and library.
Yes, probably because the Makefile is incorrect.
It is? Do you have a patch to fix it?
The use of -L/usr/lib is incorrect as it is not consistent with the include search path. For some reason, CURL_CONFIG seems to be set to /usr/bin/curl-config, though "which curl-config" outputs /opt/local/bin/curl-config (that's a bug since it can lead to inconsistent paths), and there's a bug in /usr/bin/curl-config too:
prunille:~> /usr/bin/curl-config --libs -L/usr/lib -lcurl -lssl -lcrypto -lz ^^^^^^^^^^ This shouldn't be there.
Well, I think this is a more general problem, and pkg-config does the right thing by providing --libs-only-l and --libs-only-other. The rule is: * If you are linking with curl only, using the -L flags may be safe. * If you are linking with other libraries (e.g. readline), then the -L flags must not be used, because they may conflict with each other. The cleanest way to avoid such a conflict is to have a global setting, e.g. via LIBRARY_PATH and ditto for the include search path. So, the -L flags should be filtered out with sed 's/-L[^ ]*//g', and with --cflags, the -I flags should be filtered out with sed 's/-I[^ ]*//g'. The attach patch fixes the problem here. -- Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)