Project

General

Profile

Actions

Bug #22078

open

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 8 hours ago.

Status:
Open
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.

No data to display

Actions

Also available in: PDF Atom