Bug #17191
closed3.0.0-preview1 fails to install using BSD make
Description
On OpenBSD (which doesn't use GNU make by default), ./configure
and make
work correctly for 3.0.0-preview1, but make install
fails with:
Downloading bundled gem files...
executable host ruby is required. use --with-baseruby option.
This issue can be worked around by making this change in common.mk, but I'm sure it breaks other cases:
@@ -1296,7 +1296,7 @@ update-config_files: PHONY
config.guess config.sub
refresh-gems: update-bundled_gems prepare-gems
-prepare-gems: update-gems extract-gems
+prepare-gems: extract-gems
update-gems$(gnumake:yes=-nongnumake): PHONY
$(ECHO) Downloading bundled gem files...
There's obviously no need to update gems when installing 3.0.0-preview1 from the tarball as the gems are already included in the tarball.
I think this may be caused by 88f4ebac83a77f933e9da099eabdf05004767de9, and I don't think it affects GNU make. It works correctly in earlier Ruby versions.
Updated by nobu (Nobuyoshi Nakada) over 4 years ago
jeremyevans0 (Jeremy Evans) wrote:
There's obviously no need to update gems when installing 3.0.0-preview1 from the tarball as the gems are already included in the tarball.
This is the point.
I think this may be caused by 88f4ebac83a77f933e9da099eabdf05004767de9, and I don't think it affects GNU make. It works correctly in earlier Ruby versions.
That is just a workaround; update-gems
should be skipped when building from tarballs, even if gem files are not downloaded.
But the difference between them is not obvious.
How about this?
diff --git i/common.mk w/common.mk
index bfad80bc9ba..7e22720d8f1 100644
--- i/common.mk
+++ w/common.mk
@@ -1296,7 +1296,7 @@ update-config_files: PHONY
config.guess config.sub
refresh-gems: update-bundled_gems prepare-gems
-prepare-gems: update-gems extract-gems
+prepare-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=extract-gems)
update-gems$(gnumake:yes=-nongnumake): PHONY
$(ECHO) Downloading bundled gem files...
diff --git i/defs/gmake.mk w/defs/gmake.mk
index 7e9566fee6a..31af44a4f12 100644
--- i/defs/gmake.mk
+++ w/defs/gmake.mk
@@ -246,7 +246,7 @@ HELP_EXTRA_TASKS = \
" update-github: merge master branch and push it to Pull Request [PR=1234]" \
""
-extract-gems: update-gems
+extract-gems: $(HAVE_BASERUBY:yes=update-gems)
BUNDLED_GEMS := $(shell sed '/^[ ]*\#/d;/^[ ]*$$/d;s/[ ][ ]*/-/;s/[ ].*//' $(srcdir)/gems/bundled_gems)
Updated by jeremyevans0 (Jeremy Evans) over 4 years ago
nobu (Nobuyoshi Nakada) wrote in #note-1:
That is just a workaround;
update-gems
should be skipped when building from tarballs, even if gem files are not downloaded.
But the difference between them is not obvious.How about this?
diff --git i/common.mk w/common.mk index bfad80bc9ba..7e22720d8f1 100644 --- i/common.mk +++ w/common.mk @@ -1296,7 +1296,7 @@ update-config_files: PHONY config.guess config.sub refresh-gems: update-bundled_gems prepare-gems -prepare-gems: update-gems extract-gems +prepare-gems: $(HAVE_BASERUBY:yes=update-gems) $(HAVE_BASERUBY:yes=extract-gems) update-gems$(gnumake:yes=-nongnumake): PHONY $(ECHO) Downloading bundled gem files...
I tested this and it works. Thank you! Can you please commit it?
Updated by nobu (Nobuyoshi Nakada) over 4 years ago
- Status changed from Assigned to Closed
Applied in changeset git|a9ff39087092b21059fca046ace9ca87770692a4.
Fixed installation failure [Bug #17191]
Try update and extract bundled gems only when baseruby is
available. It should be done only when installing from
developemental build and not from the tarball, but it is not
obvious to differentiate them.