kou commented on code in PR #46006:
URL: https://github.com/apache/arrow/pull/46006#discussion_r2028089565
##########
c_glib/vcpkg.json:
##########
@@ -1,23 +1,11 @@
{
"name": "arrow-glib",
"version-string": "20.0.0-SNAPSHOT",
+ "$comment:dependencies": "We can enable gobject-introspection again once
it's updated",
Review Comment:
GLib is updated but GObject Introspection isn't updated in the latest vcpkg.
So we can't use GObject Introspection for now.
##########
.github/workflows/ruby.yml:
##########
@@ -395,6 +395,20 @@ jobs:
env:
# We can invalidate the current cache by updating this.
CACHE_VERSION: "2024-05-09"
+ - 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
Review Comment:
Ensure using the latest vcpkg. vcpkg exists in GitHub Actions runner by
default. But it may be older than vcpkg we want to use.
##########
c_glib/meson.build:
##########
@@ -97,47 +98,96 @@ else
endif
if arrow_cpp_build_lib_dir == ''
- arrow = dependency('arrow', version: ['>=' + version])
+ common_args = {'version': [f'>=@version_no_snapshot@']}
+ arrow = dependency(
+ 'arrow',
+ 'Arrow',
Review Comment:
This is for detecting a package for CMake.
##########
c_glib/meson.build:
##########
@@ -81,7 +82,7 @@ endif
generate_vapi = have_gi and get_option('vapi')
if generate_vapi
pkgconfig_variables += ['vapidir=@0@'.format(vapi_dir)]
- add_languages('vala')
+ add_languages('vala', native: false)
Review Comment:
This is not required but it reports a warning.
##########
cpp/cmake_modules/ThirdpartyToolchain.cmake:
##########
@@ -1667,11 +1667,10 @@ endif()
if(ARROW_BUILD_TESTS
OR ARROW_BUILD_BENCHMARKS
OR ARROW_BUILD_INTEGRATION
- OR ARROW_USE_GLOG
- OR ARROW_WITH_GRPC)
- set(ARROW_NEED_GFLAGS 1)
Review Comment:
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.)
##########
c_glib/meson.build:
##########
@@ -97,47 +98,96 @@ else
endif
if arrow_cpp_build_lib_dir == ''
- arrow = dependency('arrow', version: ['>=' + version])
+ common_args = {'version': [f'>=@version_no_snapshot@']}
+ arrow = dependency(
+ 'arrow',
+ 'Arrow',
+ kwargs: common_args,
+ modules: ['Arrow::arrow_shared'],
Review Comment:
This is for detecting a package for CMake.
##########
cpp/CMakeLists.txt:
##########
@@ -532,22 +532,79 @@ enable_testing()
# For arrow.pc. Cflags.private, Libs.private and Requires.private are
# used when "pkg-config --cflags --libs --static arrow" is used.
set(ARROW_PC_CFLAGS "")
-set(ARROW_PC_CFLAGS_PRIVATE " -DARROW_STATIC")
+set(ARROW_PC_CFLAGS_PRIVATE "")
+if(ARROW_BUILD_STATIC)
+ # 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")
Review Comment:
This is a workaround for recent pkgconf on Windows. Our CI doesn't use
`-DARROW_BUILD_STATIC=ON`.
##########
.github/workflows/ruby.yml:
##########
@@ -411,10 +425,14 @@ jobs:
- name: Build C++
shell: cmd
run: |
+ set VCPKG_ROOT_KEEP=%VCPKG_ROOT%
call "C:\Program Files\Microsoft Visual
Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
Review Comment:
This overrides `VCPKG_ROOT`. So we need to restore our `VCPKG_ROOT` after
this.
##########
ci/scripts/c_glib_build.sh:
##########
@@ -65,9 +67,10 @@ fi
# Build with Meson
meson setup \
--backend=ninja \
- --prefix="${ARROW_HOME}" \
+ --cmake-prefix-path="${meson_cmake_prefix_path}" \
Review Comment:
This is for finding CMake packages of Apache Arrow C++.
##########
cpp/vcpkg.json:
##########
@@ -29,15 +29,19 @@
"gflags",
"glog",
{
- "name":"google-cloud-cpp",
- "version>=": "1.32.1",
+ "name": "google-cloud-cpp",
"default-features": false,
"features": [
"storage"
]
},
"grpc",
- "gtest",
+ {
+ "name": "gtest",
+ "features": [
+ "cxx17"
Review Comment:
We need this because vcpkg's gtest uses C++14 by default.
##########
dev/tasks/vcpkg-tests/cpp-build-vcpkg.bat:
##########
@@ -27,7 +27,6 @@ call "C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise\Common7\Too
@rem changes in vcpkg
vcpkg install ^
- --triplet x64-windows ^
Review Comment:
We use `VCPKG_DEFAULT_TRIPLET` env instead of this.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]