Project

General

Profile

Actions

Bug #22078

closed

mswin: `gmp.h` not found with `--with-opt-dir` on Ruby 3.3/3.4

Bug #22078: mswin: `gmp.h` not found with `--with-opt-dir` on Ruby 3.3/3.4

Added by hsbt (Hiroshi SHIBATA) about 1 month ago. Updated 24 days ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:125562]

Description

On mswin builds, win32/Makefile.sub builds XCFLAGS without XINCFLAGS, so the include path written by configure.bat --with-opt-dir=... never reaches cl.exe and #include <gmp.h> cannot be resolved.

master and ruby_4_0 are fixed by https://github.com/ruby/ruby/commit/13c64a8a20, but neither ruby_3_4 nor ruby_3_3 has it.

How it surfaces differs between the two:

  • ruby_3_4: win32/setup.mak auto-enables GMP whenever gmp is present, so the build tries to use it and fails on the missing gmp.h.
  • ruby_3_3: win32/setup.mak only enables GMP when --with-gmp is explicitly passed. Without the flag the build passes but GMP is never used; with the flag, it fails the same way as 3.4.

Updated by hsbt (Hiroshi SHIBATA) 24 days ago Actions #2

  • Status changed from Open to Closed

Applied in changeset git|69196c9f7e97a336d40e008d18f17f3663e83276.


Reinstall gmp via vcpkg for Windows tarball-test

Now that win32/Makefile.sub passes XINCFLAGS so the gmp headers under
--with-opt-dir are visible to cl.exe (bug #22078), the gmp build no
longer fails. Restore gmp to the vcpkg install to match master.

Updated by hsbt (Hiroshi SHIBATA) 24 days ago Actions #3

  • Backport changed from 3.3: REQUIRED, 3.4: REQUIRED, 4.0: DONTNEED to 3.3: DONE, 3.4: DONE, 4.0: DONTNEED
Actions

Also available in: PDF Atom