You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! A user's bug report to MacPorts revealed that libcurl is linking with libnghttp3 even when http3 support is not enabled and this seemed incorrect to me.
We use the autotools build system. If ngtcp2 and nghttp3 are both installed and curl is configured with no flags relating to ngtcp2 or nghttp3, then I expected that http3 support would not be enabled and libnghttp3 would not be used. Output from configure is:
checking for libnghttp3 options with pkg-config... found
configure: -l is -lnghttp3
configure: -I is
configure: -L is -L/opt/local/lib
checking for nghttp3_conn_client_new_versioned in -lnghttp3... yes
checking for nghttp3/nghttp3.h... yes
…
LIBS: -lnghttp3 -lnghttp2 -lidn2 -lpsl -lssl -lcrypto -lssl -lcrypto -lzstd -lzstd -lbrotlidec -lbrotlidec -lz
…
HTTP3: no (--with-ngtcp2 --with-nghttp3, --with-quiche, --with-openssl-quic, --with-msh3)
So the first line correctly omits ngtcp2/1.2.0 nghttp3/1.1.0 from the list of libraries used and the last line correctly omits HTTP3 from the list of features however libcurl is still linked with libnghttp3 (but not with libngtcp2):
% otool -L /opt/local/lib/libcurl.dylib
/opt/local/lib/libcurl.dylib:
/opt/local/lib/libcurl.4.dylib (compatibility version 13.0.0, current version 13.0.0)
/opt/local/lib/libnghttp3.9.dylib (compatibility version 11.0.0, current version 11.0.0)
/opt/local/lib/libnghttp2.14.dylib (compatibility version 41.0.0, current version 41.0.0)
/opt/local/lib/libidn2.0.dylib (compatibility version 5.0.0, current version 5.0.0)
/opt/local/lib/libpsl.5.dylib (compatibility version 9.0.0, current version 9.4.0)
/opt/local/libexec/openssl3/lib/libssl.3.dylib (compatibility version 3.0.0, current version 3.0.0)
/opt/local/libexec/openssl3/lib/libcrypto.3.dylib (compatibility version 3.0.0, current version 3.0.0)
/opt/local/lib/libzstd.1.dylib (compatibility version 1.0.0, current version 1.5.5)
/opt/local/lib/libbrotlidec.1.dylib (compatibility version 1.0.0, current version 1.1.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.3.1)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1856.105.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 1141.1.0)
/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration (compatibility version 1.0.0, current version 1163.60.3)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1311.0.0)
It correctly links with libngtcp2 and libnghttp3 and enables http3 support if I use the --with-ngtcp2 and --with-nghttp3 configure flags, and it correctly does not link with libngtcp2 or libnghttp3 if I use the --without-ngtcp2 and --without-nghttp3 configure flags.
I expected the following
I expected the configure script not to check for libnghttp3 and for libcurl not to be linked with libnghttp3 unless http3 support was enabled with the --with-ngtcp2 and --with-nghttp3 configure flags.
curl/libcurl version
curl 8.6.0
operating system
macOS 12.7.2
The text was updated successfully, but these errors were encountered:
It happens because it first finds an OpenSSL version with QUIC functionality, which is then a signal to check for nghttp3 as well. This is for building the experimental HTTP/3 support using the OpenSSL QUIC stack.
But yes, it should not be done implied like this...
Update: hm, no. I talked too soon. I don't know why this happens
I did this
Hello! A user's bug report to MacPorts revealed that libcurl is linking with libnghttp3 even when http3 support is not enabled and this seemed incorrect to me.
We use the autotools build system. If ngtcp2 and nghttp3 are both installed and curl is configured with no flags relating to ngtcp2 or nghttp3, then I expected that http3 support would not be enabled and libnghttp3 would not be used. Output from configure is:
After installation curl reports:
So the first line correctly omits
ngtcp2/1.2.0 nghttp3/1.1.0
from the list of libraries used and the last line correctly omitsHTTP3
from the list of features however libcurl is still linked with libnghttp3 (but not with libngtcp2):It correctly links with libngtcp2 and libnghttp3 and enables http3 support if I use the
--with-ngtcp2
and--with-nghttp3
configure flags, and it correctly does not link with libngtcp2 or libnghttp3 if I use the--without-ngtcp2
and--without-nghttp3
configure flags.I expected the following
I expected the configure script not to check for libnghttp3 and for libcurl not to be linked with libnghttp3 unless http3 support was enabled with the
--with-ngtcp2
and--with-nghttp3
configure flags.curl/libcurl version
curl 8.6.0
operating system
macOS 12.7.2
The text was updated successfully, but these errors were encountered: