Skip to content
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

Warning: the libcurl version jftui was compiled against will defer URL validation to the first network request #36

Closed
c4em opened this issue May 2, 2023 · 1 comment
Labels
bug (minor) Something isn't working as well as it should

Comments

@c4em
Copy link

c4em commented May 2, 2023

jftui/src/net.c

Line 800 in 38762b7

#if LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR >= 62

It seems like the preprocessor incorrectly determines the minor and major version of libcurl. I've throughway verified that the libcurl version is not 7.>=62 but rather 8.0.1

curl 8.0.1 (x86_64-pc-linux-gnu) libcurl/8.0.1 OpenSSL/3.0.8 zlib/1.2.13 c-ares/1.19.0 nghttp2/1.52.0
Release-Date: 2023-03-20
Protocols: dict file ftp ftps http https imap imaps mqtt pop3 pop3s rtsp smtp smtps tftp
Features: AsynchDNS HTTP2 HTTPS-proxy IPv6 Largefile libz NTLM SSL threadsafe TLS-SRP UnixSockets

Appending the following:

fprintf(stderr, "LIBCURL_VERSION_MAJOR: %d\nLIBCURL_VERSION_MINOR: %d\n", LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR);

to line 818 results in the following output:

LIBCURL_VERSION_MAJOR: 8
LIBCURL_VERSION_MINOR: 0

The version inside /usr/include/curl/curlver.h also seems correct

/* This is the version number of the libcurl package from which this header
   file origins: */
#define LIBCURL_VERSION "8.0.1"

/* The numeric version number is also available "in parts" by using these
   defines: */
#define LIBCURL_VERSION_MAJOR 8
#define LIBCURL_VERSION_MINOR 0
#define LIBCURL_VERSION_PATCH 1

Don't think this could be the cause but these are the use flags for my local installation of libcurl, just in case:

[ebuild   R    ] net-misc/curl-8.0.1::gentoo  USE="adns ftp http2 imap openssl pop3 progress-meter smtp ssl tftp -alt-svc -brotli -gnutls -gopher -hsts -idn -kerberos -ldap -mbedtls (-nghttp3) -nss -rtmp -rustls -samba -ssh -sslv3 -static-libs -telnet -test -verify-sig -websockets -zstd" ABI_X86="32 (64) (-x32)" CURL_SSL="openssl -gnutls -mbedtls -nss -rustls"

This seems quite fishy.

@Aanok
Copy link
Owner

Aanok commented May 3, 2023

Ah, that's because the major is 8 and not 7, so the preprocessor falls into the else branch. With an abundance of paranoia, I wrote that test against a future major release potentially breaking this specific behaviour (same goes for line 831 and probably a bunch of other places. I should really check all over). Now that we know that's not the case, I'll make it accept major version 8 too.

Thanks!

@Aanok Aanok added the bug (minor) Something isn't working as well as it should label May 3, 2023
@Aanok Aanok closed this as completed in 4f67ef0 Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug (minor) Something isn't working as well as it should
Projects
None yet
Development

No branches or pull requests

2 participants