Buy commercial curl support from WolfSSL. We help you work
out your issues, debug your libcurl applications, use the API, port to new
platforms, add new features and more. With a team lead by the curl founder
himself.
Re: Problem compiling curl-7.85.0
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Daniel Hallberg via curl-library <curl-library_at_lists.haxx.se>
Date: Wed, 5 Oct 2022 10:22:41 +0200
Den 2022-10-05 kl. 09:45, skrev Daniel Hallberg via curl-library:
> Den 2022-10-05 kl. 09:36, skrev Daniel Stenberg:
>> On Wed, 5 Oct 2022, Daniel Hallberg via curl-library wrote:
>>
>>> After some more experimenting I've figured out that the issue seems
>>> introduced in 7.79.0 (I can compile 7.78.0, but not 7.79.0)
>>
>> Countless people have built curl fine with configure since then,
>> including CI jobs for every commit and PR since. I can't figure out
>> what makes your case special!
> Me neither. It's a kind of freshly installed machine with only apt-get
> packages and no manual tweaks.
>
>>
>> At around line 2730 in configure.ac it checks if the --with-ngtcp2
>> option is used, and in your case it isn't and then it shouldn't
>> attempt to use it nor enable HTTP3 in the build.
>>
>> As I cannot reproduce this on my or any other system, I have a hard
>> time to debug this myself.
>>
>
> In configure.ac I noticed there was a configure option
> "--without-ngtcp2", and if I specify that "HTTP3" won't show up in the
> features list, and the compilation runs just fine.
I think it looks like some process in the 7.78.0 "configure" crash while
trying to check for some tcp2 stuff, resulting in that it doesn't get
set(?):
configure:29256: checking for libngtcp2 options with pkg-config
configure:29270: result: found
configure:29284: -l is -lngtcp2
configure:29293: -I is
configure:29303: -L is
configure:29313: checking for ngtcp2_conn_client_new in -lngtcp2
configure:29335: gcc -o conftest -Werror-implicit-function-declaration
-O2 -Wno-system-headers -Wenum-conversion
-DOPENSSL_SUPPRESS_DEPRECATED conftest.c -lngtcp2 -lngtcp2
-lnghttp2 -lssl -lcrypto -lssl -lcrypto -lz >&5
/usr/bin/ld: /tmp/ccDUOINx.o: in function `main':
conftest.c:(.text.startup+0xb): undefined reference to
`ngtcp2_conn_client_new'
collect2: error: ld returned 1 exit status
configure:29335: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "curl"
| #define PACKAGE_TARNAME "curl"
| #define PACKAGE_VERSION "-"
| #define PACKAGE_STRING "curl -"
| #define PACKAGE_BUGREPORT "a suitable curl mailing list:
https://curl.se/mail/"
| #define PACKAGE_URL ""
| #define PACKAGE "curl"
| #define VERSION "-"
| #define OS "x86_64-pc-linux-gnu"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_LDAP_SSL 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_CLOCK_GETTIME_MONOTONIC 1
| #define HAVE_ZLIB_H 1
| #define HAVE_LIBZ 1
| #define CURL_DISABLE_LDAP 1
| #define CURL_DISABLE_LDAPS 1
| #define ENABLE_IPV6 1
| #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
| #define HAVE_WRITABLE_ARGV 1
| #define HAVE_LIBSSL 1
| #define HAVE_OPENSSL_X509_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_RSA_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_CRYPTO_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_PEM_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_SSL_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_ERR_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_VERSION 1
| #define HAVE_OPENSSL3 1
| #define RANDOM_FILE "/dev/urandom"
| #define HAVE_OPENSSL_SRP 1
| #define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
| #define HAVE_NGHTTP2_NGHTTP2_H 1
| #define USE_NGHTTP2 1
| /* end confdefs.h. */
|
|
| #ifdef __cplusplus
| extern "C"
| #endif
| char ngtcp2_conn_client_new ();
| int main (void)
| {
| return ngtcp2_conn_client_new ();
| ;
| return 0;
| }
configure:29344: result: no
configure:30515: checking for pkg-config
configure:30546: result: /usr/bin/pkg-config
And that it doesn't crash in 7.85.0:
configure:30481: checking for libngtcp2 options with pkg-config
configure:30495: result: found
configure:30509: -l is -lngtcp2
configure:30518: -I is
configure:30528: -L is
configure:30538: checking for ngtcp2_conn_client_new_versioned in -lngtcp2
configure:30561: gcc -o conftest -Werror-implicit-function-declaration
-O2 -Wno-system-headers -DOPENSSL_SUPPRESS_DEPRECATED conftest.c
-lngtcp2 -lngtcp2 -lnghttp2 -lssl -lcrypto -lssl -lcrypto -lz >&5
configure:30561: $? = 0
configure:30571: result: yes
configure:30578: checking for ngtcp2/ngtcp2.h
configure:30578: gcc -c -Werror-implicit-function-declaration -O2
-Wno-system-headers -DOPENSSL_SUPPRESS_DEPRECATED conftest.c >&5
configure:30578: $? = 0
configure:30578: result: yes
configure:30590: Added to CURL_LIBRARY_PATH
configure:30674: checking for pkg-config
configure:30710: result: /usr/bin/pkg-config
..But the question remains why ngtcp2 gets included even though it's not
specified at the command line. Maybe gets added by default for some
reason (in my case) if some related stuff is found by the configure script?
Date: Wed, 5 Oct 2022 10:22:41 +0200
Den 2022-10-05 kl. 09:45, skrev Daniel Hallberg via curl-library:
> Den 2022-10-05 kl. 09:36, skrev Daniel Stenberg:
>> On Wed, 5 Oct 2022, Daniel Hallberg via curl-library wrote:
>>
>>> After some more experimenting I've figured out that the issue seems
>>> introduced in 7.79.0 (I can compile 7.78.0, but not 7.79.0)
>>
>> Countless people have built curl fine with configure since then,
>> including CI jobs for every commit and PR since. I can't figure out
>> what makes your case special!
> Me neither. It's a kind of freshly installed machine with only apt-get
> packages and no manual tweaks.
>
>>
>> At around line 2730 in configure.ac it checks if the --with-ngtcp2
>> option is used, and in your case it isn't and then it shouldn't
>> attempt to use it nor enable HTTP3 in the build.
>>
>> As I cannot reproduce this on my or any other system, I have a hard
>> time to debug this myself.
>>
>
> In configure.ac I noticed there was a configure option
> "--without-ngtcp2", and if I specify that "HTTP3" won't show up in the
> features list, and the compilation runs just fine.
I think it looks like some process in the 7.78.0 "configure" crash while
trying to check for some tcp2 stuff, resulting in that it doesn't get
set(?):
configure:29256: checking for libngtcp2 options with pkg-config
configure:29270: result: found
configure:29284: -l is -lngtcp2
configure:29293: -I is
configure:29303: -L is
configure:29313: checking for ngtcp2_conn_client_new in -lngtcp2
configure:29335: gcc -o conftest -Werror-implicit-function-declaration
-O2 -Wno-system-headers -Wenum-conversion
-DOPENSSL_SUPPRESS_DEPRECATED conftest.c -lngtcp2 -lngtcp2
-lnghttp2 -lssl -lcrypto -lssl -lcrypto -lz >&5
/usr/bin/ld: /tmp/ccDUOINx.o: in function `main':
conftest.c:(.text.startup+0xb): undefined reference to
`ngtcp2_conn_client_new'
collect2: error: ld returned 1 exit status
configure:29335: $? = 1
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "curl"
| #define PACKAGE_TARNAME "curl"
| #define PACKAGE_VERSION "-"
| #define PACKAGE_STRING "curl -"
| #define PACKAGE_BUGREPORT "a suitable curl mailing list:
https://curl.se/mail/"
| #define PACKAGE_URL ""
| #define PACKAGE "curl"
| #define VERSION "-"
| #define OS "x86_64-pc-linux-gnu"
| #define STDC_HEADERS 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_STAT_H 1
| #define HAVE_STDLIB_H 1
| #define HAVE_STRING_H 1
| #define HAVE_MEMORY_H 1
| #define HAVE_STRINGS_H 1
| #define HAVE_INTTYPES_H 1
| #define HAVE_STDINT_H 1
| #define HAVE_UNISTD_H 1
| #define HAVE_DLFCN_H 1
| #define LT_OBJDIR ".libs/"
| #define HAVE_LDAP_SSL 1
| #define HAVE_SYS_TYPES_H 1
| #define HAVE_SYS_TIME_H 1
| #define HAVE_CLOCK_GETTIME_MONOTONIC 1
| #define HAVE_ZLIB_H 1
| #define HAVE_LIBZ 1
| #define CURL_DISABLE_LDAP 1
| #define CURL_DISABLE_LDAPS 1
| #define ENABLE_IPV6 1
| #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
| #define HAVE_WRITABLE_ARGV 1
| #define HAVE_LIBSSL 1
| #define HAVE_OPENSSL_X509_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_RSA_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_CRYPTO_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_PEM_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_SSL_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_ERR_H 1
| #define USE_OPENSSL 1
| #define HAVE_OPENSSL_VERSION 1
| #define HAVE_OPENSSL3 1
| #define RANDOM_FILE "/dev/urandom"
| #define HAVE_OPENSSL_SRP 1
| #define CURL_CA_BUNDLE "/etc/ssl/certs/ca-certificates.crt"
| #define HAVE_NGHTTP2_NGHTTP2_H 1
| #define USE_NGHTTP2 1
| /* end confdefs.h. */
|
|
| #ifdef __cplusplus
| extern "C"
| #endif
| char ngtcp2_conn_client_new ();
| int main (void)
| {
| return ngtcp2_conn_client_new ();
| ;
| return 0;
| }
configure:29344: result: no
configure:30515: checking for pkg-config
configure:30546: result: /usr/bin/pkg-config
And that it doesn't crash in 7.85.0:
configure:30481: checking for libngtcp2 options with pkg-config
configure:30495: result: found
configure:30509: -l is -lngtcp2
configure:30518: -I is
configure:30528: -L is
configure:30538: checking for ngtcp2_conn_client_new_versioned in -lngtcp2
configure:30561: gcc -o conftest -Werror-implicit-function-declaration
-O2 -Wno-system-headers -DOPENSSL_SUPPRESS_DEPRECATED conftest.c
-lngtcp2 -lngtcp2 -lnghttp2 -lssl -lcrypto -lssl -lcrypto -lz >&5
configure:30561: $? = 0
configure:30571: result: yes
configure:30578: checking for ngtcp2/ngtcp2.h
configure:30578: gcc -c -Werror-implicit-function-declaration -O2
-Wno-system-headers -DOPENSSL_SUPPRESS_DEPRECATED conftest.c >&5
configure:30578: $? = 0
configure:30578: result: yes
configure:30590: Added to CURL_LIBRARY_PATH
configure:30674: checking for pkg-config
configure:30710: result: /usr/bin/pkg-config
..But the question remains why ngtcp2 gets included even though it's not
specified at the command line. Maybe gets added by default for some
reason (in my case) if some related stuff is found by the configure script?
-- Unsubscribe: https://lists.haxx.se/listinfo/curl-library Etiquette: https://curl.se/mail/etiquette.htmlReceived on 2022-10-05