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

fails building ruby 3.1.0 #244

Open
noraj opened this issue Dec 26, 2021 · 1 comment
Open

fails building ruby 3.1.0 #244

noraj opened this issue Dec 26, 2021 · 1 comment

Comments

@noraj
Copy link

noraj commented Dec 26, 2021

Description

Building MRI 3.1.0 fails

$ asdf install ruby 3.1.0
Downloading ruby-3.1.0.tar.gz...
-> https://cache.ruby-lang.org/pub/ruby/3.1/ruby-3.1.0.tar.gz
Installing ruby-3.1.0...

BUILD FAILED (Arch Linux using ruby-build 20211225)

Inspect or clean up the working tree at /tmp/ruby-build.20211226205225.15895.kKdnTA
Results logged to /tmp/ruby-build.20211226205225.15895.log

Last 10 log lines:
        LC_ALL =
        LC_CTYPE = fr_FR.UTF-8
        MFLAGS =
gcc (GCC) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

./ruby: error while loading shared libraries: libruby.so.3.1: cannot open shared object file: No such file or directory
make: *** [uncommon.mk:1191: revision.tmp] Error 127

Here are the full build logs: http://ix.io/3JBg

Environment

$ asdf --version
v0.9.0-9ee24a3

$ openssl version                                                                                                                                                                                                                          
OpenSSL 1.1.1m  14 Dec 2021

$ gcc --version                                                                                                                                                                                                                            
gcc (GCC) 11.1.0

$ make --version                                                                                                                                                                                                                           
GNU Make 4.3

Related issues

@mpalmer
Copy link

mpalmer commented May 24, 2022

Based on a comment on rbenv/ruby-build#1875, I've narrowed the cause of this specific problem down to being a problem when asdf is activated and the global version of ruby is system. In order words, these scenarios work fine:

  • asdf not activated (that is, which ruby outputs /usr/bin/ruby), although you need to have put ~/.asdf/bin in your PATH manually otherwise a later install step fails
  • asdf activated, with the asdf-global version of ruby set to an asdf-installed ruby version (eg asdf global ruby 2.7.4)
  • asdf activated, with the version of ruby being used overridden with ASDF_RUBY_VERSION, eg ASDF_RUBY_VERSION=2.7.4 asdf install ruby 3.0.3

This scenario causes the problem described in the initial report:

  • asdf activated, with the asdf-global version of ruby set to system

Hopefully this extra info helps someone to narrow down the cause of the problem.

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

No branches or pull requests

2 participants