Project

General

Profile

Actions

Bug #21329

closed

`date_core.so` is broken with the recent MSYS2 update

Added by hsbt (Hiroshi SHIBATA) 25 days ago. Updated 3 days ago.

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

Description

From https://github.com/ruby/psych/issues/730 and https://github.com/nobu/rdoc/actions/runs/14969443434/job/42046842539#step:5:35

Error: test_accept_blank_line(RDocMarkupToAnsiTest): LoadError: 127: The specified procedure could not be found.   - D:/a/rdoc/rdoc/vendor/bundle/ruby/3.3.0/gems/date-3.4.1/lib/date_core.so
C:/hostedtoolcache/windows/Ruby/3.3.8/x64/lib/ruby/3.3.0/bundled_gems.rb:69:in `require'

@MSP-Greg investigate that at https://github.com/ruby/setup-msys2-gcc/pull/26#issuecomment-2874726461.

Updated by deivid (David Rodríguez) 24 days ago

Some debugging happening at https://github.com/ruby/date/pull/125 already! Should this be moved to the date repo, by the way?

Updated by hsbt (Hiroshi SHIBATA) 24 days ago

We need to backport fix if the problem is our side. This ticket is reminder for that.

Updated by ntkme (Natsuki Natsume) 23 days ago · Edited

https://github.com/ruby/setup-msys2-gcc/pull/26#issuecomment-2877229861

The root cause is that the extension is compiled against a newer version of libwinpthread-1.dll and headers from msys2, but at the runtime ruby always load $rubyPrefix\bin\ruby_builtin_dlls\libwinpthread-1.dll which is an older version.

I don't think there is much we can do here.

As for ruby/setup-ruby, our plan is to downgrade msys2's libwinpthread-1.dll for all old rubies that bundle the old version of it, so that the compile time version and runtime version would be compatible.

Updated by valture (Takayuki Kamiyama) 20 days ago · Edited

Hello, nice to meet you.

I'm a Windows user.

As for this problem,

in the following folder of msys2 installed by scoop

C:\Users\username\scoop\apps\msys2\current\ucrt64\bin

libwinpthread-1.dll

C:\Users\username\scoop\apps\ruby\current\bin\ruby_builtin_dlls

Overwrite the same file above,

gem uninstall date

gem install date

This can be solved. There is no need to modify anything else.

I'll leave a comment here.

This helped me avoid the build error in my Windows 11 24H2 environment.

※ I use scoop to manage ruby, msys2, etc.

ridk install 1 2 3

※ libwinpthread-1.dll, if not present, install it manually.

I'll share the information.

Reference URL: GitHub/date, issue126

Updated by ntkme (Natsuki Natsume) 14 days ago · Edited

For rubyinstaller2 the issue is fixed with 3.4.4 release, and the fix will be backported to 3.3.9 and 3.2.9 whenever they get released.

For ruby/setup-ruby on windows, workaround has been applied for all older ruby versions that all versions should work.

Updated by hsbt (Hiroshi SHIBATA) 3 days ago

  • Status changed from Open to Closed

There is no action by ruby core side.

Actions

Also available in: Atom PDF

Like0
Like0Like0Like1Like0Like1Like0