* [ruby-dev:51108] [Ruby master Bug#18341] Visual Studio 2019でRubyを「-MT」でビルドできません。
@ 2021-11-16 6:32 hon (takayuki honda)
2021-11-16 12:21 ` [ruby-dev:51109] " xtkoba (Tee KOBAYASHI)
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: hon (takayuki honda) @ 2021-11-16 6:32 UTC (permalink / raw)
To: ruby-dev
Issue #18341 has been reported by hon (takayuki honda).
----------------------------------------
Bug #18341: Visual Studio 2019でRubyを「-MT」でビルドできません。
https://bugs.ruby-lang.org/issues/18341
* Author: hon (takayuki honda)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
**概要**
VS2019では、"-MD"ならビルドに成功しますが、"-MT"だと失敗します。
VS2015も同様に失敗しましたが、VS2013であれば"-MT"のビルドに成功することを確認しました。
また、2.7.4, 2.5.9, 2.4.10でも同様に失敗することを確認しました。
minirubyのビルドに失敗しているように見えます。
"miniruby -v"は成功しますが、"miniruby 任意のファイル名"を実行すると同様のエラーが発生しました。
**再現手順**
"Developer Command Prompt for VS 2019"を開いて以下を実行しました。
``` text
win32\configure.bat
nmake RUNTIMEFLAG=-MT
```
***実行時のログ***
``` text
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.10.4
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>cd C:\temp\ruby310dev
C:\temp\ruby310dev>win32\configure.bat
Creating verconf.mk
type `nmake' to make ruby.
C:\temp\ruby310dev>nmake RUNTIMEFLAG=-MT
Microsoft(R) Program Maintenance Utility Version 14.29.30040.0
Copyright (C) Microsoft Corporation. All rights reserved.
Creating config.h
.ext\include\i386-mswin32_140\ruby\config.h updated
Creating config.status
compiling ./main.c
main.c
compiling dmydln.c
~ 省略 ~
compiling ./missing/explicit_bzero.c
explicit_bzero.c
compiling dmyenc.c
dmyenc.c
user32.lib advapi32.lib shell32.lib ws2_32.lib iphlpapi.lib imagehlp.lib shlwapi.lib bcrypt.lib
linking miniruby.exe
ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
./revision.h unchanged
generating encdb.h
.\miniruby.exe: [BUG] Segmentation fault
ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:001058 (none) [FINISH]
-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xc) [0x76F229FC]
C:\WINDOWS\System32\KERNELBASE.dll(WaitForSingleObject+0x12) [0x75AD1082]
C:\temp\ruby310dev\miniruby.exe(rb_print_backtrace+0x2e) [0x00ADE820] C:\temp\ruby310dev\vm_dump.c:778
C:\temp\ruby310dev\miniruby.exe(rb_vm_bugreport+0xd9) [0x00ADE8FB] C:\temp\ruby310dev\vm_dump.c:1048
C:\temp\ruby310dev\miniruby.exe(rb_bug_for_fatal_signal+0x48) [0x00A0217C] C:\temp\ruby310dev\error.c:820
C:\temp\ruby310dev\miniruby.exe(sigsegv+0x31) [0x00A95978] C:\temp\ruby310dev\signal.c:964
C:\temp\ruby310dev\miniruby.exe(_seh_filter_exe+0x145) [0x00B01DDC] minkernel\crts\ucrt\src\appcrt\misc\exception_filter.cpp:219
C:\temp\ruby310dev\miniruby.exe(__scrt_common_main_seh+0x138) [0x00AED2BC] d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:304
C:\temp\ruby310dev\miniruby.exe(_EH4_CallFilterFunc+0x12) [0x00AF0032] d:\agent\_work\4\s\src\vctools\crt\vcruntime\src\eh\i386\exsup4.asm:398
C:\temp\ruby310dev\miniruby.exe(_except_handler4+0x87) [0x00AEF977] d:\agent\_work\4\s\src\vctools\crt\vcruntime\src\eh\i386\chandler4.c:437
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlInterlockedCompareExchange64+0x1e2) [0x76F388E2]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlInterlockedCompareExchange64+0x1b4) [0x76F388B4]
C:\WINDOWS\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x26) [0x76F24EE6]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x1fa) [0x76EF00EA]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x49) [0x76EEFF39]
C:\temp\ruby310dev\miniruby.exe(rb_w32_read+0x71) [0x00AE6BC4] C:\temp\ruby310dev\win32\win32.c:7109
C:\temp\ruby310dev\miniruby.exe(internal_read_func+0x1a) [0x00A20CD0] C:\temp\ruby310dev\io.c:1092
C:\temp\ruby310dev\miniruby.exe(rb_thread_io_blocking_region+0x140) [0x00AB4170] C:\temp\ruby310dev\thread.c:1824
C:\temp\ruby310dev\miniruby.exe(rb_read_internal+0x6b) [0x00A28980] C:\temp\ruby310dev\io.c:1160
C:\temp\ruby310dev\miniruby.exe(io_fillbuf+0x52) [0x00A21517] C:\temp\ruby310dev\io.c:2352
C:\temp\ruby310dev\miniruby.exe(rb_io_getbyte+0xb0) [0x00A25C57] C:\temp\ruby310dev\io.c:4460
C:\temp\ruby310dev\miniruby.exe(load_file_internal+0xa8) [0x00A917FB] C:\temp\ruby310dev\ruby.c:2270
C:\temp\ruby310dev\miniruby.exe(rb_ensure+0x9f) [0x00A0531E] C:\temp\ruby310dev\eval.c:993
C:\temp\ruby310dev\miniruby.exe(load_file+0x38) [0x00A9174E] C:\temp\ruby310dev\ruby.c:2469
C:\temp\ruby310dev\miniruby.exe(process_options+0x944) [0x00A93431] C:\temp\ruby310dev\ruby.c:2093
C:\temp\ruby310dev\miniruby.exe(ruby_process_options+0x78) [0x00A93E9F] C:\temp\ruby310dev\ruby.c:2712
C:\temp\ruby310dev\miniruby.exe(ruby_options+0x88) [0x00A065D7] C:\temp\ruby310dev\eval.c:118
C:\temp\ruby310dev\miniruby.exe(main+0x3a) [0x009C103A] C:\temp\ruby310dev\main.c:47
C:\temp\ruby310dev\miniruby.exe(__scrt_common_main_seh+0xfa) [0x00AED27E] d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
C:\WINDOWS\System32\KERNEL32.DLL(BaseThreadInitThunk+0x19) [0x75BFFA29]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlGetAppContainerNamedObjectPath+0x11e) [0x76F17A9E]
-- Other runtime information -----------------------------------------------
* Loaded script: .\miniruby.exe
* Loaded features:
0 enumerator.so
1 thread.rb
2 fiber.so
3 rational.so
4 complex.so
5 ruby2_keywords.rb
NMAKE : fatal error U1077: '.\miniruby.exe' : リターン コード '0x3'
Stop.
```
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-dev:51109] [Ruby master Bug#18341] Visual Studio 2019でRubyを「-MT」でビルドできません。
2021-11-16 6:32 [ruby-dev:51108] [Ruby master Bug#18341] Visual Studio 2019でRubyを「-MT」でビルドできません。 hon (takayuki honda)
@ 2021-11-16 12:21 ` xtkoba (Tee KOBAYASHI)
2021-11-22 7:38 ` [ruby-dev:51110] " usa (Usaku NAKAMURA)
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: xtkoba (Tee KOBAYASHI) @ 2021-11-16 12:21 UTC (permalink / raw)
To: ruby-dev
Issue #18341 has been updated by xtkoba (Tee KOBAYASHI).
Seems like [the hack for `__pioinfo`](https://bugs.ruby-lang.org/projects/ruby-master/repository/git/revisions/5a3b2e61411f3ce516eefeb272787d3d2af13038/entry/win32/win32.c#L2570) does not work with static UCRT.
----------------------------------------
Bug #18341: Visual Studio 2019でRubyを「-MT」でビルドできません。
https://bugs.ruby-lang.org/issues/18341#change-94676
* Author: hon (takayuki honda)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
**概要**
VS2019では、"-MD"ならビルドに成功しますが、"-MT"だと失敗します。
VS2015も同様に失敗しましたが、VS2013であれば"-MT"のビルドに成功することを確認しました。
また、2.7.4, 2.5.9, 2.4.10でも同様に失敗することを確認しました。
minirubyのビルドに失敗しているように見えます。
"miniruby -v"は成功しますが、"miniruby 任意のファイル名"を実行すると同様のエラーが発生しました。
**再現手順**
"Developer Command Prompt for VS 2019"を開いて以下を実行しました。
``` text
win32\configure.bat
nmake RUNTIMEFLAG=-MT
```
***実行時のログ***
``` text
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.10.4
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>cd C:\temp\ruby310dev
C:\temp\ruby310dev>win32\configure.bat
Creating verconf.mk
type `nmake' to make ruby.
C:\temp\ruby310dev>nmake RUNTIMEFLAG=-MT
Microsoft(R) Program Maintenance Utility Version 14.29.30040.0
Copyright (C) Microsoft Corporation. All rights reserved.
Creating config.h
.ext\include\i386-mswin32_140\ruby\config.h updated
Creating config.status
compiling ./main.c
main.c
compiling dmydln.c
~ 省略 ~
compiling ./missing/explicit_bzero.c
explicit_bzero.c
compiling dmyenc.c
dmyenc.c
user32.lib advapi32.lib shell32.lib ws2_32.lib iphlpapi.lib imagehlp.lib shlwapi.lib bcrypt.lib
linking miniruby.exe
ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
./revision.h unchanged
generating encdb.h
.\miniruby.exe: [BUG] Segmentation fault
ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:001058 (none) [FINISH]
-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xc) [0x76F229FC]
C:\WINDOWS\System32\KERNELBASE.dll(WaitForSingleObject+0x12) [0x75AD1082]
C:\temp\ruby310dev\miniruby.exe(rb_print_backtrace+0x2e) [0x00ADE820] C:\temp\ruby310dev\vm_dump.c:778
C:\temp\ruby310dev\miniruby.exe(rb_vm_bugreport+0xd9) [0x00ADE8FB] C:\temp\ruby310dev\vm_dump.c:1048
C:\temp\ruby310dev\miniruby.exe(rb_bug_for_fatal_signal+0x48) [0x00A0217C] C:\temp\ruby310dev\error.c:820
C:\temp\ruby310dev\miniruby.exe(sigsegv+0x31) [0x00A95978] C:\temp\ruby310dev\signal.c:964
C:\temp\ruby310dev\miniruby.exe(_seh_filter_exe+0x145) [0x00B01DDC] minkernel\crts\ucrt\src\appcrt\misc\exception_filter.cpp:219
C:\temp\ruby310dev\miniruby.exe(__scrt_common_main_seh+0x138) [0x00AED2BC] d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:304
C:\temp\ruby310dev\miniruby.exe(_EH4_CallFilterFunc+0x12) [0x00AF0032] d:\agent\_work\4\s\src\vctools\crt\vcruntime\src\eh\i386\exsup4.asm:398
C:\temp\ruby310dev\miniruby.exe(_except_handler4+0x87) [0x00AEF977] d:\agent\_work\4\s\src\vctools\crt\vcruntime\src\eh\i386\chandler4.c:437
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlInterlockedCompareExchange64+0x1e2) [0x76F388E2]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlInterlockedCompareExchange64+0x1b4) [0x76F388B4]
C:\WINDOWS\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x26) [0x76F24EE6]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x1fa) [0x76EF00EA]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x49) [0x76EEFF39]
C:\temp\ruby310dev\miniruby.exe(rb_w32_read+0x71) [0x00AE6BC4] C:\temp\ruby310dev\win32\win32.c:7109
C:\temp\ruby310dev\miniruby.exe(internal_read_func+0x1a) [0x00A20CD0] C:\temp\ruby310dev\io.c:1092
C:\temp\ruby310dev\miniruby.exe(rb_thread_io_blocking_region+0x140) [0x00AB4170] C:\temp\ruby310dev\thread.c:1824
C:\temp\ruby310dev\miniruby.exe(rb_read_internal+0x6b) [0x00A28980] C:\temp\ruby310dev\io.c:1160
C:\temp\ruby310dev\miniruby.exe(io_fillbuf+0x52) [0x00A21517] C:\temp\ruby310dev\io.c:2352
C:\temp\ruby310dev\miniruby.exe(rb_io_getbyte+0xb0) [0x00A25C57] C:\temp\ruby310dev\io.c:4460
C:\temp\ruby310dev\miniruby.exe(load_file_internal+0xa8) [0x00A917FB] C:\temp\ruby310dev\ruby.c:2270
C:\temp\ruby310dev\miniruby.exe(rb_ensure+0x9f) [0x00A0531E] C:\temp\ruby310dev\eval.c:993
C:\temp\ruby310dev\miniruby.exe(load_file+0x38) [0x00A9174E] C:\temp\ruby310dev\ruby.c:2469
C:\temp\ruby310dev\miniruby.exe(process_options+0x944) [0x00A93431] C:\temp\ruby310dev\ruby.c:2093
C:\temp\ruby310dev\miniruby.exe(ruby_process_options+0x78) [0x00A93E9F] C:\temp\ruby310dev\ruby.c:2712
C:\temp\ruby310dev\miniruby.exe(ruby_options+0x88) [0x00A065D7] C:\temp\ruby310dev\eval.c:118
C:\temp\ruby310dev\miniruby.exe(main+0x3a) [0x009C103A] C:\temp\ruby310dev\main.c:47
C:\temp\ruby310dev\miniruby.exe(__scrt_common_main_seh+0xfa) [0x00AED27E] d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
C:\WINDOWS\System32\KERNEL32.DLL(BaseThreadInitThunk+0x19) [0x75BFFA29]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlGetAppContainerNamedObjectPath+0x11e) [0x76F17A9E]
-- Other runtime information -----------------------------------------------
* Loaded script: .\miniruby.exe
* Loaded features:
0 enumerator.so
1 thread.rb
2 fiber.so
3 rational.so
4 complex.so
5 ruby2_keywords.rb
NMAKE : fatal error U1077: '.\miniruby.exe' : リターン コード '0x3'
Stop.
```
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-dev:51110] [Ruby master Bug#18341] Visual Studio 2019でRubyを「-MT」でビルドできません。
2021-11-16 6:32 [ruby-dev:51108] [Ruby master Bug#18341] Visual Studio 2019でRubyを「-MT」でビルドできません。 hon (takayuki honda)
2021-11-16 12:21 ` [ruby-dev:51109] " xtkoba (Tee KOBAYASHI)
@ 2021-11-22 7:38 ` usa (Usaku NAKAMURA)
2021-11-22 9:30 ` [ruby-dev:51111] " hon (takayuki honda)
2021-11-24 4:55 ` [ruby-dev:51113] " hsbt (Hiroshi SHIBATA)
3 siblings, 0 replies; 5+ messages in thread
From: usa (Usaku NAKAMURA) @ 2021-11-22 7:38 UTC (permalink / raw)
To: ruby-dev
Issue #18341 has been updated by usa (Usaku NAKAMURA).
`/MT` はサポートしてません。`/MD`のみサポートです
----------------------------------------
Bug #18341: Visual Studio 2019でRubyを「-MT」でビルドできません。
https://bugs.ruby-lang.org/issues/18341#change-94807
* Author: hon (takayuki honda)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
**概要**
VS2019では、"-MD"ならビルドに成功しますが、"-MT"だと失敗します。
VS2015も同様に失敗しましたが、VS2013であれば"-MT"のビルドに成功することを確認しました。
また、2.7.4, 2.5.9, 2.4.10でも同様に失敗することを確認しました。
minirubyのビルドに失敗しているように見えます。
"miniruby -v"は成功しますが、"miniruby 任意のファイル名"を実行すると同様のエラーが発生しました。
**再現手順**
"Developer Command Prompt for VS 2019"を開いて以下を実行しました。
``` text
win32\configure.bat
nmake RUNTIMEFLAG=-MT
```
***実行時のログ***
``` text
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.10.4
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>cd C:\temp\ruby310dev
C:\temp\ruby310dev>win32\configure.bat
Creating verconf.mk
type `nmake' to make ruby.
C:\temp\ruby310dev>nmake RUNTIMEFLAG=-MT
Microsoft(R) Program Maintenance Utility Version 14.29.30040.0
Copyright (C) Microsoft Corporation. All rights reserved.
Creating config.h
.ext\include\i386-mswin32_140\ruby\config.h updated
Creating config.status
compiling ./main.c
main.c
compiling dmydln.c
~ 省略 ~
compiling ./missing/explicit_bzero.c
explicit_bzero.c
compiling dmyenc.c
dmyenc.c
user32.lib advapi32.lib shell32.lib ws2_32.lib iphlpapi.lib imagehlp.lib shlwapi.lib bcrypt.lib
linking miniruby.exe
ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
./revision.h unchanged
generating encdb.h
.\miniruby.exe: [BUG] Segmentation fault
ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:001058 (none) [FINISH]
-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xc) [0x76F229FC]
C:\WINDOWS\System32\KERNELBASE.dll(WaitForSingleObject+0x12) [0x75AD1082]
C:\temp\ruby310dev\miniruby.exe(rb_print_backtrace+0x2e) [0x00ADE820] C:\temp\ruby310dev\vm_dump.c:778
C:\temp\ruby310dev\miniruby.exe(rb_vm_bugreport+0xd9) [0x00ADE8FB] C:\temp\ruby310dev\vm_dump.c:1048
C:\temp\ruby310dev\miniruby.exe(rb_bug_for_fatal_signal+0x48) [0x00A0217C] C:\temp\ruby310dev\error.c:820
C:\temp\ruby310dev\miniruby.exe(sigsegv+0x31) [0x00A95978] C:\temp\ruby310dev\signal.c:964
C:\temp\ruby310dev\miniruby.exe(_seh_filter_exe+0x145) [0x00B01DDC] minkernel\crts\ucrt\src\appcrt\misc\exception_filter.cpp:219
C:\temp\ruby310dev\miniruby.exe(__scrt_common_main_seh+0x138) [0x00AED2BC] d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:304
C:\temp\ruby310dev\miniruby.exe(_EH4_CallFilterFunc+0x12) [0x00AF0032] d:\agent\_work\4\s\src\vctools\crt\vcruntime\src\eh\i386\exsup4.asm:398
C:\temp\ruby310dev\miniruby.exe(_except_handler4+0x87) [0x00AEF977] d:\agent\_work\4\s\src\vctools\crt\vcruntime\src\eh\i386\chandler4.c:437
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlInterlockedCompareExchange64+0x1e2) [0x76F388E2]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlInterlockedCompareExchange64+0x1b4) [0x76F388B4]
C:\WINDOWS\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x26) [0x76F24EE6]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x1fa) [0x76EF00EA]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x49) [0x76EEFF39]
C:\temp\ruby310dev\miniruby.exe(rb_w32_read+0x71) [0x00AE6BC4] C:\temp\ruby310dev\win32\win32.c:7109
C:\temp\ruby310dev\miniruby.exe(internal_read_func+0x1a) [0x00A20CD0] C:\temp\ruby310dev\io.c:1092
C:\temp\ruby310dev\miniruby.exe(rb_thread_io_blocking_region+0x140) [0x00AB4170] C:\temp\ruby310dev\thread.c:1824
C:\temp\ruby310dev\miniruby.exe(rb_read_internal+0x6b) [0x00A28980] C:\temp\ruby310dev\io.c:1160
C:\temp\ruby310dev\miniruby.exe(io_fillbuf+0x52) [0x00A21517] C:\temp\ruby310dev\io.c:2352
C:\temp\ruby310dev\miniruby.exe(rb_io_getbyte+0xb0) [0x00A25C57] C:\temp\ruby310dev\io.c:4460
C:\temp\ruby310dev\miniruby.exe(load_file_internal+0xa8) [0x00A917FB] C:\temp\ruby310dev\ruby.c:2270
C:\temp\ruby310dev\miniruby.exe(rb_ensure+0x9f) [0x00A0531E] C:\temp\ruby310dev\eval.c:993
C:\temp\ruby310dev\miniruby.exe(load_file+0x38) [0x00A9174E] C:\temp\ruby310dev\ruby.c:2469
C:\temp\ruby310dev\miniruby.exe(process_options+0x944) [0x00A93431] C:\temp\ruby310dev\ruby.c:2093
C:\temp\ruby310dev\miniruby.exe(ruby_process_options+0x78) [0x00A93E9F] C:\temp\ruby310dev\ruby.c:2712
C:\temp\ruby310dev\miniruby.exe(ruby_options+0x88) [0x00A065D7] C:\temp\ruby310dev\eval.c:118
C:\temp\ruby310dev\miniruby.exe(main+0x3a) [0x009C103A] C:\temp\ruby310dev\main.c:47
C:\temp\ruby310dev\miniruby.exe(__scrt_common_main_seh+0xfa) [0x00AED27E] d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
C:\WINDOWS\System32\KERNEL32.DLL(BaseThreadInitThunk+0x19) [0x75BFFA29]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlGetAppContainerNamedObjectPath+0x11e) [0x76F17A9E]
-- Other runtime information -----------------------------------------------
* Loaded script: .\miniruby.exe
* Loaded features:
0 enumerator.so
1 thread.rb
2 fiber.so
3 rational.so
4 complex.so
5 ruby2_keywords.rb
NMAKE : fatal error U1077: '.\miniruby.exe' : リターン コード '0x3'
Stop.
```
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-dev:51111] [Ruby master Bug#18341] Visual Studio 2019でRubyを「-MT」でビルドできません。
2021-11-16 6:32 [ruby-dev:51108] [Ruby master Bug#18341] Visual Studio 2019でRubyを「-MT」でビルドできません。 hon (takayuki honda)
2021-11-16 12:21 ` [ruby-dev:51109] " xtkoba (Tee KOBAYASHI)
2021-11-22 7:38 ` [ruby-dev:51110] " usa (Usaku NAKAMURA)
@ 2021-11-22 9:30 ` hon (takayuki honda)
2021-11-24 4:55 ` [ruby-dev:51113] " hsbt (Hiroshi SHIBATA)
3 siblings, 0 replies; 5+ messages in thread
From: hon (takayuki honda) @ 2021-11-22 9:30 UTC (permalink / raw)
To: ruby-dev
Issue #18341 has been updated by hon (takayuki honda).
承知しました。
回答ありがとうございました。
----------------------------------------
Bug #18341: Visual Studio 2019でRubyを「-MT」でビルドできません。
https://bugs.ruby-lang.org/issues/18341#change-94809
* Author: hon (takayuki honda)
* Status: Open
* Priority: Normal
* ruby -v: ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
**概要**
VS2019では、"-MD"ならビルドに成功しますが、"-MT"だと失敗します。
VS2015も同様に失敗しましたが、VS2013であれば"-MT"のビルドに成功することを確認しました。
また、2.7.4, 2.5.9, 2.4.10でも同様に失敗することを確認しました。
minirubyのビルドに失敗しているように見えます。
"miniruby -v"は成功しますが、"miniruby 任意のファイル名"を実行すると同様のエラーが発生しました。
**再現手順**
"Developer Command Prompt for VS 2019"を開いて以下を実行しました。
``` text
win32\configure.bat
nmake RUNTIMEFLAG=-MT
```
***実行時のログ***
``` text
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.10.4
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>cd C:\temp\ruby310dev
C:\temp\ruby310dev>win32\configure.bat
Creating verconf.mk
type `nmake' to make ruby.
C:\temp\ruby310dev>nmake RUNTIMEFLAG=-MT
Microsoft(R) Program Maintenance Utility Version 14.29.30040.0
Copyright (C) Microsoft Corporation. All rights reserved.
Creating config.h
.ext\include\i386-mswin32_140\ruby\config.h updated
Creating config.status
compiling ./main.c
main.c
compiling dmydln.c
~ 省略 ~
compiling ./missing/explicit_bzero.c
explicit_bzero.c
compiling dmyenc.c
dmyenc.c
user32.lib advapi32.lib shell32.lib ws2_32.lib iphlpapi.lib imagehlp.lib shlwapi.lib bcrypt.lib
linking miniruby.exe
ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
./revision.h unchanged
generating encdb.h
.\miniruby.exe: [BUG] Segmentation fault
ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:001058 (none) [FINISH]
-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xc) [0x76F229FC]
C:\WINDOWS\System32\KERNELBASE.dll(WaitForSingleObject+0x12) [0x75AD1082]
C:\temp\ruby310dev\miniruby.exe(rb_print_backtrace+0x2e) [0x00ADE820] C:\temp\ruby310dev\vm_dump.c:778
C:\temp\ruby310dev\miniruby.exe(rb_vm_bugreport+0xd9) [0x00ADE8FB] C:\temp\ruby310dev\vm_dump.c:1048
C:\temp\ruby310dev\miniruby.exe(rb_bug_for_fatal_signal+0x48) [0x00A0217C] C:\temp\ruby310dev\error.c:820
C:\temp\ruby310dev\miniruby.exe(sigsegv+0x31) [0x00A95978] C:\temp\ruby310dev\signal.c:964
C:\temp\ruby310dev\miniruby.exe(_seh_filter_exe+0x145) [0x00B01DDC] minkernel\crts\ucrt\src\appcrt\misc\exception_filter.cpp:219
C:\temp\ruby310dev\miniruby.exe(__scrt_common_main_seh+0x138) [0x00AED2BC] d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:304
C:\temp\ruby310dev\miniruby.exe(_EH4_CallFilterFunc+0x12) [0x00AF0032] d:\agent\_work\4\s\src\vctools\crt\vcruntime\src\eh\i386\exsup4.asm:398
C:\temp\ruby310dev\miniruby.exe(_except_handler4+0x87) [0x00AEF977] d:\agent\_work\4\s\src\vctools\crt\vcruntime\src\eh\i386\chandler4.c:437
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlInterlockedCompareExchange64+0x1e2) [0x76F388E2]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlInterlockedCompareExchange64+0x1b4) [0x76F388B4]
C:\WINDOWS\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x26) [0x76F24EE6]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x1fa) [0x76EF00EA]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x49) [0x76EEFF39]
C:\temp\ruby310dev\miniruby.exe(rb_w32_read+0x71) [0x00AE6BC4] C:\temp\ruby310dev\win32\win32.c:7109
C:\temp\ruby310dev\miniruby.exe(internal_read_func+0x1a) [0x00A20CD0] C:\temp\ruby310dev\io.c:1092
C:\temp\ruby310dev\miniruby.exe(rb_thread_io_blocking_region+0x140) [0x00AB4170] C:\temp\ruby310dev\thread.c:1824
C:\temp\ruby310dev\miniruby.exe(rb_read_internal+0x6b) [0x00A28980] C:\temp\ruby310dev\io.c:1160
C:\temp\ruby310dev\miniruby.exe(io_fillbuf+0x52) [0x00A21517] C:\temp\ruby310dev\io.c:2352
C:\temp\ruby310dev\miniruby.exe(rb_io_getbyte+0xb0) [0x00A25C57] C:\temp\ruby310dev\io.c:4460
C:\temp\ruby310dev\miniruby.exe(load_file_internal+0xa8) [0x00A917FB] C:\temp\ruby310dev\ruby.c:2270
C:\temp\ruby310dev\miniruby.exe(rb_ensure+0x9f) [0x00A0531E] C:\temp\ruby310dev\eval.c:993
C:\temp\ruby310dev\miniruby.exe(load_file+0x38) [0x00A9174E] C:\temp\ruby310dev\ruby.c:2469
C:\temp\ruby310dev\miniruby.exe(process_options+0x944) [0x00A93431] C:\temp\ruby310dev\ruby.c:2093
C:\temp\ruby310dev\miniruby.exe(ruby_process_options+0x78) [0x00A93E9F] C:\temp\ruby310dev\ruby.c:2712
C:\temp\ruby310dev\miniruby.exe(ruby_options+0x88) [0x00A065D7] C:\temp\ruby310dev\eval.c:118
C:\temp\ruby310dev\miniruby.exe(main+0x3a) [0x009C103A] C:\temp\ruby310dev\main.c:47
C:\temp\ruby310dev\miniruby.exe(__scrt_common_main_seh+0xfa) [0x00AED27E] d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
C:\WINDOWS\System32\KERNEL32.DLL(BaseThreadInitThunk+0x19) [0x75BFFA29]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlGetAppContainerNamedObjectPath+0x11e) [0x76F17A9E]
-- Other runtime information -----------------------------------------------
* Loaded script: .\miniruby.exe
* Loaded features:
0 enumerator.so
1 thread.rb
2 fiber.so
3 rational.so
4 complex.so
5 ruby2_keywords.rb
NMAKE : fatal error U1077: '.\miniruby.exe' : リターン コード '0x3'
Stop.
```
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ruby-dev:51113] [Ruby master Bug#18341] Visual Studio 2019でRubyを「-MT」でビルドできません。
2021-11-16 6:32 [ruby-dev:51108] [Ruby master Bug#18341] Visual Studio 2019でRubyを「-MT」でビルドできません。 hon (takayuki honda)
` (2 preceding siblings ...)
2021-11-22 9:30 ` [ruby-dev:51111] " hon (takayuki honda)
@ 2021-11-24 4:55 ` hsbt (Hiroshi SHIBATA)
3 siblings, 0 replies; 5+ messages in thread
From: hsbt (Hiroshi SHIBATA) @ 2021-11-24 4:55 UTC (permalink / raw)
To: ruby-dev
Issue #18341 has been updated by hsbt (Hiroshi SHIBATA).
Assignee set to usa (Usaku NAKAMURA)
Status changed from Open to Rejected
----------------------------------------
Bug #18341: Visual Studio 2019でRubyを「-MT」でビルドできません。
https://bugs.ruby-lang.org/issues/18341#change-94849
* Author: hon (takayuki honda)
* Status: Rejected
* Priority: Normal
* Assignee: usa (Usaku NAKAMURA)
* ruby -v: ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
* Backport: 2.6: UNKNOWN, 2.7: UNKNOWN, 3.0: UNKNOWN
----------------------------------------
**概要**
VS2019では、"-MD"ならビルドに成功しますが、"-MT"だと失敗します。
VS2015も同様に失敗しましたが、VS2013であれば"-MT"のビルドに成功することを確認しました。
また、2.7.4, 2.5.9, 2.4.10でも同様に失敗することを確認しました。
minirubyのビルドに失敗しているように見えます。
"miniruby -v"は成功しますが、"miniruby 任意のファイル名"を実行すると同様のエラーが発生しました。
**再現手順**
"Developer Command Prompt for VS 2019"を開いて以下を実行しました。
``` text
win32\configure.bat
nmake RUNTIMEFLAG=-MT
```
***実行時のログ***
``` text
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.10.4
** Copyright (c) 2021 Microsoft Corporation
**********************************************************************
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional>cd C:\temp\ruby310dev
C:\temp\ruby310dev>win32\configure.bat
Creating verconf.mk
type `nmake' to make ruby.
C:\temp\ruby310dev>nmake RUNTIMEFLAG=-MT
Microsoft(R) Program Maintenance Utility Version 14.29.30040.0
Copyright (C) Microsoft Corporation. All rights reserved.
Creating config.h
.ext\include\i386-mswin32_140\ruby\config.h updated
Creating config.status
compiling ./main.c
main.c
compiling dmydln.c
~ 省略 ~
compiling ./missing/explicit_bzero.c
explicit_bzero.c
compiling dmyenc.c
dmyenc.c
user32.lib advapi32.lib shell32.lib ws2_32.lib iphlpapi.lib imagehlp.lib shlwapi.lib bcrypt.lib
linking miniruby.exe
ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
./revision.h unchanged
generating encdb.h
.\miniruby.exe: [BUG] Segmentation fault
ruby 3.1.0dev (2021-11-16 master fceaa6886b) [i386-mswin32_140]
-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0003 E:001058 (none) [FINISH]
-- C level backtrace information -------------------------------------------
C:\WINDOWS\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0xc) [0x76F229FC]
C:\WINDOWS\System32\KERNELBASE.dll(WaitForSingleObject+0x12) [0x75AD1082]
C:\temp\ruby310dev\miniruby.exe(rb_print_backtrace+0x2e) [0x00ADE820] C:\temp\ruby310dev\vm_dump.c:778
C:\temp\ruby310dev\miniruby.exe(rb_vm_bugreport+0xd9) [0x00ADE8FB] C:\temp\ruby310dev\vm_dump.c:1048
C:\temp\ruby310dev\miniruby.exe(rb_bug_for_fatal_signal+0x48) [0x00A0217C] C:\temp\ruby310dev\error.c:820
C:\temp\ruby310dev\miniruby.exe(sigsegv+0x31) [0x00A95978] C:\temp\ruby310dev\signal.c:964
C:\temp\ruby310dev\miniruby.exe(_seh_filter_exe+0x145) [0x00B01DDC] minkernel\crts\ucrt\src\appcrt\misc\exception_filter.cpp:219
C:\temp\ruby310dev\miniruby.exe(__scrt_common_main_seh+0x138) [0x00AED2BC] d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:304
C:\temp\ruby310dev\miniruby.exe(_EH4_CallFilterFunc+0x12) [0x00AF0032] d:\agent\_work\4\s\src\vctools\crt\vcruntime\src\eh\i386\exsup4.asm:398
C:\temp\ruby310dev\miniruby.exe(_except_handler4+0x87) [0x00AEF977] d:\agent\_work\4\s\src\vctools\crt\vcruntime\src\eh\i386\chandler4.c:437
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlInterlockedCompareExchange64+0x1e2) [0x76F388E2]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlInterlockedCompareExchange64+0x1b4) [0x76F388B4]
C:\WINDOWS\SYSTEM32\ntdll.dll(KiUserExceptionDispatcher+0x26) [0x76F24EE6]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x1fa) [0x76EF00EA]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlEnterCriticalSection+0x49) [0x76EEFF39]
C:\temp\ruby310dev\miniruby.exe(rb_w32_read+0x71) [0x00AE6BC4] C:\temp\ruby310dev\win32\win32.c:7109
C:\temp\ruby310dev\miniruby.exe(internal_read_func+0x1a) [0x00A20CD0] C:\temp\ruby310dev\io.c:1092
C:\temp\ruby310dev\miniruby.exe(rb_thread_io_blocking_region+0x140) [0x00AB4170] C:\temp\ruby310dev\thread.c:1824
C:\temp\ruby310dev\miniruby.exe(rb_read_internal+0x6b) [0x00A28980] C:\temp\ruby310dev\io.c:1160
C:\temp\ruby310dev\miniruby.exe(io_fillbuf+0x52) [0x00A21517] C:\temp\ruby310dev\io.c:2352
C:\temp\ruby310dev\miniruby.exe(rb_io_getbyte+0xb0) [0x00A25C57] C:\temp\ruby310dev\io.c:4460
C:\temp\ruby310dev\miniruby.exe(load_file_internal+0xa8) [0x00A917FB] C:\temp\ruby310dev\ruby.c:2270
C:\temp\ruby310dev\miniruby.exe(rb_ensure+0x9f) [0x00A0531E] C:\temp\ruby310dev\eval.c:993
C:\temp\ruby310dev\miniruby.exe(load_file+0x38) [0x00A9174E] C:\temp\ruby310dev\ruby.c:2469
C:\temp\ruby310dev\miniruby.exe(process_options+0x944) [0x00A93431] C:\temp\ruby310dev\ruby.c:2093
C:\temp\ruby310dev\miniruby.exe(ruby_process_options+0x78) [0x00A93E9F] C:\temp\ruby310dev\ruby.c:2712
C:\temp\ruby310dev\miniruby.exe(ruby_options+0x88) [0x00A065D7] C:\temp\ruby310dev\eval.c:118
C:\temp\ruby310dev\miniruby.exe(main+0x3a) [0x009C103A] C:\temp\ruby310dev\main.c:47
C:\temp\ruby310dev\miniruby.exe(__scrt_common_main_seh+0xfa) [0x00AED27E] d:\agent\_work\4\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
C:\WINDOWS\System32\KERNEL32.DLL(BaseThreadInitThunk+0x19) [0x75BFFA29]
C:\WINDOWS\SYSTEM32\ntdll.dll(RtlGetAppContainerNamedObjectPath+0x11e) [0x76F17A9E]
-- Other runtime information -----------------------------------------------
* Loaded script: .\miniruby.exe
* Loaded features:
0 enumerator.so
1 thread.rb
2 fiber.so
3 rational.so
4 complex.so
5 ruby2_keywords.rb
NMAKE : fatal error U1077: '.\miniruby.exe' : リターン コード '0x3'
Stop.
```
--
https://bugs.ruby-lang.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-11-24 4:55 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 6:32 [ruby-dev:51108] [Ruby master Bug#18341] Visual Studio 2019でRubyを「-MT」でビルドできません。 hon (takayuki honda)
2021-11-16 12:21 ` [ruby-dev:51109] " xtkoba (Tee KOBAYASHI)
2021-11-22 7:38 ` [ruby-dev:51110] " usa (Usaku NAKAMURA)
2021-11-22 9:30 ` [ruby-dev:51111] " hon (takayuki honda)
2021-11-24 4:55 ` [ruby-dev:51113] " hsbt (Hiroshi SHIBATA)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).