Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

BUILD FAILED (macOS 12.0.1 using ruby-build 20211124) when attempting to install 2.7.5 #1829

Closed
rogerluan opened this issue Nov 30, 2021 · 4 comments

Comments

@rogerluan
Copy link

Downloading ruby-2.7.5.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.5.tar.bz2
Installing ruby-2.7.5...
ruby-build: using readline from homebrew

BUILD FAILED (macOS 12.0.1 using ruby-build 20211124)

Inspect or clean up the working tree at /var/folders/8x/w_jfxbw948jbzc3wx0p_d57h0000gn/T/ruby-build.20211130001953.62995.dK13Q9
Results logged to /var/folders/8x/w_jfxbw948jbzc3wx0p_d57h0000gn/T/ruby-build.20211130001953.62995.log

Last 10 log lines:
In file included from vm.c:350:
./vm_method.c:291:32: warning: cast to smaller integer type 'enum method_optimized_type' from 'void *' [-Wvoid-pointer-to-enum-cast]
            def->body.optimize_type = (enum method_optimized_type)opts;
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 warnings and 1 error generated.
make: *** [vm.o] Error 1
make: *** Waiting for unfinished jobs....
1 warning generated.
1 warning generated.
1 warning generated.

I'm on macOS 12.0.1 on an M1 machine. I tried installing this in a bunch of different ways and the logs change a bit:

$ rbenv install 2.7.5
Downloading openssl-1.1.1l.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1
Installing openssl-1.1.1l...
Installed openssl-1.1.1l to /Users/rogerluan/.rbenv/versions/2.7.5

Downloading ruby-2.7.5.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.5.tar.bz2
Installing ruby-2.7.5...
ruby-build: using readline from homebrew

BUILD FAILED (macOS 12.0.1 using ruby-build 20211124)

Inspect or clean up the working tree at /var/folders/8x/w_jfxbw948jbzc3wx0p_d57h0000gn/T/ruby-build.20211129235418.6807.MV8nGA
Results logged to /var/folders/8x/w_jfxbw948jbzc3wx0p_d57h0000gn/T/ruby-build.20211129235418.6807.log

Last 10 log lines:
make[1]: *** [ext/readline/all] Error 2
make[1]: *** Waiting for unfinished jobs....
compiling date_strptime.c
linking shared-object objspace.bundle
installing default date_core libraries
installing default console libraries
linking shared-object io/console.bundle
linking shared-object nkf.bundle
linking shared-object date_core.bundle
make: *** [build-ext] Error 2

When attempting to install 2.7.4:

image

Again, using arch -86_64 on M1 terminal:

image

Again, on Rosetta Terminal:

image

@mislav
Copy link
Member

mislav commented Nov 30, 2021

Hi, the output you've pasted contains only the last 10 log lines, which doesn't necessarily include the error output. Sometimes, a few last lines are non-fatal warnings. To see the full log, see the Results logged to line. Of course, please don't paste the full log in thread, but you can share them as links to a gist or you can try to isolate the error yourself and paste it here. Thanks!

@rogerluan
Copy link
Author

Thanks for the heads up @mislav ! Here's one of them:

readline.c:1904:37: error: use of undeclared identifier 'username_completion_function'; did you mean 'rl_username_completion_function'?
                                    rl_username_completion_function);
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                    rl_username_completion_function
readline.c:79:42: note: expanded from macro 'rl_username_completion_function'
# define rl_username_completion_function username_completion_function
                                         ^
/usr/local/opt/readline/include/readline/readline.h:485:14: note: 'rl_username_completion_function' declared here
extern char *rl_username_completion_function PARAMS((const char *, int));
             ^
compiling console.c
1 error generated.
make[2]: *** [readline.o] Error 1
make[1]: *** [ext/readline/all] Error 2

@rogerluan
Copy link
Author

rogerluan commented Nov 30, 2021

Now that I have the proper error I was able to spot an open issue with the same error: #1691

Should I close this issue? Do you know what's the current status of this issue? 🙇 Thanks in advance!

@rogerluan
Copy link
Author

I was able to solve my problem! Solution here: #1691 (comment)

Thanks for your help @mislav 🙏

@rbenv rbenv locked and limited conversation to collaborators Dec 26, 2021
@hsbt hsbt converted this issue into discussion #1855 Dec 26, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants