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

ruby-install ruby fails when there's not an existing Ruby interpreter on the system #372

Open
judofyr opened this issue Jun 6, 2020 · 3 comments
Labels

Comments

@judofyr
Copy link

judofyr commented Jun 6, 2020

I just got this error:

[tons of lines]
>>> Installing ruby 2.7.1 ...
	BASERUBY = echo executable host ruby is required.  use --with-baseruby option.; false
	CC = gcc
	LD = ld
	LDSHARED = gcc -shared
	CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wdeprecated-declarations -Wduplicated-cond -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -Wpointer-arith -Wwrite-strings -Wimplicit-fallthrough=0 -Wmissing-noreturn -Wno-cast-function-type -Wno-constant-logical-operand -Wno-long-long -Wno-missing-field-initializers -Wno-overlength-strings -Wno-packed-bitfield-compat -Wno-parentheses-equality -Wno-self-assign -Wno-tautological-compare -Wno-unused-parameter -Wno-unused-value -Wsuggest-attribute=format -Wsuggest-attribute=noreturn -Wunused-variable -std=gnu99
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE -DCANONICALIZATION_FOR_MATHN -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/12.1.0
	CPPFLAGS =
	DLDFLAGS = -Wl,--compress-debug-sections=zlib -fstack-protector-strong -pie
	SOLIBS = -lz -lpthread -lrt -lrt -ldl -lcrypt -lm
	LANG =
	LC_ALL =
	LC_CTYPE =
	MFLAGS =
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
Copyright (C) 2017 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.

generating id.h
executable host ruby is required. use --with-baseruby option.
uncommon.mk:1055: recipe for target 'id.h' failed

I found some old forum post which suggests that the issue is that we're cleaning before compiling, and the cleanup deletes files which are needed for the compilation:

configure_ruby || fail "Configuration of $ruby $ruby_version failed!"
clean_ruby || fail "Cleaning $ruby $ruby_version failed!"
compile_ruby || fail "Compiling $ruby $ruby_version failed!"
install_ruby || fail "Installation of $ruby $ruby_version failed!"
post_install || fail "Post-install tasks failed!"

Is it possible for the cleanup step to be moved further down? Maybe even after the install step?

@postmodern
Copy link
Owner

We could remove the clean step entirely and just hope that ./configure and the Makefile are smart enough to regenerate any pre-existing artifacts?

@judofyr
Copy link
Author

judofyr commented Oct 8, 2020

Ah, so the purpose of the clean step is to handle the case where you've tried to compile it once and you're trying again? Then it will use the same directory?

if so, maybe it's better to remove the cleaning step and instead support --clean which will re-download. Seems like a more sensible "clean" operation than make clean.

@postmodern
Copy link
Owner

postmodern commented Oct 8, 2020

@judofyr could you do a quick test in your environment to whether make clean is the culprit? That forum post mentioned make distclean which is different. If make clean is being problematic, then it will need to be removed.

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

No branches or pull requests

3 participants