Skip to content

ci msys2: Add mruby patch for Windows ARM64 support - #2648

Merged
kou merged 2 commits into
groonga:mainfrom
otegami:add-mruby-patch-for-arm64-environment
Nov 17, 2025
Merged

kou merged 2 commits into
groonga:mainfrom
otegami:add-mruby-patch-for-arm64-environment

Conversation

@otegami

@otegami otegami commented Nov 12, 2025 •

Copy link
Copy Markdown
Contributor

GitHub: GH-2646

We add a patch to fix the following build error about mruby on Windows ARM64 environments. The patch modifies mruby's throw.h to avoid using __builtin_setjmp and __builtin_longjmp on ARM64, which are not supported.

C:/a/groonga/groonga/ci/msys2/src/groonga-15.2.1/vendor/mruby-source/src/error.c:631:5: error: __builtin_setjmp is not supported for the current target
  631 |     MRB_TRY(&c_jmp) {
      |     ^~~~~~~~~~~~~~~
C:/a/groonga/groonga/ci/msys2/src/groonga-15.2.1/vendor/mruby-source/include/mruby/throw.h:44:26: note: expanded from macro 'MRB_TRY'
   44 | #define MRB_TRY(buf) if (MRB_SETJMP((buf)->impl) == 0) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~
C:/a/groonga/groonga/ci/msys2/src/groonga-15.2.1/vendor/mruby-source/include/mruby/throw.h:37:20: note: expanded from macro 'MRB_SETJMP'
   37 | #define MRB_SETJMP __builtin_setjmp
      |                    ^
4 warnings and 4 errors generated.
rake aborted!

ref: https://github.com/groonga/groonga/actions/runs/19283288685/job/55138731280#step:8:936

This is a temporary workaround as the issue has already been resolved upstream: mruby/mruby#6637.
The patch can be removed once bundled mruby is updated to a version that includes the upstream fix.

Add a patch to fix mruby build issues on Windows ARM64 environments.
The patch modifies mruby's `throw.h` to avoid using `__builtin_setjmp`
and `__builtin_longjmp` on ARM64, which are not supported.

This is a temporary workaround as the issue has already been resolved
upstream: mruby/mruby#6637.

The patch can be removed once mruby is updated to a version that
includes the upstream fix.
@otegami
otegami force-pushed the add-mruby-patch-for-arm64-environment branch from 4e330db to e8fd7b1 Compare November 12, 2025 04:29
Comment thread ci/msys2/PKGBUILD
"${MINGW_PACKAGE_PREFIX}-xsimd")
sha256sums=('SKIP')
sha256sums=('SKIP'
'SKIP')

@otegami otegami Nov 12, 2025 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This hashed value doesn't work.

$ sha256sum ci/msys2/001-aarch64.patch
2be9596d644bfe5cdf32ce2d89ec380c64870abfba37d2c5310c8664003e191d  ci/msys2/001-aarch64.patch
==> Retrieving sources...
  -> Found groonga-15.2.1.tar.gz
  -> Found 001-aarch64.patch
==> Validating source files with sha256sums...
    groonga-15.2.1.tar.gz ... Skipped
    001-aarch64.patch ... FAILED
==> ERROR: One or more files did not pass the validity check!

ref: https://github.com/groonga/groonga/actions/runs/19286126787/job/55147296462

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

New line may be different.

Remove the diff for vendor/mruby-include/mruby/throw.h which doesn't
exist in the distribution tarball. Keep only the diff for
vendor/mruby-source/include/mruby/throw.h which is the actual file
that needs to be patched.
@otegami
otegami marked this pull request as ready for review November 12, 2025 06:05
@kou
kou merged commit c786f4a into groonga:main Nov 17, 2025
@kou
kou deleted the add-mruby-patch-for-arm64-environment branch November 17, 2025 07:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants