cURL / Mailing Lists / curl-library / Single Mail


Re: One or more libs available at link-time are not available run-time

From: Nick Zitzmann <>
Date: Mon, 20 Aug 2012 13:25:49 -0600

On Aug 20, 2012, at 12:17 PM, Jeremy Hughes <> wrote:

> I thought from a previous discussion on this list that darwinssl doesn't support ssh. Jonas Schnelli (23/7/12, 21:38) listed one of the cons as "no SFTP (libssh) support without openssl"
> The reason we're building with libssh2 is that we want to support SFTP.

You don't need to use the same crypto library for libssh2 as you are using in libcurl. So darwinssl doesn't cancel out support for SSH; it just doesn't completely replace OpenSSL if you want SSH because Apple's crypto libraries are missing a few features that are present in libcrypto. I was porting libssh2 to Apple's crypto libraries, but got stuck on Apple's lack of a bignum replacement for cryptography.

>>> Are you using a different set of configure options?
>> No. Are you installing libssh2 after building it?
> We're not installing it. I thought the --with-libssh2=[directory] option was supposed to allow libcurl to be built with a static library of libssh2?

I thought the =directory option was there if you had it installed in a place other than /usr or /usr/local.

> This used to work, as I've said, but it stopped working sometime between 7.21.1 and 7.27.0.
> I'm slightly puzzled by your question about installing libssh2, because we're developing an application that doesn't require users to have libssh2 installed on their machines. Maybe you're suggesting that it helps to have it installed on development machines?

Yes. We use libssh2 and libcurl in our products, and I solved this problem by building both libraries as static libraries only using the configure option --disable-shared, and only "installing" libssh2 so I could build libcurl. Then I just added the two static libraries I built into the final project, along with its dynamic library dependencies (libz, LDAP, etc.). That worked fine for me. libssh2 can even be built as a 32/64-bit universal binary with no problems.

Nick Zitzmann

List admin:
Received on 2012-08-20