Issue #12677 has been reported by Vit Ondruch.

----------------------------------------
Bug #12677: Ruby fails to build from snapshot tarball without Ruby installed
https://bugs.ruby-lang.org/issues/12677

* Author: Vit Ondruch
* Status: Open
* Priority: Normal
* Assignee: 
* ruby -v: r55901
* Backport: 2.1: UNKNOWN, 2.2: UNKNOWN, 2.3: UNKNOWN
----------------------------------------
I prepared snapshot from r55901 using tool/make-snapshot, but this snapshot fails to build without Ruby installed:

```
$ make -j4 'COPY=cp -p' Q=
	CC = gcc
	LD = ld
	LDSHARED = gcc -shared
	CFLAGS = -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -mtune=generic -m64
	XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE
	CPPFLAGS =   -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/data/8.0.0
	DLDFLAGS = -fstack-protector -pie  -m64
	SOLIBS = 
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/6.1.1/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --disable-libgcj --with-isl --enable-libmpx --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 6.1.1 20160810 (Red Hat 6.1.1-5) (GCC) 
translating probes probes.d
dtrace -o probes.h.tmp -h -C -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/data/8.0.0 -s probes.d
make  Q= UNICODE_VERSION=8.0.0 update-unicode
make  Q= UPDATE_NAME2CTYPE=yes UNICODE_VERSION=8.0.0 enc/unicode/data/8.0.0/name2ctype.h
compiling main.c
gcc -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -mtune=generic -m64 -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -fexcess-precision=standard -DRUBY_EXPORT -fPIE   -I. -I.ext/include/x86_64-linux -I./include -I. -I./enc/unicode/data/8.0.0 -o main.o -c main.c
make[1]: Entering directory '/builddir/build/BUILD/ruby-2.4.0-r55901'
Downloading Unicode 8.0.0 data files...
/usr/bin/mkdir -p "./enc/unicode/data/8.0.0"
echo executable host ruby is required.  use --with-baseruby option.; false -C "." tool/downloader.rb -d enc/unicode/data/8.0.0 -p 8.0.0/ucd -e  unicode ./enc/unicode/data/8.0.0/UnicodeData.txt ./enc/unicode/data/8.0.0/CompositionExclusions.txt ./enc/unicode/data/8.0.0/NormalizationTest.txt ./enc/unicode/data/8.0.0/CaseFolding.txt ./enc/unicode/data/8.0.0/SpecialCasing.txt 
executable host ruby is required. use --with-baseruby option.
uncommon.mk:1078: recipe for target 'enc/unicode/data/8.0.0/UnicodeData.txt' failed
make[1]: Leaving directory '/builddir/build/BUILD/ruby-2.4.0-r55901'
make[1]: *** [enc/unicode/data/8.0.0/UnicodeData.txt] Error 1
uncommon.mk:1099: recipe for target 'enc/unicode/data/8.0.0/name2ctype.h' failed
make: *** [enc/unicode/data/8.0.0/name2ctype.h] Error 2
make: *** Waiting for unfinished jobs....
make[1]: Entering directory '/builddir/build/BUILD/ruby-2.4.0-r55901'
Downloading Unicode 8.0.0 data files...
/usr/bin/mkdir -p "./enc/unicode/data/8.0.0"
echo executable host ruby is required.  use --with-baseruby option.; false -C "." tool/downloader.rb -d enc/unicode/data/8.0.0 -p 8.0.0/ucd -e  unicode ./enc/unicode/data/8.0.0/UnicodeData.txt ./enc/unicode/data/8.0.0/CompositionExclusions.txt ./enc/unicode/data/8.0.0/NormalizationTest.txt ./enc/unicode/data/8.0.0/CaseFolding.txt ./enc/unicode/data/8.0.0/SpecialCasing.txt 
executable host ruby is required. use --with-baseruby option.
uncommon.mk:1078: recipe for target 'enc/unicode/data/8.0.0/UnicodeData.txt' failed
make[1]: *** [enc/unicode/data/8.0.0/UnicodeData.txt] Error 1
make[1]: Leaving directory '/builddir/build/BUILD/ruby-2.4.0-r55901'
uncommon.mk:1118: recipe for target 'enc/unicode/data/8.0.0/casefold.h' failed
make: *** [enc/unicode/data/8.0.0/casefold.h] Error 2
sed -e 's/RUBY_/RUBY_DTRACE_/g' -e 's/PROBES_H_TMP/RUBY_PROBES_H/' -e 's/(char \*/(const char */g' -e 's/, char \*/, const char */g' probes.h.tmp > probes.h
rm -f probes.h.tmp
```

This was very likely introduce by r55676 or r55678. Will try to bisect if that helps.



-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>