cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Link problem: SunOS 5.10, libcurl 7.38.0, openssl 1.0.1i

From: Michael Mueller <abaci.mjm_at_gmail.com>
Date: Fri, 3 Oct 2014 09:19:32 -0400

On Fri, Oct 3, 2014 at 1:11 AM, Dan Fandrich <dan_at_coneharvesters.com> wrote:
> On Thu, Oct 02, 2014 at 02:28:54PM -0400, Michael Mueller wrote:
>> Summary of problem : libcurl config.log shows openssl 1.0.1i is used;
>> binaries produced by make and make install are using much older
>> openssl libraries
>
> The curl build compiles against the special OpenSSL library you provided
> at compile time, but your system doesn't know about that library so it provides
> the default system OpenSSL library at run-time. You need to either provide the
> dynamic linker information about the path of the desired library at run-time
> (probably using LD_LIBRARY_PATH), change the build to hard-code the library
> path you want (probably not what you want since the library is in a /home
> directory), or statically link against OpenSSL (making security upgrades more
> difficult).

I thought using LD_LIBRARY_PATH and -L would have done the trick at
compile time on SunOS. Turns out the -rpath option was needed to use
something other than the system default version of openssl libs. The
linker used a specific version of libssl.so and libcrypto.so. Before I
used -rpath, the 0.9.7 version was being specified. I suppose this is
why LD_LIBRARY_PATH being set to the new revision of openssl libs had
no effect (because 0.9.7 versions did not exist in that given path).
After the -rpath was added, the spec changed to 1.0.0. Then moving
the new openssl libs and changing LD_LIBRARY_PATH to reflect the move
and having curl use the new and repositioned openssl libs succeeded.

Would it be useful/possible for the .configure tool to throw an error
when there is a mismatch between the OpenSSL version from it's header
files and the version of the libs used by the linker? I didn't notice
the mismatch until I specifically looked for conformance using "curl
--version" and "ldd curl".

Thanks
Mike
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-10-03