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

Support installing with ruby-build, ruby-install, RVM #1062

Closed
chrisseaton opened this issue Feb 3, 2018 · 23 comments
Closed

Support installing with ruby-build, ruby-install, RVM #1062

chrisseaton opened this issue Feb 3, 2018 · 23 comments
Assignees
Milestone

Comments

@chrisseaton
Copy link
Collaborator

rbenv, chruby and RVM are supported, documented and tested, but you need to download GraalVM manually. We'd like them to be able to download TruffleRuby for you as well.

@ylluminate
Copy link

So what happened with the legal team and being able to get everything via rvm install truffle? Or are we going to have to go through a Y/N gate to accept the license? Honestly I'm fine with the latter route if necessary, but I know you really wanted to get the easier legal team acceptance buy-in...

@chrisseaton
Copy link
Collaborator Author

For the moment you need to accept the licence and download from OTN, that's right. We're still working on being able to install via wget or equivalent.

@ylluminate
Copy link

Huh, so they still won't even let you pull it in with wget via OTN via a Y/N gate until they get their ducks in a row?

Ie, for the oracle-java8-installer Ubuntu package (sudo apt-get install oracle-java8-installer), it spews up the license and you have to accept or decline it. I figure that this would be something that could be done right away while still waiting on the legal guys in order to keep it all in the shell and keep everything tightly reproducible...

@chrisseaton
Copy link
Collaborator Author

I'm not sure wget and so on have any mechanism for displaying a prompt to the user. Even if they did I don't think ruby-build and so on are designed to show an interactive interface that wget would want to show.

@pkuczynski
Copy link

pkuczynski commented Feb 5, 2018

RVM team is happy to add truffleruby to the supported interpreters. If I understand correctly, we would have to download GraalVM from http://www.oracle.com/technetwork/oracle-labs/program-languages/downloads/index.html after the user accepts OTN license (http://www.oracle.com/technetwork/licenses/early-adopter-license-2299792.html). Correct?

@chrisseaton
Copy link
Collaborator Author

Thanks very much for the offer!

Yes the problem is currently that the GraalVM is only available via a click-through licence on the OTN. At some point we hope to provide a download that doesn't need any kind of click-through.

But this is a bit tricky - as the project lead, working for Oracle, I'm not looking for ways to work around this licence requirement. The issue was opened in your GitHub by a third party, @ylluminate, who's got great intentions in trying to get us into RVM, and we really appreciate it! But we're not looking to provide some kind of workaround for the click-through at the moment. I'm not sure there is any way to signal acceptance of the click-through for a non-interactive download, and even if there was it's not what I would encourage - that's not the intent of the OTN click-through.

Sorry to be awkward! We hope to provide a simple non-click-through licence at some point at which point we can just plug that URL into RVM with your help.

@fniephaus
Copy link
Member

@pkuczynski There's also the option to build a GraalVM from scratch on the user's machine: All you need is to clone mx and graal-jvmci-8. Then, running mx build in the graal-jvmci-8 root will build the VM minus some closed-source performance optimizations...that's what I've done to automate things for my Truffle language.

@eregon
Copy link
Member

eregon commented Feb 5, 2018

@fniephaus The tricky bit with that approach is getting a correct base JDK on macOS. For Linux there is https://github.com/dougxc/openjdk8-jvmci-builder (There are some concerns some of it might be Ubuntu-specific though). Building JVMCI takes a while also. Using AdoptOpenJDK for base JDKs might be one option (they have builds for macOS too).

FWIW https://github.com/oracle/truffleruby/blob/master/tool/make-distribution.sh can already make a full distribution including JVMCI, Graal, TruffleRuby and Sulong on Linux.
But those are not tested, so we'd rather wait to have a proper downloadable release, hopefully soon.

@chrisseaton
Copy link
Collaborator Author

@pkuczynski
Copy link

Having a precompiled binaries for all platforms would be ideal. Much faster installation on the end-user machine. I can make an attempt to install from sources, which can be used to always install truffleruby-head so this work would not go to trash anyway. Unless you don't want me to do that?

@pkuczynski
Copy link

@mpapis your thoughts on this topic?

@ylluminate
Copy link

@chrisseaton so first I guess I have to ask, what's the difference between using lynx or firefox to download GraalVM? If I can use lynx or a text based variant to do this (which I can), then the battle is effectively won:

lynx

So, since a Y/N license acceptance gate (specifically "Accept License Agreement / Decline License Agreement" as per above and on the site) is seemingly the primary goal for Oracle legal (not even display of the license; although a key could be bound for that), then wouldn't a shell based function that performs the exact same function ON the OTN page be in keeping with the OTN's intention?

To me looking at this from the vantage point of "what's the real difference between lynx and Firefox to a user and OTN since it does the same thing for both parties?" solves the entire issue. The debate or questioning / worrying becomes kinda moot and we should just do it this way because there is quite literally no difference here for both the user and for Oracle in that precisely the same thing is being accomplished...

We could effectively build an "OTN only browser" (sounds fancy this way) that makes it simple for the user by predefining current architecture (Linux, Mac OS X - not seeing Windows) and then making a: Y trigger "Accept License Agreement", N trigger "Decline License Agreement" and then exit RVM (or whichever Ruby mgmt tool) and a D to display the OTN License Agreement. Then the build / install process continues and everything becomes nice and cohesive (and predictable and fast).

@mpapis
Copy link
Contributor

mpapis commented Feb 5, 2018

Maybe for the time being RVM could open browser with the proper link to accept the license and download the file, after that we would ask for the path of the newly downloaded file - of course this solves only problem for machines with graphical interface, it would not work on text only machines, but this would allow us to setup most of the process and when there is some compromise on the license - we could simplify the flow.

@pkuczynski
Copy link

Manual download is cumbersome. I would prefer something more user-friendly and at least build from source, as we do it for other rubies.

@chrisseaton
Copy link
Collaborator Author

I really appreciate everyone's enthusiasm and offers for help, but there's several complex issues here with any approach at the moment. I think we're better off waiting until we simply have a non-click through download, rather than doing work that hopefully won't be needed soon.

@pkuczynski
Copy link

Fair enough. Your project, your call :) Do you have ETA for this?

@ylluminate
Copy link

(Good question @pkuczynski. I've seen "soon" be the death knell for some projects in the past as far as public interest goes.)

@chrisseaton
Copy link
Collaborator Author

I'll suggest something else if it doesn't happen in a couple of months.

@chrisseaton
Copy link
Collaborator Author

More documentation soon, but you can now install TruffleRuby without a click-through, so that's some progress.

$ wget https://github.com/oracle/graal/releases/download/vm-1.0.0-rc1/graalvm-ce-1.0.0-rc1-linux-amd64.tar.gz
$ tar -zxf graalvm-ce-1.0.0-rc1-linux-amd64.tar.gz
$ export PATH=graalvm-1.0.0-rc1/bin:$PATH
$ gu install -c org.graalvm.ruby
$ ruby --version
truffleruby 1.0.0-rc1, like ruby 2.3.7 <native build with Graal> [x86_64-linux]

@eregon
Copy link
Member

eregon commented Jun 17, 2018

I created PRs to ruby-install, ruby-build and RVM:

Those install a fully open-source version of TruffleRuby, corresponding to a subset of the Community Edition of GraalVM (see http://www.graalvm.org/downloads/). It's packed as a single archive (of around 42MB) to minimize the setup and make it more reliable to install truffleruby.
It's available for both Linux x86_64 and macOS x86_64.

@eregon
Copy link
Member

eregon commented Jul 13, 2018

I declare this issued solved! 🎉

All 3 pull requests have been merged in RVM, rbenv and ruby-install.
The process to install TruffleRuby is now documented in https://github.com/oracle/truffleruby/blob/master/doc/user/ruby-managers.md#installing-truffleruby-with-rvm-ruby-build-or-ruby-install and linked from the README.

They should all work out of the box. If you have problems installing TruffleRuby, please file an issue.

@eregon eregon closed this as completed Jul 13, 2018
@eregon eregon mentioned this issue Aug 16, 2018
7 tasks
@ioquatix
Copy link
Contributor

Awesome, does it work on travis-ci yet?

@eregon
Copy link
Member

eregon commented Aug 16, 2018

@ioquatix Yes, but it needs some install commands, see the README which links to https://github.com/oracle/truffleruby/blob/master/doc/user/standalone-distribution.md#testing-truffleruby-in-travisci

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

No branches or pull requests

7 participants