cURL
Haxx ad
libcurl

Shopping cart software, Online file storage, Online photo storage, Hosted shopping cart, Contact management software, Email marketing software, Project management software, Issue tracking software, Online notepad, Web publishing software

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-library Archives

RE: undefined reference to `dlsym'

From: David Byron <dbyron_at_dbyron.com>
Date: Wed, 11 Nov 2009 11:28:48 -0800

On Sunday, November 8, 2009, Kamil Dudka wrote:

> I think we can remove the cross_compiling condition and
> always try to use pkg-config. If we force the
> PKG_CONFIG_LIBDIR, there is no chance to break the
> cross-compilation by taking system libs accidentally.

I agree. Done.

> > + export PKG_CONFIG_LIBDIR=$OPT_SSL/lib/pkgconfig
>
> Please split the exports into two lines.

Done.

> I can see yet another (hopefully last :-) ) possible
> problem. If we have working pkg-config, but the build of
> OpenSSL does not contain pkgconfig files, it fails with
> the following message:
>
> configure: error: OpenSSL libs and/or directories were not
> found where specified

Yes, I can duplicate this error by renaming openssl.pc to something else or
making it so the specific the PKG_CONFIG_LIBDIR doesn't exist.

> We should check whether at least the directory
> $OPT_SSL/lib/pkgconfig (or maybe better the openssl.pc
> inside) exists and eventually fall back to fixed paths
> approach (PKGTEST="no"). This should keep working what
> used to work before.

Just to be clear, you don't want to find the system openssl, but you want
configure to keep going with it's guess of what to use for SSL_LIBS,
SSL_LDFLAGS and SSL_CPPFLAGS as though pkg-config wasn't installed at all?
Doesn't the script do that already when it can't find openssl via
pkg-config? My configure output looks like this:

configure: set PKG_CONFIG_LIBDIR to
"/home/dbyron/src/ams/trunk/install/openssl/lib/pkgconfig"
checking for pkg-config... /usr/bin/pkg-config
checking for openssl options with pkg-config... no
checking for CRYPTO_lock in -lcrypto... yes
checking for SSL_connect in -lssl... no
checking for ssl with RSAglue/rsaref libs in use... checking for SSL_connect
in -lssl... (cached) no
no
configure: error: OpenSSL libs and/or directories were not found where
specified!

If pkg-config found openssl, we'd see the output from these three lines in
configure.ac:

      AC_MSG_NOTICE([pkg-config: SSL_LIBS: "$SSL_LIBS"])
      AC_MSG_NOTICE([pkg-config: SSL_LDFLAGS: "$SSL_LDFLAGS"])
      AC_MSG_NOTICE([pkg-config: SSL_CPPFLAGS: "$SSL_CPPFLAGS"])

which we don't see there. Maybe I should change the output so it's clear
what SSL_LDFLAGS and SSL_CPPFLAGS are even when pkg-config isn't used?

I could see improving the error message since in case the pkgconfig info is
missing, the trouble isn't that openssl wasn't found, it's that we don't
know how to compile/link against it properly. Is that what you're asking
for?

Here's an updated patch with the two easy changes done.

-DB

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html

Received on 2009-11-11

These mail archives are generated by hypermail.

donate! Page updated November 16, 2009.
web site info

File upload with ASP.NET