Bug #22627
closedBuild system fails to fresh-install Ruby 3.4.13 on the brand new system due to missing "BASERUBY".
Description
Unable to "clean compile" Ruby on a freshly minimally-installed system. That defeates the purpose of "clean" installation. By definition, I'm going through the installation steps because I want to have Ruby on the system that does not currently have it.
Steps To Reproduce¶
Steps to reproduce the bug:
- Start on a freshly installed
FreeBSD 15.x. Make sure necessarily tools (make, etc.) are either already present. fetch "https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.13.tar.gz"tar -mxvzf ruby-3.4.13.tar.gzcd ruby-3.4.13./configure --prefix=/usr/local
[...................]
config.status: creating Makefile
---
Configuration summary for ruby version 3.4.13
* Installation prefix: /usr/local
* exec prefix: ${prefix}
* arch: x86_64-freebsd15.0
* site arch: ${arch}
* RUBY_BASE_NAME: ruby
* ruby lib prefix: ${libdir}/${RUBY_BASE_NAME}
* site libraries path: ${rubylibprefix}/${sitearch}
* vendor path: ${rubylibprefix}/vendor_ruby
* target OS: freebsd15.0
* compiler: clang
* with thread: pthread
* with coroutine: amd64
* with modular GC: no
* enable shared libs: no
* dynamic library ext: so
* CFLAGS: ${hardenflags} -fdeclspec ${optflags} \
${debugflags} ${warnflags}
* LDFLAGS: -L. -fstack-protector-strong -rdynamic
* DLDFLAGS: -Wl,--compress-debug-sections=zlib -Wl,-soname,$@
* optflags: -O3 -fno-fast-math
* debugflags: -ggdb3
* warnflags: -Wall -Wextra -Wextra-tokens \
-Wdeprecated-declarations -Wdivision-by-zero \
-Wdiv-by-zero -Wimplicit-function-declaration \
-Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 \
-Wwrite-strings -Wold-style-definition \
-Wmissing-noreturn -Wno-cast-function-type \
-Wno-constant-logical-operand -Wno-long-long \
-Wno-missing-field-initializers \
-Wno-overlength-strings -Wno-parentheses-equality \
-Wno-self-assign -Wno-tautological-compare \
-Wno-unused-parameter -Wno-unused-value \
-Wunused-variable -Wmisleading-indentation -Wundef
* hardenflags: -fstack-protector-strong -U_FORTIFY_SOURCE \
-D_FORTIFY_SOURCE=2
* strip command: llvm-strip -S -x
* install doc: rdoc
* YJIT support: no
* RJIT support: yes
* man page type: doc
---
make
(for whatever reasons, it goes through the configuration detection again, but OK, I can wait...)
configure: creating ./config.status
---
Configuration summary for ruby version 3.4.13
* Installation prefix: /usr/local
* exec prefix: ${prefix}
* arch: x86_64-freebsd15.0
* site arch: ${arch}
* RUBY_BASE_NAME: ruby
* ruby lib prefix: ${libdir}/${RUBY_BASE_NAME}
* site libraries path: ${rubylibprefix}/${sitearch}
* vendor path: ${rubylibprefix}/vendor_ruby
* target OS: freebsd15.0
* compiler: clang
* with thread: pthread
* with coroutine: amd64
* with modular GC: no
* enable shared libs: no
* dynamic library ext: so
* CFLAGS: ${hardenflags} -fdeclspec ${optflags} \
${debugflags} ${warnflags}
* LDFLAGS: -L. -fstack-protector-strong -rdynamic
* DLDFLAGS: -Wl,--compress-debug-sections=zlib -Wl,-soname,$@
* optflags: -O3 -fno-fast-math
* debugflags: -ggdb3
* warnflags: -Wall -Wextra -Wextra-tokens \
-Wdeprecated-declarations -Wdivision-by-zero \
-Wdiv-by-zero -Wimplicit-function-declaration \
-Wimplicit-int -Wpointer-arith -Wshorten-64-to-32 \
-Wwrite-strings -Wold-style-definition \
-Wmissing-noreturn -Wno-cast-function-type \
-Wno-constant-logical-operand -Wno-long-long \
-Wno-missing-field-initializers \
-Wno-overlength-strings -Wno-parentheses-equality \
-Wno-self-assign -Wno-tautological-compare \
-Wno-unused-parameter -Wno-unused-value \
-Wunused-variable -Wmisleading-indentation -Wundef
* hardenflags: -fstack-protector-strong -U_FORTIFY_SOURCE \
-D_FORTIFY_SOURCE=2
* strip command: llvm-strip -S -x
* install doc: rdoc
* YJIT support: no
* RJIT support: yes
* man page type: doc
---
(ACTUAL compilation finallly starts:)
MAKE=make /bin/sh ./config.status Makefile
config.status: creating Makefile
Makefile unchanged
compiling ./main.c
compiling dmydln.c
generating id.h
executable host ruby is required. use --with-baseruby option.
Note that BASERUBY must be Ruby 3.0.0 or later.
*** Error code 1
make: *** id.h removed
Expected Behavior¶
Compilation should proceed. As I mentioned, it is a fresh system, it does not have a "prior" Ruby. The system is not connected to the Internet, so bringing in older version of Ruby is not an option, the compilation process needs to be self-contained.
Updated by wesha (Wesha the Leopard) 6 days ago
- Subject changed from Build system fails to fersh-install Ruby 3.4.13 on the brand new system due to missing "BASERUBY". to Build system fails to fresh-install Ruby 3.4.13 on the brand new system due to missing "BASERUBY".
Updated by hsbt (Hiroshi SHIBATA) 5 days ago
This is caused by the -m option of tar. It doesn't restore the modification times stored in the tarball, so bundled generated files such as id.h end up older than their sources (template/id.h.tmpl, tool/generic_erb.rb), and make tries to regenerate them with BASERUBY. The second configure run has the same cause, since configure becomes older than tool/m4/*.m4. Extracting with tar -xzf ruby-3.4.13.tar.gz (without -m) needs no BASERUBY.
Updated by nobu (Nobuyoshi Nakada) 5 days ago
- Status changed from Open to Rejected