cURL / Mailing Lists / curl-users / Single Mail


Compiling curl on Solaris - mismatching openssl header and library when executing configure script

From: Poggenpohl, Daniel <>
Date: Wed, 6 Apr 2016 14:09:04 +0000

Hello everyone,

I'm trying to compile curl on my Solaris 11.3 server.
My server has a default OpenSSL installation (1.0.1q) and a compiled 1.0.2g under /somedir/openssl/1.0.2g.
I executed configure with:
PKG_CONFIG_PATH=/somedir/openssl/1.0.2g/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --prefix=/somedir/curl/7.48.0
and get a warning:

checking for OpenSSL library version... 1.0.1
checking for OpenSSL library version... 1.0.2
checking for OpenSSL headers and library versions matching... no
configure: WARNING: OpenSSL headers and library versions do not match.

When i execute configure with
CPPFLAGS=-I/somedir/openssl/1.0.2g/include:$CPPFLAGS PKG_CONFIG_PATH=/somedir/openssl/1.0.2g/lib/pkgconfig:$PKG_CONFIG_PATH ./configure --prefix=/somedir/curl/7.48.0
The same thing happens.

How can I tell the configure script where to search for the correct 1.0.2g headers?

Looking into the configure script:
My set CPPFLAGS is overridden by other flags which are empty at runtime.

> # CPPPFLAGS comes from CURL_CPP_P

Then a header is generated

> cat confdefs.h - <<_ACEOF >conftest.$ac_ext

which includes openssl/crypto.h

# include <openssl/crypto.h>
# else
# include <crypto.h>
# endif


and "gcc -E" is executed on some conftest.c which probably replaces the macros:

> tmp_exp=`eval "$ac_cpp conftest.$ac_ext" 2>/dev/null | \

After that the OPENSSL_VERSION_NUMBER is set to the old 1.0.1 OpenSSL, probably because the "ac_cpp" variable uses the now empty "CPPFLAGS" and so doesn't include my own include dir.

Is that how the header<->library version compare is intended?

Daniel Poggenpohl

Dipl.-Inf. Daniel Poggenpohl
FernUniversität in Hagen
Zentrum für Medien und IT (ZMI)
Universitätsstraße 21
58084 Hagen
AVZ, Raum A107
Tel.: +49 (2331) 987-2801
Fax: +49 (2331) 987-2720

List admin:
Received on 2016-04-06