oracle / truffleruby

A high performance implementation of the Ruby programming language, built on GraalVM.
https://www.graalvm.org/ruby/
Other
2.98k stars 180 forks source link

Unable to install truffleruby+graalvm-21.3.0 & 21.0.0 #3515

Closed metaforte closed 3 months ago

metaforte commented 3 months ago

I am using Mac (M2) (macOS 14.2.1 on arm64 using ruby-build 20240119)

I updated xcode and xcode command line tools before running the installation.

I am facing errors with installation and tried to fix dependencies and rerun the installation

Here are my observations when I try to install truffleruby

  1. Everytime I run rbenv install truffleruby+graalvm-21.0.0, it repeatedly downloads 330MB file. Is it possible to avoid duplicate duplicate downloads ? ==> Downloading graalvm-ce-java8-darwin-amd64-21.0.0.tar.gz... -> curl -q -fL -o truffleruby+graalvm-21.0.0.tar.gz https://dqw8nmjcqpjn7.cloudfront.net/9192d8370b544c0efd36ef744f5933bd2d694d0cc9cb5e7f53d3b7e58f433b3e 100 333M 100 333M 0 0 8563k 0 0:00:39 0:00:39 --:--:-- 8907k

  2. Unable to install graalvm-21.3.0 rbenv install truffleruby+graalvm-21.3.0 Unsupported platform: Darwin-arm64 BUILD FAILED (macOS 14.2.1 on arm64 using ruby-build 20240119)

  3. Build failed even though I have all dependencies.

    
    $ rbenv install truffleruby+graalvm-21.0.0

openssl_missing.c:104:13: error: incomplete definition of type 'struct X509_req_st'

openssl_missing.c:90:13: error: incomplete definition of type 'struct X509_crl_st'

openssl_missing.c:65:36: error: invalid application of 'sizeof' to an incomplete type 'HMAC_CTX' (aka 'struct hmac_ctx_st')



I found some hints about the above errors on github. I am a bit sceptical abit following random advice on internet.
Would you be able publish any notes on how to fix these?
eregon commented 3 months ago

21.0.0 and 21.3.0 are quite old, is there a reason you are trying these old versions specifically? Could you try with the latest release (24.0.0)?

Regarding 1. that would be a question for ruby-build. I think there is no way currently, it's expected that to install a Ruby you need to download it (and if it installs fine then just need to download it once per machine).

eregon commented 3 months ago

Re 2. the error is right there:

Unsupported platform: Darwin-arm64

21.3.0 does not support Darwin-arm64. It's since 22.2: https://github.com/oracle/truffleruby/blob/master/CHANGELOG.md#2220

metaforte commented 3 months ago

I was not aware of 22.3.0 I tried rbenv install truffleruby+graalvm-22.3.0 and it completed successfully.

metaforte commented 3 months ago

the ruby Releaes page has links to various files.

could you please advise what is the difference between truffleruby-24.0.0-macos-aarch64.tar.gz and truffleruby-community-24.0.0-macos-amd64.tar.gz and truffleruby-jvm-24.0.0-macos-aarch64.tar.gz

Reg 24.0.0 version:

This : rbenv install truffleruby+graalvm-24.0.0 does not seem to work yet.

It also does not appear in


rbenv install -l
3.0.6
3.1.4
3.2.3
3.3.0
jruby-9.4.5.0
mruby-3.2.0
picoruby-3.0.0
truffleruby-23.1.2
truffleruby+graalvm-23.1.2
eregon commented 3 months ago

could you please advise what is the difference between truffleruby-24.0.0-macos-aarch64.tar.gz and truffleruby-community-24.0.0-macos-amd64.tar.gz and truffleruby-jvm-24.0.0-macos-aarch64.tar.gz

It should be clear with the docs linked there: https://github.com/oracle/truffleruby/blob/master/doc/user/installing-truffleruby.md aarch64 is also known as arm64/M1/etc, and amd64 as x86_64.

This : rbenv install truffleruby+graalvm-24.0.0 does not seem to work yet.

It also does not appear in

You should update ruby-build then, see https://github.com/oracle/truffleruby/blob/master/doc/user/ruby-managers.md#ruby-build-and-rbenv and https://github.com/rbenv/ruby-build?tab=readme-ov-file#clone-as-rbenv-plugin-using-git