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

Set default MAKE=make on FreeBSD #2263

Merged
merged 2 commits into from
Oct 11, 2023
Merged

Set default MAKE=make on FreeBSD #2263

merged 2 commits into from
Oct 11, 2023

Conversation

Freaky
Copy link
Contributor

@Freaky Freaky commented Oct 4, 2023

This was set to gmake in #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.

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

Tested on FreeBSD 13.2-RELEASE with 2.7.8, 3.0.4, 3.1.4, 3.2.2, 3.3.0-preview2, and jruby-9.4.3.0.

@mislav
Copy link
Member

mislav commented Oct 4, 2023

JRuby continues to require gmake for jruby-launcher.

Where is a make step for JRuby? I don't see one

ruby-build/bin/ruby-build

Lines 738 to 757 in 27a5309

build_package_jruby() {
build_package_copy
cd "${PREFIX_PATH}/bin"
ln -fs jruby ruby
chmod +x ruby
install_jruby_launcher
remove_windows_files
fix_jruby_shebangs
}
install_jruby_launcher() {
cd "${PREFIX_PATH}/bin"
# workaround for https://github.com/jruby/jruby/issues/7799
local jruby_version
jruby_version="$(./ruby -e 'puts JRUBY_VERSION' 2>/dev/null)"
[[ $jruby_version != "9.2."* ]] ||
./ruby gem update -q --silent --system 3.3.26 --no-document --no-post-install-message >&4 2>&1
{ ./ruby gem install jruby-launcher
} >&4 2>&1
}

Is it during the ./ruby gem install jruby-launcher step?

@Freaky
Copy link
Contributor Author

Freaky commented Oct 4, 2023

Yep.

["make", "DESTDIR=", "sitearchdir=./.gem.20231004-19975-8k1dq3", "sitelibdir=./.gem.20231004-19975-8k1dq3", "clean"]
make: "/home/freaky/.rbenv/versions/jruby-9.4.3.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java/Makefile" line 10: Invalid line type
make: "/home/freaky/.rbenv/versions/jruby-9.4.3.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java/Makefile" line 12: Invalid line type
make: "/home/freaky/.rbenv/versions/jruby-9.4.3.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java/Makefile" line 14: Invalid line type
make: "/home/freaky/.rbenv/versions/jruby-9.4.3.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java/Makefile" line 105: Invalid line type
make: "/home/freaky/.rbenv/versions/jruby-9.4.3.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java/Makefile" line 107: Invalid line type
make: "/home/freaky/.rbenv/versions/jruby-9.4.3.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java/Makefile" line 110: Invalid line type
make: "/home/freaky/.rbenv/versions/jruby-9.4.3.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java/Makefile" line 116: Invalid line type
make: "/home/freaky/.rbenv/versions/jruby-9.4.3.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java/Makefile" line 119: Invalid line type
make: "/home/freaky/.rbenv/versions/jruby-9.4.3.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java/Makefile" line 121: Invalid line type
make: "/home/freaky/.rbenv/versions/jruby-9.4.3.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java/Makefile" line 123: Invalid line type
make: "/home/freaky/.rbenv/versions/jruby-9.4.3.0/lib/ruby/gems/shared/gems/jruby-launcher-1.1.19-java/Makefile" line 125: Invalid line type
make: Fatal errors encountered -- cannot continue

@eregon
Copy link
Member

eregon commented Oct 4, 2023

YJIT builds in Ruby 3.3 previews require the use of BSD make on these platforms

Interesting, do you know why gmake doesn't work in that case?

@Freaky
Copy link
Contributor Author

Freaky commented Oct 4, 2023

YJIT builds in Ruby 3.3 previews require the use of BSD make on these platforms

Interesting, do you know why gmake doesn't work in that case?

There are only Linux and Darwin paths for linking on the GNU side.

The non-GNU rules appear to be equivalent to the Linux path so I'm not sure why the author chose to put in the comment instead of extending the conditional. Doing that certainly appears to work...

@Freaky
Copy link
Contributor Author

Freaky commented Oct 5, 2023

I submitted a fix upstream.

@mislav mislav merged commit 4cec390 into rbenv:master Oct 11, 2023
4 checks passed
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.

3 participants