Skip to content

GH-46111: [C++][CI] Fix boost 1.88 on MinGW - #46113

Merged
raulcd merged 3 commits into
apache:mainfrom
raulcd:GH-46111
Apr 14, 2025
Merged

raulcd merged 3 commits into
apache:mainfrom
raulcd:GH-46111

Conversation

@raulcd

@raulcd raulcd commented Apr 11, 2025 •

Copy link
Copy Markdown
Member

Rationale for this change

Boost has remove their include/boost/process/v1.hpp

What changes are included in this PR?

Instead of using their old include file (which was a wrapper for the different includes) add the individual includes.

Are these changes tested?

Via CI.

Are there any user-facing changes?

No

@github-actions

Copy link
Copy Markdown

⚠️ GitHub issue #46111 has been automatically assigned in GitHub to PR creator.

@raulcd

raulcd commented Apr 11, 2025

Copy link
Copy Markdown
Member Author

v1.hpp and v2.hpp have been removed from include/boost/process on 1.88:
https://github.com/boostorg/process/tree/develop/include/boost/process
but were available on 1.87:
https://github.com/boostorg/process/blob/boost-1.87.0/include/boost/process/v1.hpp

@raulcd

raulcd commented Apr 11, 2025

Copy link
Copy Markdown
Member Author

I don't like this solution and I don't think we are compatible with boost 1.88 at the moment (seeing the other checks and includes for v2.hpp) but at least this shows the CI problem is related to boost 1.88 and some investigation.
@kou should we try and make a PR to be compatible with 1.88 (not only for mingw) or do you think a workaround like the one here is worth to fix CI?

Comment thread cpp/src/arrow/testing/process.cc Outdated
# endif
# ifdef BOOST_PROCESS_HAVE_V1
# include <boost/process/v1.hpp>
# ifdef BOOST_PROCESS_HAVE_V2

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we force V1 on Windows even if BOOST_PROCESS_HAVE_V2 as per:

  if(BOOST_PROCESS_HAVE_V2
     AND # We can't use v2 API on Windows because v2 API doesn't support
         # process group[1] and GCS testbench uses multiple processes[2].
         #
         # [1] https://github.com/boostorg/process/issues/259
         # [2] https://github.com/googleapis/storage-testbench/issues/669
         (NOT WIN32)
     AND # We can't use v2 API with musl libc with Boost Process < 1.86
         # because Boost Process < 1.86 doesn't support musl libc[3].
         #
         # [3] https://github.com/boostorg/process/commit/aea22dbf6be1695ceb42367590b6ca34d9433500
         (NOT (ARROW_WITH_MUSL AND (Boost_VERSION VERSION_LESS 1.86))))
    target_compile_definitions(Boost::process INTERFACE "BOOST_PROCESS_USE_V2")
  endif()

@kou kou left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 for this approach.

But do we need to change the current conditions? Is the following enough?

diff --git a/cpp/src/arrow/testing/process.cc b/cpp/src/arrow/testing/process.cc
index 5f04b31aa1..359e52245c 100644
--- a/cpp/src/arrow/testing/process.cc
+++ b/cpp/src/arrow/testing/process.cc
@@ -57,7 +57,25 @@
 #      define BOOST_USE_WINDOWS_H = 1
 #    endif
 #    ifdef BOOST_PROCESS_HAVE_V1
-#      include <boost/process/v1.hpp>
+#      include <boost/process/v1/args.hpp>
+#      include <boost/process/v1/async.hpp>
+#      include <boost/process/v1/async_system.hpp>
+#      include <boost/process/v1/group.hpp>
+#      include <boost/process/v1/child.hpp>
+#      include <boost/process/v1/cmd.hpp>
+#      include <boost/process/v1/env.hpp>
+#      include <boost/process/v1/environment.hpp>
+#      include <boost/process/v1/error.hpp>
+#      include <boost/process/v1/exe.hpp>
+#      include <boost/process/v1/group.hpp>
+#      include <boost/process/v1/handles.hpp>
+#      include <boost/process/v1/io.hpp>
+#      include <boost/process/v1/pipe.hpp>
+#      include <boost/process/v1/shell.hpp>
+#      include <boost/process/v1/search_path.hpp>
+#      include <boost/process/v1/spawn.hpp>
+#      include <boost/process/v1/system.hpp>
+#      include <boost/process/v1/start_dir.hpp>
 #    else
 #      include <boost/process.hpp>
 #    endif

@kou

kou commented Apr 13, 2025

Copy link
Copy Markdown
Member

Related issue: boostorg/process#480

@raulcd

raulcd commented Apr 14, 2025 •

Copy link
Copy Markdown
Member Author

@kou this should be ready. CI failures are unrelated. It seems it fails when the PR for 20.0.0 RC0 is open. But taking a look at the following code I am unsure why it comes as null. I'll open an issue:

    response = Net::HTTP.post(uri,
                              n_issues_query.to_json,
                              "Content-Type" => "application/json",
                              "Authorization" => "Bearer #{github_token}")
    n_resolved_issues = JSON.parse(response.body)["data"]["search"]["issueCount"]
    github_api_url = "https://api.github.com"
    verify_prs = URI("#{github_api_url}/repos/apache/arrow/pulls" +
                     "?state=open" +
                     "&head=apache:release-#{@release_version}-rc0")
    verify_pr_url = nil
    headers = {
      "Accept" => "application/vnd.github+json",
    }

    if github_token
      headers["Authorization"] = "Bearer #{github_token}"
    end
    verify_prs.open(headers) do |response|
      verify_pr_url = (JSON.parse(response.read)[0] || {})["html_url"]
    end

Edit, the issue:

@raulcd
raulcd marked this pull request as ready for review April 14, 2025 10:00

@raulcd raulcd left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as this was already approved by @kou with a minor comment that has been applied I am going to merge to fix CI as I am trying to debug some failures and this is distracting me from the real failures :)

@raulcd

raulcd commented Apr 14, 2025

Copy link
Copy Markdown
Member Author

It seems I wrongly checked the CI jobs here, I am unsure where did I saw the CI failures about the merge script (might have been a different/wrong tab). I do think the MinGW failures are unrelated to this PR but I am going to open a new PR to check as this was working without the last commit on this PR (it shouldn't affect the protobuf failure)

@raulcd

raulcd commented Apr 14, 2025

Copy link
Copy Markdown
Member Author

Ok, this did not cause the issue:
#46135
The above worked 3 days ago and now it's failing

assignUser pushed a commit that referenced this pull request Apr 15, 2025
### Rationale for this change

Boost has remove their `include/boost/process/v1.hpp`

### What changes are included in this PR?

Instead of using their old include file (which was a wrapper for the different includes) add the individual includes.

### Are these changes tested?

Via CI.

### Are there any user-facing changes?

No
* GitHub Issue: #46111

Authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
zanmato1984 pushed a commit to zanmato1984/arrow that referenced this pull request Apr 15, 2025
### Rationale for this change

Boost has remove their `include/boost/process/v1.hpp`

### What changes are included in this PR?

Instead of using their old include file (which was a wrapper for the different includes) add the individual includes.

### Are these changes tested?

Via CI.

### Are there any user-facing changes?

No
* GitHub Issue: apache#46111

Authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
assignUser pushed a commit that referenced this pull request Apr 17, 2025
…on boost 1.88 and use individual includes (#46160)

### Rationale for this change

Similar to #46113 but for boost v2. 
The files `v1.hpp` and `v2.hpp` have been removed from `include/boost/process` on `1.88`:
https://github.com/boostorg/process/tree/develop/include/boost/process
but were available on `1.87`:
https://github.com/boostorg/process/blob/boost-1.87.0/include/boost/process/v1.hpp
https://github.com/boostorg/process/blob/boost-1.87.0/include/boost/process/v2.hpp

### What changes are included in this PR?

Stop using include for possible missing file and add individual includes

### Are these changes tested?

Via CI

### Are there any user-facing changes?

No

* GitHub Issue: #46159

Authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
assignUser pushed a commit that referenced this pull request Apr 22, 2025
…on boost 1.88 and use individual includes (#46160)

### Rationale for this change

Similar to #46113 but for boost v2. 
The files `v1.hpp` and `v2.hpp` have been removed from `include/boost/process` on `1.88`:
https://github.com/boostorg/process/tree/develop/include/boost/process
but were available on `1.87`:
https://github.com/boostorg/process/blob/boost-1.87.0/include/boost/process/v1.hpp
https://github.com/boostorg/process/blob/boost-1.87.0/include/boost/process/v2.hpp

### What changes are included in this PR?

Stop using include for possible missing file and add individual includes

### Are these changes tested?

Via CI

### Are there any user-facing changes?

No

* GitHub Issue: #46159

Authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 0 benchmarking runs that have been run so far on merge-commit f80bd9c.

None of the specified runs were found on the Conbench server.

The full Conbench report has more details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants