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

library not supporting curl version 8.0.X or higher #84

Open
Laeri opened this issue Mar 22, 2023 · 1 comment · May be fixed by #85
Open

library not supporting curl version 8.0.X or higher #84

Laeri opened this issue Mar 22, 2023 · 1 comment · May be fixed by #85

Comments

@Laeri
Copy link

Laeri commented Mar 22, 2023

I get following error when trying to compile with the go-curl library:

          # github.com/andelf/go-curl
          In file included from ../../../go/pkg/mod/github.com/andelf/[email protected]/const.go:5:
          ./compat.h:423:2: error: #error your version is TOOOOOOOO low
            423 | #error your version is TOOOOOOOO low
                |  ^~~~~
          
          exit status 1

I have curl version 8.0.1 see output of the curl --version

curl 8.0.1 (x86_64-pc-linux-gnu) libcurl/8.0.1 OpenSSL/3.0.8 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.4 libpsl/0.21.2 (+libidn2/2.3.4) libssh2/1.10.0 nghttp2/1.52.0

The problem seems to be, that the file compat.h only supports version with major version 7.10 or higher.
As for as I have seen the 8.0.0 and 8.0.1 release should not break anything present in the 7.X+ release as the changelog is rather small. In addition, curl does not follow semver semantics so the upgrade to 8 is not necessarily breaking in this case.

I have a change in my fork right now on the compatgen.py file which I am testing right now. I had to modify it as rerunning it does not create a correct compat.h file as there is a fixed reference within it to curl versions 7.

Laeri added a commit to Laeri/go-curl that referenced this issue Mar 22, 2023
Modify `misc/compatgen.py` to emit compatability also with
version `8.0.0` or higher.
msva pushed a commit to msva/go-curl that referenced this issue Feb 11, 2024
Modify `misc/compatgen.py` to emit compatability also with
version `8.0.0` or higher.
@sprive
Copy link
Contributor

sprive commented Jul 5, 2024

This impacts me as well, and I solved it in a different way:

In compat.h, I changed the version TOO low check to:

#if (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR == 10 && LIBCURL_VERSION_PATCH < 1) || (LIBCURL_VERSION_MAJOR == 7 && LIBCURL_VERSION_MINOR < 10)
#error your version is TOOOOOOOO low

I'll also comment this on the PR. My fix is not going to be sufficient (likely that LIBCURL_VERSION_MAJOR needs to be added to every line in the file, especially given that compat.h pre-dates curl 8, but I don't want to make changes I can not test)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants