• Bug#1103938: curl FTCBFS: intentionally broken for cross compilation

    From Helmut Grohne@21:1/5 to All on Wed Apr 23 07:40:01 2025
    Source: curl
    Version: 8.13.0-1
    Tags: patch upstream
    Severity: important
    Justification: architecture cross bootstrap regression
    User: helmutg@debian.org
    Usertags: rebootstrap
    User: debian-cross@lists.debian.org
    Usertags: ftcbfs

    Hi,

    curl intentionally broke cross compilation in its last upstream release.
    It stopped installing fish/zsh completion files, because that's
    impossible for cross compilation. Turns out, that's factually wrong and skipping the files makes the build fail. I'm attaching a revert for your convenience. Please include it at least in Debian even if it ends up not
    being upstreamable.

    Helmut

    --- curl-8.13.0.orig/scripts/CMakeLists.txt
    +++ curl-8.13.0/scripts/CMakeLists.txt
    @@ -51,33 +51,29 @@
    endif()

    if(NOT CURL_DISABLE_INSTALL)
    - if(NOT CMAKE_CROSSCOMPILING)
    - if(NOT CURL_COMPLETION_FISH_DIR)
    - find_package(PkgConfig QUIET)
    - pkg_get_variable(CURL_COMPLETION_FISH_DIR "fish" "completionsdir")
    - if(NOT _pkg_fish_completionsdir)
    - include(GNUInstallDirs)
    - if(CMAKE_INSTALL_DATAROOTDIR)
    - set(CURL_COMPLETION_FISH_DIR "${CMAKE_INSTALL_DATAROOTDIR}/fish/vendor_completions.d")
    - endif()
    - endif()
    - endif()
    - if(NOT CURL_COMPLETION_ZSH_DIR)
    + if(NOT CURL_COMPLETION_FISH_DIR)
    + find_package(PkgConfig QUIET)
    + pkg_get_variable(CURL_COMPLETION_FISH_DIR "fish" "completionsdir")
    + if(NOT _pkg_fish_completionsdir)
    include(GNUInstallDirs)
    if(CMAKE_INSTALL_DATAROOTDIR)
    - set(CURL_COMPLETION_ZSH_DIR "${CMAKE_INSTA
  • From Daniel Stenberg@21:1/5 to Helmut Grohne on Wed Apr 23 08:20:01 2025
    On Wed, 23 Apr 2025, Helmut Grohne wrote:

    curl intentionally broke cross compilation in its last upstream release.

    This is a ridiculous and incorrect statement.

    Before curl 8.13.0, the completion scripts would not be produced for cross-compiles because they required *executing* the curl executable to get generated.

    Since curl 8.13.0, the completion scripts are generated fine even for cross-compiles since the dependency on the executable has been removed.

    (There might still be bugs of course.)

    / daniel.haxx.se

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Samuel Henrique@21:1/5 to Helmut Grohne on Wed Apr 23 11:20:01 2025
    Hello Helmut,

    On Wed, 23 Apr 2025 at 06:30, Helmut Grohne <helmut@subdivi.de> wrote:
    curl intentionally broke cross compilation in its last upstream release.
    It stopped installing fish/zsh completion files, because that's
    impossible for cross compilation. Turns out, that's factually wrong and skipping the files makes the build fail. I'm attaching a revert for your convenience. Please include it at least in Debian even if it ends up not being upstreamable.

    I think you misunderstood the intentions and order of events here, we never installed shell completions for curl [0] and upstream actually solved the root of that problem on 8.13.0[1], they just forgot to update the makefiles.

    Saying there's intention in that can be upsetting to upstream when that's not true[2], but I know this was just a misunderstanding and not ill intended. I appreciate your work and reporting this!

    I have submitted this patch upstream at https://github.com/curl/curl/pull/17148


    Regards,

    [0] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=812965
    [1] https://github.com/curl/curl/commit/795425f765389df8aa63c8b3fddd21ab2a3dc193
    [2] Our words as Debian Developers carry a lot of weight some times.

    --
    Samuel Henrique <samueloph>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Helmut Grohne@21:1/5 to Daniel Stenberg on Wed Apr 23 20:50:01 2025
    Hello Daniel,

    please accept apologies for my bad conduct. What I have written does not
    meet Debian's code of conduct and its second item in particular.

    I sent it in a hurry after having been faced with a multitude of
    regressions in various packages while feeling pressured by Debian's
    freeze timeline. This may serve as an explanation, but it does not
    excuse what I wrote.

    On Wed, Apr 23, 2025 at 08:00:27AM +0200, Daniel Stenberg wrote:
    On Wed, 23 Apr 2025, Helmut Grohne wrote:

    curl intentionally broke cross compilation in its last upstream release.

    This is a ridiculous and incorrect statement.

    It is. What is true, is that the curl Debian package used to cross build
    three weeks ago and now fails. My premature conclusion and accusation is
    not.

    Before curl 8.13.0, the completion scripts would not be produced for cross-compiles because they required *executing* the curl executable to get generated.

    I did not look at the history indeed. Regularly, I am encountering
    broken cross compilation specific branches where removing them fixes
    things. I blindly assumed it to be the case here whereas that totally
    was not the case as you rightly pointed out.

    Since curl 8.13.0, the completion scripts are generated fine even for cross-compiles since the dependency on the executable has been removed.

    Thanks for making that work in a much better way than before. Indeed,
    things just work after removing the left-over branches. What I did not
    realize was that prior to 8.13.0, completion was not being installed
    during cross compilation at all.

    Quite certainly, the way I reported this problem did not help in fixing
    it quickly.

    Helmut

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)