Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ruby: update to 3.4.1 #5144

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

jeremyd2019
Copy link
Member

Seems to be behaving itself after I patched the syslog gem. I don't really know what's going on with it, so draft for now.

@jeremyd2019
Copy link
Member Author

jeremyd2019 commented Jan 17, 2025

Weirdnesses:

  1. if a module tries to be disabled in its extconf.rb, it fails with:
../ruby-3.4.1/ext/extmk.rb:279:in 'Array#-': no implicit conversion of nil into Array (TypeError)
        from ../ruby-3.4.1/ext/extmk.rb:279:in 'Object#extmake'
        from ../ruby-3.4.1/ext/extmk.rb:659:in 'block in <main>'
        from ../ruby-3.4.1/ext/extmk.rb:653:in 'Array#each'
        from ../ruby-3.4.1/ext/extmk.rb:653:in '<main>'
  1. syslog module was disabled on cygwin. I patched to turn that on.
  2. win32/resolv module was being disabled on i686 because it wasn't finding GetNetworkParams in libiphlpapi.a. This was due to it not including the header, so it didn't know it was looking for a stdcall function. I have a patch for that, but
  3. apparently random Segmentation fault (core dumped) on i686 during build (tests are fine)
  4. high -j MAKEFLAGS makes this worse, and on x86_64 the mmap thing seems also to happen more with high -j

@jeremyd2019
Copy link
Member Author

on i686 it looks like it's segfauling in system

@jeremyd2019
Copy link
Member Author

Ugh, my patch to fix i686 broke x86_64 (and of course, details of what went wrong are not in the CI log, have to build locally to see what's going on). More work to do here

@jeremyd2019
Copy link
Member Author

jeremyd2019 commented Jan 17, 2025

it builds locally for me now for both i686 and x86_64 (and passes tests), but the build is still unreliable. It worked at -j1 but it still needs to be debugged to see what's going wrong.

@yasuhirokimura
Copy link
Contributor

I tried to build with makepkg -cfLsC but it freezed at check phase as following.

linking shared-library msys-ruby340.dll
linking rubyw.exe
linking ruby.exe
2025-01-19 09:18:22 +0900
Driver is ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-cygwin]
Target is ruby 3.4.1 (2024-12-25 revision 48d4efcb85) +PRISM [x86_64-cygwin]

 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ..............................................................................
 ....................................................F.F.

My build environment is

  • CPU: Intel Core i7 12700 (12 cores)
  • Memory: 96GB
  • Disk: 1TB NVMe SSD
  • OS: Windows 11 2023H2

@jeremyd2019
Copy link
Member Author

Hmm, I've had a lot of issues with the build phase, but check has generally been OK (I've seen a couple of spurious failures in fork/signal tests under load).

@yasuhirokimura
Copy link
Contributor

I also tried makepkg -cfLsC --nocheck and it finished successfully.
Just FYI.

@jeremyd2019
Copy link
Member Author

I added a -j1 on this PR in build() - that seemed to work around the issues I was seeing. -j1 on the check would probably work around the issues there too, but I really need to figure out what's going wrong

@yasuhirokimura
Copy link
Contributor

I added a -j1 on this PR in build() - that seemed to work around the issues I was seeing. -j1 on the check would probably work around the issues there too, but I really need to figure out what's going wrong

I tried with HEAD of your branch. So it means the freeze happened with make -j1.

@jeremyd2019
Copy link
Member Author

I meant adding -j1 to the make test in check(). But like I said, we really need to figure out why it fails with higher -j values.

@yasuhirokimura
Copy link
Contributor

I meant adding -j1 to the make test in check().

Got it. After applying following change check() also finished successfully.

diff --git a/ruby/PKGBUILD b/ruby/PKGBUILD
index 60af4787..1874f3e8 100644
--- a/ruby/PKGBUILD
+++ b/ruby/PKGBUILD
@@ -98,7 +98,7 @@ build() {

 check() {
   cd ${srcdir}/build-${CHOST}
-  make test
+  make -j1 test
 }

 package_ruby() {

But like I said, we really need to figure out why it fails with higher -j values.

Agreed. I don't know the detail of make test at all but it seems like deadlock happens between running tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants