Project

General

Profile

Actions

Bug #20283

open

Build failed since Ruby 3.2.3 if Xcode.app was renamed to space contained name.

Added by watson1978 (Shizuo Fujita) about 2 months ago. Updated about 2 months ago.

Status:
Open
Assignee:
-
Target version:
-
[ruby-core:116864]

Description

When I renamed Xcode.app to space contained name (like Xcode 15.2.0.app), then I met build error with Ruby 3.2.3 and Ruby 3.3.0.
(Ruby 3.2.2 can be built with successfully.)

How to reproduce

$ sudo mv /Applications/Xcode.app '/Applications/Xcode 15.2.app'
$ sudo xcode-select --switch '/Applications/Xcode 15.2.app'
$ tar xzf ruby-3.2.3.tar.xz
$ cd ruby-3.2.3
$ ./configure

$ make V=1

:

clang -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  -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT -fPIE -I. -I.ext/include/arm64-darwin23 -I./include -I. -I./enc/unicode/15.0.0  -I/opt/homebrew/include  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -o dmyenc.o -c dmyenc.c
rustc --crate-name=yjit --crate-type=staticlib --edition=2021 -g -C opt-level=3 -C overflow-checks=on '--out-dir=/Users/watson/prj/ruby-3.2.3/yjit/target/release/' ./yjit/src/lib.rs
touch yjit/target/release/libyjit.a
clang -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  -L. -L/opt/homebrew/lib  -fstack-protector-strong -fstack-protector-strong -Wl,-pie -framework CoreFoundation  main.o dmydln.o miniinit.o dmyext.o array.o ast.o bignum.o class.o compar.o compile.o complex.o cont.o debug.o debug_counter.o dir.o dln_find.o encoding.o enum.o enumerator.o error.o eval.o file.o gc.o hash.o inits.o io.o io_buffer.o iseq.o load.o marshal.o math.o memory_view.o mjit.o mjit_c.o node.o numeric.o object.o pack.o parse.o proc.o process.o ractor.o random.o range.o rational.o re.o regcomp.o regenc.o regerror.o regexec.o regparse.o regsyntax.o ruby.o scheduler.o shape.o signal.o sprintf.o st.o strftime.o string.o struct.o symbol.o thread.o time.o transcode.o transient_heap.o util.o variable.o version.o vm.o vm_backtrace.o vm_dump.o vm_sync.o vm_trace.o yjit.o coroutine/arm64/Context.o  enc/ascii.o enc/us_ascii.o enc/unicode.o enc/utf_8.o enc/trans/newline.o explicit_bzero.o setproctitle.o addr2line.o  yjit/target/release/libyjit.a -lgmp -ldl -lobjc -lpthread  -lpthread   -o miniruby
ld: warning: ignoring duplicate libraries: '-lpthread'
ld: Undefined symbols:
  _coroutine_transfer, referenced from:
      _fiber_setcontext in cont.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Environment

  • Apple M1 Max
  • macOS 14.3.1
  • clang 15.0.0 (clang-1500.1.0.2.5)
  • rustc 1.75.0

Note

This problem occurs on Intel Mac and Apple M1 Mac both.

Updated by katei (Yuta Saito) about 2 months ago

It looks like 3.2.2 and earlier also have the same issue. I think the root problem is the below error, which indicates $(MAKE) are not quoted in Makefiles

ruby-3.3.0$ make srcs-enc V=1
file2lastrev.rb: does not seem to be under a vcs: .
/Users/katei/.rbenv/shims/ruby --disable=gems ./tool/file2lastrev.rb -q --revision.h --srcdir="." --output=revision.h --timestamp=.revision.time
revision.h unchanged
clang -E -DRUBY_EXPORT -I. -I.ext/include/arm64-darwin22 -I./include -I. -I./prism -I./enc/unicode/15.0.0  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    "./version.c" | \
        /Users/katei/.rbenv/shims/ruby --disable=gems  "./tool/generic_erb.rb" -o arm64-darwin22-fake.rb "./template/fake.rb.in" \
            i=- srcdir="." BASERUBY="/Users/katei/.rbenv/shims/ruby --disable=gems" \
            LIBPATHENV="DYLD_LIBRARY_PATH" PRELOADENV="DYLD_INSERT_LIBRARIES" LIBRUBY_SO="libruby.3.3.dylib.3.3.0"
arm64-darwin22-fake.rb updated
/Users/katei/.rbenv/shims/ruby --disable=gems  -r./arm64-darwin22-fake ./enc/make_encmake.rb \
          --builtin-encs="enc/ascii.o enc/us_ascii.o enc/unicode.o enc/utf_8.o" --builtin-transes="enc/trans/newline.o" --module  enc.mk
/Applications/Xcode 15.2.app/Contents/Developer/usr/bin/make -f enc.mk V="1" UNICODE_HDR_DIR="./enc/unicode/15.0.0" RUBY="/Users/katei/.rbenv/shims/ruby --disable=gems " MINIRUBY="/Users/katei/.rbenv/shims/ruby --disable=gems "  srcs
/bin/sh: /Applications/Xcode: No such file or directory
make: *** [srcs-enc] Error 127
Actions

Also available in: Atom PDF

Like0
Like0