Skip to content

build: regression LibreSSL native crypto lib with ngtcp2 1.15.0+ #20889

@mndrix

Description

@mndrix

I did this

autotools configure fails for LibreSSL with ngtcp2 1.15.0+ and curl 8.18.0 or 8.19.0.

Issue #18377 originally mentioned LibreSSL and ngtcp2 1.15.0+, resulting in a fix in commit 31e6798. That fix looks first for the new name libngtcp2_crypto_libressl and only falls back to the old name libngtcp2_crypto_quictls if the new name is not found. But commit 8db0e28 removed the "if not found" logic during an autotools tidy-up. Specifically, this hunk of that commit deletes the check on "$HAVE_LIBRESSL" != "1":

--- a/configure.ac
+++ b/configure.ac
@@ -3267,8 +3268,9 @@ if test "x$USE_NGTCP2" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "$HAVE_LIBRESSL"
   fi
 fi

-if test "x$USE_NGTCP2" = "x1" -a "x$OPENSSL_ENABLED" = "x1" -a "$HAVE_LIBRESSL" != "1" -a \
-   "x$OPENSSL_IS_BORINGSSL" != "x1" -a "x$OPENSSL_QUIC_API2" != "x1"; then
+if test "$USE_NGTCP2" = "1" && test "$OPENSSL_ENABLED" = "1" && test "$OPENSSL_IS_BORINGSSL" != "1" &&
+   test "$OPENSSL_QUIC_API2" != "1"; then
+
   dnl backup the pre-ngtcp2_crypto_quictls variables
   CLEANLDFLAGS="$LDFLAGS"
   CLEANLDFLAGSPC="$LDFLAGSPC"

The outward symptom is a configure failure like this one:

checking for libngtcp2_crypto_libressl options with pkg-config... found
configure: -l is -lngtcp2_crypto_libressl
configure: -I is -I/home/michael/conf/vendor/ngtcp2/stage/include -I/home/michael/conf/vendor/libressl/stage/include
configure: -L is -L/home/michael/conf/vendor/ngtcp2/stage/lib
checking for ngtcp2_crypto_recv_client_initial_cb in -lngtcp2_crypto_libressl... yes
checking for ngtcp2/ngtcp2_crypto.h... yes
configure: Added /home/michael/conf/vendor/ngtcp2/stage/lib to CURL_LIBRARY_PATH
checking for pkg-config... (cached) /home/michael/.local/bin/pkg-config
checking for libngtcp2_crypto_quictls options with pkg-config... no
configure: error: --with-ngtcp2 was specified but could not find ngtcp2_crypto_quictls pkg-config file.

I've attached a full config.log

curl-config.log

I expected the following

A build that detects libngtcp2_crypto_libressl then skips the check for ngtcp2_crypto_quictls

curl/libcurl version

curl 8.18.0 or 8.19.0

operating system

Linux x1g10 6.6.87.1-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Mon Apr 21 17:08:54 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions