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

Use of gmake on FreeBSD breaks YJIT builds in MRI 3.3 #2262

Closed
Freaky opened this issue Oct 3, 2023 · 2 comments
Closed

Use of gmake on FreeBSD breaks YJIT builds in MRI 3.3 #2262

Freaky opened this issue Oct 3, 2023 · 2 comments
Labels

Comments

@Freaky
Copy link
Contributor

Freaky commented Oct 3, 2023

Steps to reproduce the behavior

Install ruby-3.3.0-preview2 on FreeBSD with YJIT enabled.

Logs

building Rust YJIT (release mode)
touch yjit/target/release/libyjit.a
partial linking yjit/target/release/libyjit.a into yjit/target/release/libyjit.o
false
gmake: *** [yjit/yjit.mk:49: yjit/target/release/libyjit.o] Error 1

Examining yjit.mk:

# Note, BSD handling is in yjit/not_gmake.mk

ruby-build has this section to select gmake on FreeBSD, referencing a 4 year old bug in Ruby 2.6.5:

    # Workaround for Ruby bug 16331: https://bugs.ruby-lang.org/issues/16331
    # Due to this bug, build will fail with FreeBSD's make after #1368
    # The bug is already fixed in upstream but GNU make is still required
    # when building older releases of Ruby. Use GNU make rather than switching
    # depending of Ruby version.
    export MAKE="gmake"

Removing this results in a successful build. Given this seems fixed in all supported versions of MRI - and BSD make is used by the lang/ruby* ports - it seems a reasonable fix, but anyone still depending on older versions might disagree...

@Freaky Freaky added the bug label Oct 3, 2023
@mislav
Copy link
Member

mislav commented Oct 4, 2023

You're right that the Ruby build bug that was solved by defaulting to gmake on FreeBSD is old in that it only affected Ruby versions 2.6 and 2.7 at the time. Since those Ruby versions are EOL now, and the gmake default is now an impediment to installing Ruby 3.3, I vote that we remove the workaround. Would you submit a PR?

BSD users who need to install older Ruby versions can set MAKE=gmake themselves as necessary.

Ref. #1381

Freaky added a commit to Freaky/ruby-build that referenced this issue Oct 4, 2023
This was set to gmake in rbenv#1381
as a workaround for https://bugs.ruby-lang.org/issues/16331

YJIT builds in Ruby 3.3 previews require the use of BSD make on these
platforms, and no supported version of MRI requires the use of gmake, so
revert this.

JRuby continues to require gmake for jruby-launcher.

Fixes Github issue rbenv#2262
@Freaky
Copy link
Contributor Author

Freaky commented Oct 4, 2023

PR: #2263

@mislav mislav closed this as completed in 4cec390 Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants