Project

General

Profile

Actions

Bug #21801

open

compile failed at 4.0.0 preview 3 and snapshot issue

Bug #21801: compile failed at 4.0.0 preview 3 and snapshot issue

Added by darkspy (gerty ken) about 18 hours ago. Updated about 6 hours ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:124344]

Description

compiling x64-msvcrt-ruby400.res.o
creating verconf.h
verconf.h updated
compiling loadpath.c
linking static-library libx64-msvcrt-ruby400-static.a
generating x64-msvcrt-ruby400.def
linking shared-library x64-msvcrt-ruby400.dll
generating makefiles ext/configure-ext.mk
d:/prog/snapshot-master/tool/lib/output.rb:55: [BUG] rb_maygvl_fd_fix_cloexec: fcntl(3, F_GETFD) failed: Bad file descriptor
ruby 4.0.0dev (2025-12-22 master d0ec60dc7b) +PRISM [x64-mingw32]

-- Control frame information -----------------------------------------------
c:0004 p:---- s:0034 e:000033 l:y b:---- CFUNC  :binwrite
c:0003 p:0162 s:0028 e:000027 l:y b:0001 METHOD d:/prog/snapshot-master/tool/lib/output.rb:55
c:0002 p:0107 s:0012 E:000310 l:n b:---- EVAL   ./tool/generic_erb.rb:35 [FINISH]
c:0001 p:0000 s:0003 E:001080 l:y b:---- DUMMY  [FINISH]

-- Ruby level backtrace information ----------------------------------------
./tool/generic_erb.rb:35:in '<main>'
d:/prog/snapshot-master/tool/lib/output.rb:55:in 'write'
d:/prog/snapshot-master/tool/lib/output.rb:55:in 'binwrite'

-- Threading information ---------------------------------------------------
Total ractor count: 1
Ruby thread count for this ractor: 1

-- C level backtrace information -------------------------------------------
C:\Windows\SYSTEM32\ntdll.dll(NtWaitForSingleObject+0x14) [0x00007FFA4A22E9C4]
C:\Windows\System32\KERNELBASE.dll(WaitForSingleObjectEx+0x8e) [0x00007FFA47C3E3CE]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0xc2dbb) [0x00000000006F0348]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0xc30a8) [0x00000000006F0635]
 [0x00000000004CE67C]
 [0x00000000004CE6FA]
 [0x0000000000514400]
 [0x0000000000514581]
 [0x000000000051FBAC]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0x47f73) [0x0000000000675500]
 [0x000000000051FBE5]
 [0x000000000051FC77]
 [0x000000000052028F]
 [0x0000000000521927]
 [0x00000000005219C5]
 [0x00000000005271F0]
 [0x0000000000527A16]
 [0x0000000000527B49]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0x8f136) [0x00000000006BC6C3]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0x8fe42) [0x00000000006BD3CF]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0x900b5) [0x00000000006BD642]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0x901f0) [0x00000000006BD77D]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0x90646) [0x00000000006BDBD3]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0x930f1) [0x00000000006C067E]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0x93b76) [0x00000000006C1103]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0x93d51) [0x00000000006C12DE]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0x963d3) [0x00000000006C3960]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0x9e1e8) [0x00000000006CB775]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0xb5eff) [0x00000000006E348C]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0xb5e35) [0x00000000006E33C2]
d:\prog\snapshot-master\miniruby.exe(rb_obj_shape_id+0xb6a6e) [0x00000000006E3FFB]
 [0x00000000004D924D]
 [0x00000000004D93C0]
 [0x0000000000401597]
 [0x00000000004015F8]
 [0x00000000004015B4]
 [0x000000000040140F]
 [0x000000000040154B]
C:\Windows\System32\KERNEL32.DLL(BaseThreadInitThunk+0x10) [0x00007FFA498B4ED0]

-- Other runtime information -----------------------------------------------

* Loaded script: ./tool/generic_erb.rb

* Ruby Box: disabled
* Loaded features:

    0 enumerator.so
    1 thread.rb
    2 fiber.so
    3 rational.so
    4 complex.so
    5 pathname.so
    6 ruby2_keywords.rb
    7 set.rb
    8 d:/prog/snapshot-master/lib/erb/version.rb
    9 d:/prog/snapshot-master/lib/erb/compiler.rb
   10 d:/prog/snapshot-master/lib/erb/def_method.rb
   11 d:/prog/snapshot-master/lib/cgi/escape.rb
   12 d:/prog/snapshot-master/lib/erb/util.rb
   13 d:/prog/snapshot-master/lib/erb.rb
   14 d:/prog/snapshot-master/lib/optparse.rb
   15 d:/prog/snapshot-master/tool/lib/vpath.rb
   16 d:/prog/snapshot-master/tool/lib/colorize.rb
   17 d:/prog/snapshot-master/tool/lib/output.rb

d:/prog/snapshot-master/tool/lib/output.rb:55: [BUG] Aborted
ruby 4.0.0dev (2025-12-22 master d0ec60dc7b) +PRISM [x64-mingw32]

Crashed while printing bug report
make: *** [ext/configure-ext.mk] Error 3
make: *** Deleting file `ext/configure-ext.mk'
rm x64-msvcrt-ruby400.rc

use miniruby or set it to other released version ruby as "--with-baseruby" option or "BOOTSTRAPRUBY"
is same error occur.

if use miniruby at use tool/mkconfig.rb or generate ext/configure-ext.mk would have chance to occur: Errno::EBADF error

at 4.0.0-preview2 was compiled OK.

ENV:
windows 10~11
msys 1.0 && gcc 7 ~ 12 for test
the environment and toolchain is nothing wrong because i compiled 3.1 to 4.0 preview 2 in this environment.

Updated by nobu (Nobuyoshi Nakada) about 16 hours ago Actions #1

  • Description updated (diff)

Updated by nobu (Nobuyoshi Nakada) about 16 hours ago Actions #2 [ruby-core:124345]

darkspy (gerty ken) wrote:

ENV:
windows 10~11
msys 1.0 && gcc 7 ~ 12 for test
the environment and toolchain is nothing wrong because i compiled 3.1 to 4.0 preview 2 in this environment.

Are you really using msys 1.0?

Updated by darkspy (gerty ken) about 6 hours ago Actions #3 [ruby-core:124346]

nobu (Nobuyoshi Nakada) wrote in #note-2:

darkspy (gerty ken) wrote:

ENV:
windows 10~11
msys 1.0 && gcc 7 ~ 12 for test
the environment and toolchain is nothing wrong because i compiled 3.1 to 4.0 preview 2 in this environment.

Are you really using msys 1.0?

yep like for 8 years compiling ruby using msys 1.0 + winlib / mingw64. until 4.0 preview2 were fine

Actions

Also available in: PDF Atom