kou commented on code in PR #47282: URL: https://github.com/apache/arrow/pull/47282#discussion_r2261978722
########## .github/workflows/cpp_extra.yml: ########## @@ -166,3 +166,58 @@ jobs: ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} continue-on-error: true run: archery docker push ${{ matrix.image }} + + meson-windows: + needs: check-labels + name: ${{ matrix.title }} + runs-on: ${{ matrix.runs-on }} + if: needs.check-labels.outputs.ci-extra == 'true' + timeout-minutes: 75 + strategy: + fail-fast: false + matrix: + include: + - runs-on: windows-2022 + title: AMD64 Windows Meson + steps: + - name: Checkout Arrow + uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + - name: Download Timezone Database + shell: bash + run: ci/scripts/download_tz_database.sh + - name: Install ccache + shell: bash + run: | + ci/scripts/install_ccache.sh 4.6.3 /usr + - name: Setup ccache + shell: bash + run: | + ci/scripts/ccache_setup.sh + - name: ccache info + id: ccache-info + shell: bash + run: | + echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT + - name: Cache ccache + uses: actions/cache@v4 + with: + path: ${{ steps.ccache-info.outputs.cache-dir }} + key: cpp-ccache-windows-${{ env.CACHE_VERSION }}-${{ hashFiles('cpp/**') }} + restore-keys: cpp-ccache-windows-${{ env.CACHE_VERSION }}- + env: + # We can invalidate the current cache by updating this. + CACHE_VERSION: "2022-09-13" + - name: Build + shell: cmd Review Comment: ```suggestion shell: cmd env: ARROW_USE_MESON: ON ``` ########## cpp/src/arrow/meson.build: ########## @@ -15,9 +15,20 @@ # specific language governing permissions and limitations # under the License. -dl_dep = dependency('dl') +if host_machine.system() != 'windows' + dl_dep = dependency('dl') +else + dl_dep = declare_dependency() +endif Review Comment: Could you swap these branches for easy to read? (In general, no "not" is easier to read.) ```suggestion if host_machine.system() == 'windows' dl_dep = declare_dependency() else dl_dep = dependency('dl') endif ``` ########## .github/workflows/cpp_extra.yml: ########## @@ -166,3 +166,58 @@ jobs: ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} continue-on-error: true run: archery docker push ${{ matrix.image }} + + meson-windows: + needs: check-labels + name: ${{ matrix.title }} + runs-on: ${{ matrix.runs-on }} + if: needs.check-labels.outputs.ci-extra == 'true' + timeout-minutes: 75 + strategy: + fail-fast: false + matrix: + include: + - runs-on: windows-2022 + title: AMD64 Windows Meson + steps: + - name: Checkout Arrow + uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + - name: Download Timezone Database + shell: bash + run: ci/scripts/download_tz_database.sh + - name: Install ccache + shell: bash + run: | + ci/scripts/install_ccache.sh 4.6.3 /usr + - name: Setup ccache + shell: bash + run: | + ci/scripts/ccache_setup.sh + - name: ccache info + id: ccache-info + shell: bash + run: | + echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT + - name: Cache ccache + uses: actions/cache@v4 + with: + path: ${{ steps.ccache-info.outputs.cache-dir }} + key: cpp-ccache-windows-${{ env.CACHE_VERSION }}-${{ hashFiles('cpp/**') }} + restore-keys: cpp-ccache-windows-${{ env.CACHE_VERSION }}- + env: + # We can invalidate the current cache by updating this. + CACHE_VERSION: "2022-09-13" + - name: Build + shell: cmd + run: | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + bash -c "ARROW_USE_MESON=ON; ci/scripts/cpp_build.sh $(pwd) $(pwd)/build ${{ matrix.run-options || '' }}" Review Comment: ```suggestion bash -c "ci/scripts/cpp_build.sh $(pwd) $(pwd)/build" ``` ########## cpp/src/arrow/util/meson.build: ########## @@ -224,18 +222,25 @@ utility_test_srcs = [ ] if host_machine.system() == 'windows' + # meson does not natively support manifest files like CMake does Review Comment: https://github.com/mesonbuild/meson/issues/13041 may be related. `/MANIFEST:EMBED /MANIFESTINPUT:io_util_test.manifest` linker options may work. See also: https://learn.microsoft.com/en-us/cpp/build/reference/manifestinput-specify-manifest-input?view=msvc-170 ########## cpp/src/arrow/meson.build: ########## @@ -484,14 +505,22 @@ if needs_compute arrow_compute_lib = library( 'arrow-compute', sources: arrow_compute_lib_sources, - dependencies: arrow_dep, + dependencies: [arrow_dep] + int128_deps, Review Comment: Hmm. Why do we need this? If `libarrow` is a static library, it must have `int128_deps` dependency. `libarrow` consumers should not care about `int128_deps`. ########## cpp/src/arrow/compute/kernels/ree_util_internal.h: ########## @@ -347,7 +347,7 @@ Result<std::shared_ptr<ArrayData>> PreallocateRunEndsArray( /// \param has_validity_buffer a validity buffer must be allocated /// \param length the length of the values array /// \param data_buffer_size the size of the data buffer for string and binary types -ARROW_COMPUTE_EXPORT Result<std::shared_ptr<ArrayData>> PreallocateValuesArray( +ARROW_EXPORT Result<std::shared_ptr<ArrayData>> PreallocateValuesArray( Review Comment: Really? It seems that it's used by `libarrow_compute` not `libarrow`: https://github.com/apache/arrow/blob/97d7cdb9daef4f0e2bd050b2c032413d8697ae02/cpp/src/arrow/CMakeLists.txt#L767 ########## cpp/src/arrow/meson.build: ########## @@ -423,12 +435,21 @@ arrow_lib = library( dependencies: arrow_deps, install: true, gnu_symbol_visibility: 'hidden', - cpp_shared_args: ['-DARROW_EXPORTING'], + c_shared_args: ['-DARROW_EXPORTING', '-DURI_LIBRARY_BUILD', '-DURI_VISIBILITY'], + c_static_args: ['-DURI_STATIC_BUILD'], + cpp_shared_args: ['-DARROW_EXPORTING', '-DURI_LIBRARY_BUILD'], + cpp_static_args: ['-DARROW_STATIC'], ) +arrow_compile_args = [] +if host_machine.system() == 'windows' and get_option('default_library') != 'shared' Review Comment: We can always define `ARROW_STATIC`: ```suggestion if get_option('default_library') != 'shared' ``` BTW, does this work with `default_library=both`? ########## .github/workflows/cpp_extra.yml: ########## @@ -166,3 +166,58 @@ jobs: ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} continue-on-error: true run: archery docker push ${{ matrix.image }} + + meson-windows: + needs: check-labels + name: ${{ matrix.title }} + runs-on: ${{ matrix.runs-on }} + if: needs.check-labels.outputs.ci-extra == 'true' + timeout-minutes: 75 + strategy: + fail-fast: false + matrix: + include: + - runs-on: windows-2022 + title: AMD64 Windows Meson + steps: + - name: Checkout Arrow + uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + - name: Download Timezone Database + shell: bash + run: ci/scripts/download_tz_database.sh + - name: Install ccache + shell: bash + run: | + ci/scripts/install_ccache.sh 4.6.3 /usr + - name: Setup ccache + shell: bash + run: | + ci/scripts/ccache_setup.sh + - name: ccache info + id: ccache-info + shell: bash + run: | + echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT + - name: Cache ccache + uses: actions/cache@v4 + with: + path: ${{ steps.ccache-info.outputs.cache-dir }} + key: cpp-ccache-windows-${{ env.CACHE_VERSION }}-${{ hashFiles('cpp/**') }} + restore-keys: cpp-ccache-windows-${{ env.CACHE_VERSION }}- Review Comment: ```suggestion key: cpp-ccache-windows-meson-${{ env.CACHE_VERSION }}-${{ hashFiles('cpp/**') }} restore-keys: cpp-ccache-windows-meson-${{ env.CACHE_VERSION }}- ``` ########## .github/workflows/cpp_extra.yml: ########## @@ -166,3 +166,58 @@ jobs: ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} continue-on-error: true run: archery docker push ${{ matrix.image }} + + meson-windows: + needs: check-labels + name: ${{ matrix.title }} + runs-on: ${{ matrix.runs-on }} + if: needs.check-labels.outputs.ci-extra == 'true' + timeout-minutes: 75 + strategy: + fail-fast: false + matrix: + include: + - runs-on: windows-2022 + title: AMD64 Windows Meson + steps: + - name: Checkout Arrow + uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + - name: Download Timezone Database + shell: bash + run: ci/scripts/download_tz_database.sh + - name: Install ccache + shell: bash + run: | + ci/scripts/install_ccache.sh 4.6.3 /usr + - name: Setup ccache + shell: bash + run: | + ci/scripts/ccache_setup.sh + - name: ccache info + id: ccache-info + shell: bash + run: | + echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT + - name: Cache ccache + uses: actions/cache@v4 + with: + path: ${{ steps.ccache-info.outputs.cache-dir }} + key: cpp-ccache-windows-${{ env.CACHE_VERSION }}-${{ hashFiles('cpp/**') }} + restore-keys: cpp-ccache-windows-${{ env.CACHE_VERSION }}- + env: + # We can invalidate the current cache by updating this. + CACHE_VERSION: "2022-09-13" + - name: Build + shell: cmd + run: | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + bash -c "ARROW_USE_MESON=ON; ci/scripts/cpp_build.sh $(pwd) $(pwd)/build ${{ matrix.run-options || '' }}" + - name: Test + shell: bash Review Comment: ```suggestion shell: bash env: ARROW_USE_MESON: ON ``` ########## .github/workflows/cpp_extra.yml: ########## @@ -166,3 +166,58 @@ jobs: ARCHERY_DOCKER_PASSWORD: ${{ secrets.DOCKERHUB_TOKEN }} continue-on-error: true run: archery docker push ${{ matrix.image }} + + meson-windows: + needs: check-labels + name: ${{ matrix.title }} + runs-on: ${{ matrix.runs-on }} + if: needs.check-labels.outputs.ci-extra == 'true' + timeout-minutes: 75 + strategy: + fail-fast: false + matrix: + include: + - runs-on: windows-2022 + title: AMD64 Windows Meson + steps: + - name: Checkout Arrow + uses: actions/checkout@v4 + with: + fetch-depth: 0 + submodules: recursive + - name: Download Timezone Database + shell: bash + run: ci/scripts/download_tz_database.sh + - name: Install ccache + shell: bash + run: | + ci/scripts/install_ccache.sh 4.6.3 /usr + - name: Setup ccache + shell: bash + run: | + ci/scripts/ccache_setup.sh + - name: ccache info + id: ccache-info + shell: bash + run: | + echo "cache-dir=$(ccache --get-config cache_dir)" >> $GITHUB_OUTPUT + - name: Cache ccache + uses: actions/cache@v4 + with: + path: ${{ steps.ccache-info.outputs.cache-dir }} + key: cpp-ccache-windows-${{ env.CACHE_VERSION }}-${{ hashFiles('cpp/**') }} + restore-keys: cpp-ccache-windows-${{ env.CACHE_VERSION }}- + env: + # We can invalidate the current cache by updating this. + CACHE_VERSION: "2022-09-13" + - name: Build + shell: cmd + run: | + call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 + bash -c "ARROW_USE_MESON=ON; ci/scripts/cpp_build.sh $(pwd) $(pwd)/build ${{ matrix.run-options || '' }}" + - name: Test + shell: bash + run: | + # For ORC + export TZDIR=/c/msys64/usr/share/zoneinfo + ARROW_USE_MESON=ON ci/scripts/cpp_test.sh $(pwd) $(pwd)/build ${{ matrix.run-options || '' }} Review Comment: ```suggestion ci/scripts/cpp_test.sh $(pwd) $(pwd)/build ``` -- 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: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org