
Issue #19677 has been reported by tagomoris (Satoshi TAGOMORI). ---------------------------------------- Bug #19677: Failed to build ruby from the source code when following the guide https://bugs.ruby-lang.org/issues/19677 * Author: tagomoris (Satoshi TAGOMORI) * Status: Open * Priority: Normal * ruby -v: git clone github.com/ruby/ruby (master HEAD cea9c30fa549885e36471f1782359df2bdcf895a) * Backport: 3.0: UNKNOWN, 3.1: UNKNOWN, 3.2: UNKNOWN ---------------------------------------- I followed the document "Building Ruby" (doc/contributing/building_ruby.md) and got build errors. At the step of "5. Build Ruby: make install", the errors below happened: ``` MBA:build tagomoris$ make -j 8 BASERUBY = /Users/tagomoris/.rbenv/shims/ruby --disable=gems CC = clang LD = ld LDSHARED = clang -dynamiclib CFLAGS = -fdeclspec -O3 -fno-fast-math -ggdb3 -Wall -Wextra -Wextra-tokens -Wdeprecated-declarations -Wdivision-by-zero -Wdiv-by-zero -Wimplicit-function-declaration -Wimplicit-int -Wmisleading-indentation -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 -Wundef -pipe XCFLAGS = -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE -I. -I.ext/include/arm64-darwin22 -I../include -I.. -I../enc/unicode/15.0.0 CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT DLDFLAGS = -L/opt/homebrew/opt/bison/lib -Wl,-multiply_defined,suppress -Wl,-undefined,dynamic_lookup -fstack-protector-strong -Wl,-pie -framework CoreFoundation SOLIBS = -ldl -lobjc -lpthread LANG = LC_ALL = LC_CTYPE = UTF-8 MFLAGS = - --jobserver-fds=4,5 -j RUSTC = rustc YJIT_RUSTC_ARGS = --crate-name=yjit --crate-type=staticlib --edition=2021 -g -C lto=thin -C opt-level=3 -C overflow-checks=on '--out-dir=/Users/tagomoris/gh/ruby/build/yjit/target/release/' ../yjit/src/lib.rs Apple clang version 14.0.3 (clang-1403.0.22.14.1) Target: arm64-apple-darwin22.4.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin compiling ../compile.c compiling ../complex.c compiling ../cont.c compiling ../debug.c compiling ../debug_counter.c compiling ../dir.c compiling ../dln_find.c compiling ../encoding.c compiling ../enum.c compiling ../enumerator.c making ../warning.rbinc ../compile.c:2455:38: error: call to undeclared function 'ISEQ_IS_ENTRY_START'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] IC ic = &ISEQ_IS_ENTRY_START(body, type)[ic_index].ic_cache; ^ ../compile.c:2455:69: error: subscripted value is not an array, pointer, or vector IC ic = &ISEQ_IS_ENTRY_START(body, type)[ic_index].ic_cache; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~ ../compile.c:2484:28: error: use of undeclared identifier 'TS_ICVARC'; did you mean 'TS_IVC'? case TS_ICVARC: /* inline cvar cache */ ^~~~~~~~~ TS_IVC ../insns_info.inc:44:5: note: 'TS_IVC' declared here TS_IVC = 'A', ^ (snip) ``` I got a successful build when I tried `make ruby; make install` instead. So, I'm assuming that the build script has a bug, or the document should be updated. My environment summary: ``` $ uname -a Darwin Moris-Air 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar 6 21:00:41 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8103 arm64 $ clang --version Apple clang version 14.0.3 (clang-1403.0.22.14.1) Target: arm64-apple-darwin22.4.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin ``` -- https://bugs.ruby-lang.org/