-
Notifications
You must be signed in to change notification settings - Fork 4k
GH-45994: [CI][GLib] Fix vcpkg configuration for Windows job #46006
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
Conversation
|
|
|
|
|
@github-actions crossbow submit test-build-vcpkg-win |
This comment was marked as outdated.
This comment was marked as outdated.
|
@github-actions crossbow submit test-build-vcpkg-win |
This comment was marked as outdated.
This comment was marked as outdated.
6fe94e7 to
3a1fa83
Compare
|
@github-actions crossbow submit test-build-vcpkg-win |
This comment was marked as outdated.
This comment was marked as outdated.
|
@github-actions crossbow submit test-build-vcpkg-win |
This comment was marked as outdated.
This comment was marked as outdated.
|
@github-actions crossbow submit test-build-vcpkg-win |
|
Let me know if this is ready for review! |
|
OK! This is the last error to be fixed: I think that we can fix it by using correct build configurations not changing existing code but I haven't found it yet... I think that I can fix this tomorrow... |
|
@assignUser This is ready but there are many changes I thought... There were some problems to be fixed:
This PR fixes all of them. |
| - name: Checkout vcpkg | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
| with: | ||
| fetch-depth: 0 | ||
| path: vcpkg | ||
| repository: microsoft/vcpkg | ||
| - name: Bootstrap vcpkg | ||
| run: | | ||
| vcpkg\bootstrap-vcpkg.bat | ||
| $VCPKG_ROOT = $(Resolve-Path -LiteralPath "vcpkg").ToString() | ||
| Write-Output ${VCPKG_ROOT} | ` | ||
| Out-File -FilePath ${Env:GITHUB_PATH} -Encoding utf8 -Append | ||
| Write-Output "VCPKG_ROOT=${VCPKG_ROOT}" | ` | ||
| Out-File -FilePath ${Env:GITHUB_ENV} -Encoding utf8 -Append |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ensure using the latest vcpkg. vcpkg exists in GitHub Actions runner by default. But it may be older than vcpkg we want to use.
| shell: cmd | ||
| run: | | ||
| set VCPKG_ROOT_KEEP=%VCPKG_ROOT% | ||
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This overrides VCPKG_ROOT. So we need to restore our VCPKG_ROOT after this.
| if generate_vapi | ||
| pkgconfig_variables += ['vapidir=@0@'.format(vapi_dir)] | ||
| add_languages('vala') | ||
| add_languages('vala', native: false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not required but it reports a warning.
| common_args = {'version': [f'>=@version_no_snapshot@']} | ||
| arrow = dependency( | ||
| 'arrow', | ||
| 'Arrow', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for detecting a package for CMake.
| 'arrow', | ||
| 'Arrow', | ||
| kwargs: common_args, | ||
| modules: ['Arrow::arrow_shared'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for detecting a package for CMake.
| meson setup \ | ||
| --backend=ninja \ | ||
| --prefix="${ARROW_HOME}" \ | ||
| --cmake-prefix-path="${meson_cmake_prefix_path}" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for finding CMake packages of Apache Arrow C++.
| # We add -DARROW_STATIC only when static build is enabled because | ||
| # pkgconf 1.7.4 or later on Windows uses "--static" by default. If | ||
| # Cflags.private (-DARROW_STATIC) is used for shared linking, it | ||
| # will cause linke error. We recommend users to not use pkgconf for | ||
| # shared linking on Windows but we also provide a workaround here. | ||
| # If users don't enable ARROW_BUILD_STATIC, users can use pkgconf on | ||
| # Windows because Cflags.private is used but it has nothing. | ||
| string(APPEND ARROW_PC_CFLAGS_PRIVATE " -DARROW_STATIC") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a workaround for recent pkgconf on Windows. Our CI doesn't use -DARROW_BUILD_STATIC=ON.
| OR ARROW_WITH_GRPC) | ||
| set(ARROW_NEED_GFLAGS 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bundled gRPC doesn't need gflags.
This is not required because we use gflags provided by vcpkg. (This was needed before vcpkg adds CMake 4.0.0 workaround.)
| { | ||
| "name": "gtest", | ||
| "features": [ | ||
| "cxx17" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need this because vcpkg's gtest uses C++14 by default.
| @rem changes in vcpkg | ||
|
|
||
| vcpkg install ^ | ||
| --triplet x64-windows ^ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We use VCPKG_DEFAULT_TRIPLET env instead of this.
### Rationale for this change We always use `BoostConfig.cmake` by #45623. We don't use `FindBoost.cmake`. We need to use recent vcpkg to use `BoostConfig.cmake` because old Boost doesn't provide it. ### What changes are included in this PR? * Update `vcpkg.json` for `cpp/` and `c_glib/`. * Always use the latest vcpkg instead of using vcpkg bundled in Visual Studio. * C++: Don't use gflags for building bundled gRPC because bundled gRPC doens't use gflags. * C++: Don't define `-D*_EXPORT` macros to `Cflags.private` in `*.pc` because pkgconf 1.7.4 or later uses `--static` by default on Windows. If `--static` is used by default, `*_EXPORT`s are defined for shared linking. It causes link errors. This is a workaround of this. * FYI: pkgconf/pkgconf@008d706 * GLib: Add support for finding Apache Arrow C++ by CMake. It's another workaround for the pkgconf problem. If we use CMake, the pkgconf problem isn't related. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * GitHub Issue: #45994 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
|
After merging your PR, Conbench analyzed the 4 benchmarking runs that have been run so far on merge-commit 3351aeb. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 6 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…pache#46006) ### Rationale for this change We always use `BoostConfig.cmake` by apache#45623. We don't use `FindBoost.cmake`. We need to use recent vcpkg to use `BoostConfig.cmake` because old Boost doesn't provide it. ### What changes are included in this PR? * Update `vcpkg.json` for `cpp/` and `c_glib/`. * Always use the latest vcpkg instead of using vcpkg bundled in Visual Studio. * C++: Don't use gflags for building bundled gRPC because bundled gRPC doens't use gflags. * C++: Don't define `-D*_EXPORT` macros to `Cflags.private` in `*.pc` because pkgconf 1.7.4 or later uses `--static` by default on Windows. If `--static` is used by default, `*_EXPORT`s are defined for shared linking. It causes link errors. This is a workaround of this. * FYI: pkgconf/pkgconf@008d706 * GLib: Add support for finding Apache Arrow C++ by CMake. It's another workaround for the pkgconf problem. If we use CMake, the pkgconf problem isn't related. ### Are these changes tested? Yes. ### Are there any user-facing changes? Yes. * GitHub Issue: apache#45994 Authored-by: Sutou Kouhei <kou@clear-code.com> Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
Rationale for this change
We always use
BoostConfig.cmakeby #45623. We don't useFindBoost.cmake.We need to use recent vcpkg to use
BoostConfig.cmakebecause old Boost doesn't provide it.What changes are included in this PR?
vcpkg.jsonforcpp/andc_glib/.-D*_EXPORTmacros toCflags.privatein*.pcbecause pkgconf 1.7.4 or later uses--staticby default on Windows. If--staticis used by default,*_EXPORTs are defined for shared linking. It causes link errors. This is a workaround of this.Are these changes tested?
Yes.
Are there any user-facing changes?
Yes.