cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Compilation issue: linking to openssl with absolute path?

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Thu, 2 Oct 2014 00:21:10 +0200

On Wed, Oct 01, 2014 at 05:16:50PM -0400, Michael Mueller wrote:
> On Wed, Oct 1, 2014 at 1:07 PM, Romain Rivière <lecoyote_at_lecoyote.org> wrote:
> > As you can see from the second line, the path to Openssl is not the
> > system path: it is Optware's staging dir, and libopenssl is there:
> >
> > -rw-r--r-- 1 smokey smokey 391130 1 oct. 17:46
> > /home/smokey/projects/optware-git/syno-x86_64/staging/opt/lib/libssl.so.0.9.8
> >
> > It was compiled only minutes before libcurl.
>
> this sounds similar to what I am doing in Linux and SunOS.
>
> I had success on Linux:
>
> curl2/bin> ./curl --version
> curl 7.38.0 (x86_64-unknown-linux-gnu) libcurl/7.38.0 OpenSSL/1.0.1i zlib/1.2.3
> Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s
> rtsp smtp smtps telnet tftp
> Features: IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP
>
> using:
>
> SSLBASE="$HOME/wrk/openssl_build/i"
> SSL_INC_DIR="$SSLBASE/include"
> SSL_LIB_DIR="$SSLBASE/lib"
>
>
> echo $SSL_INC_DIR $SSL_LIB_DIR
> #exit
>
> CPPFLAGS="-I$SSL_INC_DIR" \
> LDFLAGS="-L$SSL_LIB_DIR -R$SSL_LIB_DIR" \
> ./configure \
> --with-ssl=$SSLBASE \
> --prefix=$HOME/curl2
>
> Not having as much success on SunOS. A similar config will not link properly.

Have you tried using pkg-config? That is the most reliable method. Just
set PKG_CONFIG_PATH to the right location for your OpenSSL installation's
openssl.pc file and it should just work. The various options for compiling
against OpenSSL are discussed in the INSTALL file, if you haven't already
seen that.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-10-02