-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error building curl with openssl via pkgconfig #2848
Comments
If you look in your In the latter case, the error message it gets back says:
This seems to happen because the |
Maybe a patch like this? diff --git a/configure.ac b/configure.ac
index 22280a5e9..b20ce13de 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1648,11 +1648,14 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
AC_CHECK_LIB(crypto, HMAC_Update,[
HAVECRYPTO="yes"
LIBS="-lcrypto $LIBS"
],[
LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
- CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
+ if test "$PKGCONFIG" != "yes" ; then
+ # only set this if pkg-config wasn't used
+ CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
+ fi
AC_CHECK_LIB(crypto, HMAC_Init_ex,[
HAVECRYPTO="yes"
LIBS="-lcrypto $LIBS"], [
dnl still no, but what about with -ldl? |
I'd change it to: diff --git a/configure.ac b/configure.ac
index 22280a5e9..b20ce13de 100755
--- a/configure.ac
+++ b/configure.ac
@@ -1648,11 +1648,14 @@ if test -z "$ssl_backends" -o "x$OPT_SSL" != xno &&
AC_CHECK_LIB(crypto, HMAC_Update,[
HAVECRYPTO="yes"
LIBS="-lcrypto $LIBS"
],[
LDFLAGS="$CLEANLDFLAGS -L$LIB_OPENSSL"
- CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
+ if test "$PKGCONFIG" = "no" ; then
+ # only set this if pkg-config wasn't used
+ CPPFLAGS="$CLEANCPPFLAGS -I$PREFIX_OPENSSL/include/openssl -I$PREFIX_OPENSSL/include"
+ fi
AC_CHECK_LIB(crypto, HMAC_Init_ex,[
HAVECRYPTO="yes"
LIBS="-lcrypto $LIBS"], [
dnl still no, but what about with -ldl? because The aforementioned patch works. |
Excellent! |
... by making sure it uses the -I provided by pkg-config! Reported-by: pszemus on github Fixes #2848
I did this
PKG_CONFIG_PATH=/opt/WP/common.libs/lib/pkgconfig ./configure --with-ssl
I expected the following
Curl will be configured to build with SSL support.
OpenSSL is installed in custom path.
what happened
configure
script does not report SSL (HTTPS, FTPS, ...) support:OpenSSL static libraries are installed in custom path via
./config --prefix=/opt/WP/common.libs --openssldir=/opt/WP/common.libs no-shared -fPIC
pkgconfig
files are also installed in/opt/WP/common.libs/lib/pkgconfig/libssl.pc
:curl
's config.log shows missing 'pthread':curl/libcurl version
curl-7.61.0
operating system
openssl-1.1.0h
CentOS Linux release 7.5.1804 (Core)
The text was updated successfully, but these errors were encountered: