Opened 7 weeks ago

Closed 7 weeks ago

Last modified 7 weeks ago

#70481 closed defect (fixed)

curl @8.9.1: again pulls in a dependency on a newer gcc compiler, which makes bootstrapping problematic

Reported by: barracuda156 Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.9.3
Keywords: powerpc Cc: Schamschula (Marius Schamschula), MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: curl, nghttp2

Description

Ryan, somehow it happened that we are back to the issue which was already fixed once:

36-25% ./port rdeps curl
The following ports are dependencies of curl @8.9.1_0+ssl:
  xz
    gettext
      ncurses
      gettext-tools-libs
        libiconv
          gperf
        libtextstyle
        gettext-runtime
  pkgconfig
  brotli
    cmake-bootstrap
  libidn2
    libunistring
      autoconf
        m4
      automake
      libtool
  libpsl
    python310
      bzip2
      expat
      libedit
      libffi
        dejagnu
          expect
            tcl
      openssl
        openssl3
          perl5
            perl5.34
              db48
              gdbm
                readline
          zlib
      sqlite3
      python_select-310
        python_select
      python3_select-310
        python3_select
  nghttp2
    gcc14
      texinfo
        help2man
          p5.34-locale-gettext
      cctools
        libunwind-headers
          xz-bootstrap
      gmp
      isl
      ld64
        ld64-97
          libmacho-headers
          llvm-3.4
            python27
              openssl11
              python2_select
            llvm_select
      libmpc
        mpfr
      zstd
        lz4
      libgcc
        libgcc14
      gcc_select
    legacy-support
  curl-ca-bundle
    unzip

curl again pulls in a dependency on C++11 compiler, which is a problem for older systems, where curl is needed for MacPorts to be properly functional. It is really unnecessary to force someone build gcc7 or gcc14 (or some modern clang), just to have a tree with bootstrapped curl to link the main MacPorts to.

Change History (12)

comment:1 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

Cc: Schamschula added
Keywords: powerpc added
Port: nghttp2 added
Summary: curl again pulls in a dependency on C++11 compiler, which makes bootstrapping problematiccurl again pulls in a dependency on a newer gcc compiler, which makes bootstrapping problematic

As you may remember, there is a long history of this issue.

First, it was requested that we enable http2 support by default in curl so I deleted the http2 variant and made http2 support always-on. This depended on nghttp2 which declared that it required C++14 which required newer compilers on older systems which presented problems for bootstrapping so I reinstated the http2 variant and enabled it only on systems that come with a C++14 compiler.

Later, a new version of nghttp2 increased its C++ requirement to C++20 so I changed curl to only enable http2 for systems with a C++20 compiler. Then I found that nghttp2 does not actually use C++ at all. The nghttp2 port was fixed to only require C++20 for the nghttp2-tools subport. We were then free to remove curl's http2 variant again and enable http2 for all systems again.

Then, last month, nghttp2 was changed to blacklist gcc 4.0 and 4.2. This—not a C++11 requirement—is why it wants to use a newer compiler on your old system. If you can figure out how to fix nghttp2 so that it can once again build using gcc 4.0 and 4.2, then the problem will go away.

comment:2 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

comment:3 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

Cc: MarcusCalhoun-Lopez added
Summary: curl again pulls in a dependency on a newer gcc compiler, which makes bootstrapping problematiccurl @8.9.1: again pulls in a dependency on a newer gcc compiler, which makes bootstrapping problematic

comment:4 Changed 7 weeks ago by barracuda156

Maybe make a +bootstrap variant for a minimal curl? And by default enable whatever desirable. I have no issues with C++20, I just want an option to bootstrap curl when needed without bells and whistles requiring me to waste 8 hours of compilation time (on a G4 it will be 24+ hours, perhaps).

comment:5 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

comment:6 in reply to:  4 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

Replying to barracuda156:

I have no issues with C++20

As I said, the nghttp2 library that curl uses does not require any version of C++.

I just want an option to bootstrap curl when needed without bells and whistles requiring me to waste 8 hours of compilation time (on a G4 it will be 24+ hours, perhaps).

I understand, and you should see from my prior actions on this issue detailed above that it is never my intention to cause that to happen. Anytime it happens, we simply need to investigate why it has happened and fix it in the appropriate way.

comment:7 in reply to:  4 ; Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

Replying to barracuda156:

Maybe make a +bootstrap variant for a minimal curl?

I'm not in favor of adding something like Ken's minimalcurl port nor adding a bootstrap variant to the curl port, however I can certainly move some of the functionality that has dependencies (back) to variants so that you can turn them off if your don't want them.

curl's always-on dependencies are currently: brotli, libidn2, libpsl, nghttp2, zlib, and zstd.

brotli, zlib, and zstd are compression algorithms that some web servers use to deliver uncompressed files to you quicker. brotli and zstd are newer compression algorithms that either compress better or decompress faster than older algorithms like zlib. But this compression would not be used when MacPorts downloads most distfiles (which are almost always already compressed) or packages (which always are), though it would still be relevant when using livecheck. I could move brotli and zstd to variants. zlib is so small and quick to build that I would probably keep zlib always on and not bother making a variant for that.

libidn2 lets curl use internationalized domain names—those containing non-ASCII characters. I've can't remember ever seeing a port use such a domain name to host its distfiles, and if it did, we mirror distfiles on our servers which don't have IDNs, so you could always get distfiles from there.

libpsl is the list of public suffixes aka top-level domains (TLDs). It is important for curl to have access to an accurate list of public suffixes so that it knows what cookies to allow and which ones to reject, but this isn't relevant when MacPorts uses curl since we don't tell curl to store cookies. curl recently started warning if you don't either have libpsl or explicitly disable psl support but we can certainly move it to a variant. Note that libpsl requires libidn2.

And nghttp2 is for HTTP/2 support which users have requested, but it's reasonable to move it back to a variant for those who really just want a minimal HTTP/1 client or for times when nghttp2 is feeling somewhat less C99 compatible than it claims.

comment:8 in reply to:  7 Changed 7 weeks ago by barracuda156

Replying to ryandesign:

This will be perfectly fine. zlib is certainly not a problem, brotli would be nice to have in a variant, since it needs cmake-bootstrap. (And it is indeed hardly justified to make a special bootstrap variant, when problematic components can be disabled directly via their variants.)

comment:9 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

In ab601bb9f7d20d00d9f00a309b3c55c5e21763c7/macports-ports (master):

curl: Move brotli/http2/idn/psl/zstd to variants

While some users want commonly-used features enabled in curl by default,
others wish to have the option to disable them to build a minimal curl
for MacPorts to link with on older systems. Therefore move brotli,
http2, idn, psl, and zstd features to variants which are on by default.

See: #55197
See: #61654
See: #65056
See: #70481

comment:10 in reply to:  7 Changed 7 weeks ago by kencu (Ken)

Replying to ryandesign:

I'm not in favor of adding something like Ken's minimalcurl port

Now that you've added the equivalent to minimalcurl via the negatable curl variants, there appears to be no longer a need for it, indeed.

comment:11 Changed 7 weeks ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed

In 281371cab680fc75c26df264b772d8aab5cd88f1/macports-ports (master):

nghttp2: Fix redefinition of typedef

Closes: #70481

comment:12 Changed 7 weeks ago by barracuda156

Thank you!

Note: See TracTickets for help on using tickets.