Skip to content

Commit

Permalink
apacheGH-39130: [CI][GLib][Windows] Use old Ruby as workaround for lo…
Browse files Browse the repository at this point in the history
…ad error (apache#39168)

### Rationale for this change

I don't know why the following error is happen:

    Failed to load shared library 'libarrow-glib-1500.dll' referenced
    by the typelib: 'libarrow-glib-1500.dll': The specified procedure
    could not be found.

I think that some symbols are missing but I can't identify them because:

* Windows doesn't report them...
* I can't reproduce this on my local environment.

I found that this isn't happen with a bit old Ruby. So we can use a bit old Ruby as workaround for now.

### What changes are included in this PR?

* Use Ruby 3.1
* Don't update existing packages

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.
* Closes: apache#39130

Authored-by: Sutou Kouhei <kou@clear-code.com>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
  • Loading branch information
kou authored Dec 11, 2023
1 parent c87faf8 commit 7fc6a97
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,9 @@ jobs:
mingw-n-bits:
- 64
ruby-version:
- ruby
# TODO: Use the latest Ruby again when we fix GH-39130.
# - ruby
- "3.1"
env:
ARROW_BUILD_STATIC: OFF
ARROW_BUILD_TESTS: OFF
Expand Down Expand Up @@ -246,13 +248,6 @@ jobs:
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
- name: Upgrade MSYS2
run: |
ridk exec bash ci\scripts\msys2_system_upgrade.sh
taskkill /F /FI "MODULES eq msys-2.0.dll"
- name: Clean MSYS2
run: |
ridk exec bash ci\scripts\msys2_system_clean.sh
- name: Setup MSYS2
run: |
ridk exec bash ci\scripts\msys2_setup.sh ruby
Expand Down
13 changes: 10 additions & 3 deletions ci/scripts/msys2_setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ case "${target}" in
packages+=(${MINGW_PACKAGE_PREFIX}-lz4)
packages+=(${MINGW_PACKAGE_PREFIX}-ninja)
packages+=(${MINGW_PACKAGE_PREFIX}-nlohmann-json)
packages+=(${MINGW_PACKAGE_PREFIX}-openssl)
packages+=(${MINGW_PACKAGE_PREFIX}-protobuf)
packages+=(${MINGW_PACKAGE_PREFIX}-rapidjson)
packages+=(${MINGW_PACKAGE_PREFIX}-re2)
Expand All @@ -52,8 +51,17 @@ case "${target}" in
packages+=(${MINGW_PACKAGE_PREFIX}-thrift)
packages+=(${MINGW_PACKAGE_PREFIX}-xsimd)
packages+=(${MINGW_PACKAGE_PREFIX}-uriparser)
packages+=(${MINGW_PACKAGE_PREFIX}-zlib)
packages+=(${MINGW_PACKAGE_PREFIX}-zstd)

if [ "${target}" != "ruby" ]; then
# We don't update the exiting packages for Ruby because
# RubyInstaller for Windows bundles some DLLs such as libffi,
# OpenSSL and zlib separately. They should be ABI compatible
# with packages installed by MSYS2. If we specify packages
# explicitly here, the existing packages may be updated.
packages+=(${MINGW_PACKAGE_PREFIX}-openssl)
packages+=(${MINGW_PACKAGE_PREFIX}-zlib)
fi
;;
esac

Expand All @@ -78,7 +86,6 @@ esac
pacman \
--needed \
--noconfirm \
--refresh \
--sync \
"${packages[@]}"

Expand Down

0 comments on commit 7fc6a97

Please sign in to comment.