curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Building CURL with OpenSSL

From: Jason Proctor via curl-library <>
Date: Fri, 21 Feb 2020 15:00:54 -0800

On Fri, Feb 21, 2020 at 2:21 AM Jeffrey Walton via curl-library
<> wrote:

> If available, use -Wl,--enable-new-dtags. The new-dtags sets a RUNPATH
> (as opposed to a RPATH). RUNPATHs allow LD_LIBRARY_PATH overrides at
> runtime, RPATHS do not.
> $ readelf -d /usr/local/lib64/ | grep -E 'RPATH|RUNPATH'
> 0x000000000000001d (RUNPATH) Library runpath:
> [$ORIGIN/../lib64:/usr/local/lib64]
> Another useful trick is to use $ORIGIN so the binaries can be moved
> around on the filesystem. So LDFLAGS might look include this:
> -Wl,-R,'$$ORIGIN/../lib64' -Wl,-R,/usr/local/lib64 -Wl,--enable-new-dtags
> The double-$ escapes the dollar sign in the makefile. If you are
> manually building from the command line you only need a single-$.
> Jeff


Thanks so much for the help.

It turns out that in our environment we don't need most of the link
config stuff as we have that covered, and indeed I have my use case
building and working fine now.

Turns out that my problem, I *think*, was specifying relative
locations for the OpenSSL installation when configuring Curl. That
will either result in a configuration error (bad location specified
for SSL directory) or a build error (not being able to find openssl
includes, etc).

Thanks so much for the quality help received, much appreciated.

Received on 2020-02-22