From: "nobu (Nobuyoshi Nakada) via ruby-core" Date: 2024-11-23T11:31:35+00:00 Subject: [ruby-core:119997] [Ruby master Bug#20904] 3.4.0-preview2: Building miniruby.exe fails for mswin32 Issue #20904 has been updated by nobu (Nobuyoshi Nakada). Status changed from Open to Feedback jun66j5 (Jun Omae) wrote: > Investigating it, Windows 8 is required after #20563 but `NTVER` is still `0x0600` in `win32/Makefile.sub`. I think it should be `0x0602`. Workaround is to invoke `win32\configure.bat` with `--with-ntver=0x0602`. Thank you, fixed it by commit:80cfa57234255667a86d46096093099349a7262a. > Also, adding temporarily `-w24013` to `WARNFLAGS` in `win32/Makefile.sub`, the following warning is received. > > ``` > compiling win32/win32.c > win32.c > win32/win32.c(4789): warning C4013: 'GetSystemTimePreciseAsFileTime' undefined; assuming extern returning int > ``` I can't reproduce it with: * Visual Studio 2022 Developer Command Prompt v17.12.0 * Windows 11 SDK Version 10.0.26100.0 * Windows 11 [Version 10.0.26100.2314] ---------------------------------------- Bug #20904: 3.4.0-preview2: Building miniruby.exe fails for mswin32 https://bugs.ruby-lang.org/issues/20904#change-110740 * Author: jun66j5 (Jun Omae) * Status: Feedback * Backport: 3.1: UNKNOWN, 3.2: UNKNOWN, 3.3: UNKNOWN ---------------------------------------- I tried to build 3.4.0-preview2 with MSVC x86, however linking miniruby.exe failed with the following eror: ``` linking miniruby.exe Creating library miniruby.lib and object miniruby.exp win32.obj : error LNK2019: unresolved external symbol _GetSystemTimePreciseAsFileTime referenced in function _clock_gettime miniruby.exe : fatal error LNK1120: 1 unresolved externals ``` It doesn't fail with MSVC x64. Investigating it, Windows 8 is required after #20563 but `NTVER` is still `0x0600` in `win32/Makefile.sub`. I think it should be `0x0602`. Workaround is to invoke `win32\configure.bat` with `--with-ntver=0x0602`. Also, adding temporarily `-w24013` to `WARNFLAGS` in `win32/Makefile.sub`, the following warning is received. ``` compiling win32/win32.c win32.c win32/win32.c(4789): warning C4013: 'GetSystemTimePreciseAsFileTime' undefined; assuming extern returning int ``` -- https://bugs.ruby-lang.org/ ______________________________________________ ruby-core mailing list -- ruby-core@ml.ruby-lang.org To unsubscribe send an email to ruby-core-leave@ml.ruby-lang.org ruby-core info -- https://ml.ruby-lang.org/mailman3/lists/ruby-core.ml.ruby-lang.org/