Comments (10)
Likely affects MacPorts too - but I haven't checked for sure.
Can open an issue shortly, and maybe a pull request too if I find the time.
from homebrew-core.
Apologies for the delay: https://bugs.ruby-lang.org/issues/20499
from homebrew-core.
Fixed upstream at ruby/ruby@8277cf0
from homebrew-core.
I copy here the whole RbConfig::CONFIG.
Note that NM is also incorrect and has the same problem ("NM"=>"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --no-llvm-bc",
).
/opt/homebrew/opt/[email protected]/bin/ruby -e 'pp RbConfig::CONFIG.sort.to_h'
{"ADDITIONAL_DLDFLAGS"=>"",
"ALLOCA"=>"",
"AR"=>"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar",
"ARCHFILE"=>"",
"ARCH_FLAG"=>"-arch arm64",
"ARFLAGS"=>"rcu ",
"AS"=>"as",
"ASFLAGS"=>"",
"ASMEXT"=>"S",
"BUILTIN_TRANSSRCS"=>" enc/trans/newline.c",
"CARGO"=>"",
"CARGO_BUILD_ARGS"=>"",
"CC"=>"clang",
"CCDLFLAGS"=>"-fno-common",
"CC_VERSION"=>"clang --version",
"CC_VERSION_MESSAGE"=>
"Apple clang version 15.0.0 (clang-1500.1.0.2.5)\n" +
"Target: arm64-apple-darwin23.2.0\n" +
"Thread model: posix\n" +
"InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin",
"CC_WRAPPER"=>"",
"CFLAGS"=>
"-fdeclspec -O3 -fno-fast-math -ggdb3 -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 -Wmis
sing-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 -Wunus
ed-variable -Wmisleading-indentation -Wundef -fno-common -pipe",
"CHDIR"=>"cd -P",
"COMMON_HEADERS"=>"",
"COMMON_LIBS"=>"",
"COMMON_MACROS"=>"",
"CONFIGURE"=>"configure",
"COROUTINE_TYPE"=>"arm64",
"COUTFLAG"=>"-o ",
"CP"=>"cp",
"CPP"=>"clang -E",
"CPPFLAGS"=>"-D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT ",
"CPPOUTFILE"=>"-o conftest.i",
"CROSS_COMPILING"=>"no",
"CSRCFLAG"=>"",
"CXX"=>"clang++",
"CXXFLAGS"=>"-fdeclspec",
"DEFS"=>"",
"DESTDIR"=>"",
"DLDFLAGS"=>"-L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/openssl@3/lib -Wl,-undefined,dynamic_lookup",
"DLDLIBS"=>"",
"DLDSHARED"=>"clang -dynamiclib",
"DLEXT"=>"bundle",
"DLLWRAP"=>"",
"DLNOBJ"=>"dln.o",
"DOT"=>"",
"DOXYGEN"=>"",
"ECHO_C"=>"\\\\c",
"ECHO_N"=>"",
"ECHO_T"=>"",
"EGREP"=>"/usr/bin/grep -E",
"ENABLE_DEBUG_ENV"=>"",
"ENABLE_SHARED"=>"yes",
"ENCSTATIC"=>"",
"EXECUTABLE_EXTS"=>"",
"EXEEXT"=>"",
"EXPORT_PREFIX"=>"",
"EXTDLDFLAGS"=>"",
"EXTLDFLAGS"=>"",
"EXTOUT"=>".ext",
"EXTSTATIC"=>"",
"GCC"=>"yes",
"GIT"=>"git",
"GNU_LD"=>"no",
"GREP"=>"/usr/bin/grep",
"HAVE_GIT"=>"yes",
"INSTALL"=>"/usr/bin/install -c",
"INSTALL_DATA"=>"/usr/bin/install -c -m 644",
"INSTALL_PROGRAM"=>"/usr/bin/install -c",
"INSTALL_SCRIPT"=>"/usr/bin/install -c",
"INSTALL_STATIC_LIBRARY"=>"no",
"LD"=>"ld",
"LDFLAGS"=>"-L. -fstack-protector-strong -L/opt/homebrew/opt/libyaml/lib -L/opt/homebrew/opt/openssl@3/lib",
"LDSHARED"=>"clang -dynamic -bundle",
"LDSHAREDXX"=>"clang++ -dynamic -bundle",
"LIBEXT"=>"a",
"LIBPATHENV"=>"DYLD_LIBRARY_PATH",
"LIBPATHFLAG"=>" -L%s",
"LIBRUBY"=>"libruby.3.3.dylib",
"LIBRUBYARG"=>"-lruby.3.3",
"LIBRUBYARG_SHARED"=>"-lruby.3.3",
"LIBRUBYARG_STATIC"=>"-lruby.3.3-static -framework CoreFoundation -ldl -lobjc -lpthread ",
"LIBRUBY_A"=>"libruby.3.3-static.a",
"LIBRUBY_ALIASES"=>"libruby.dylib",
"LIBRUBY_RELATIVE"=>"no",
"LIBRUBY_SO"=>"libruby.3.3.dylib",
"LIBRUBY_SONAME"=>"libruby.3.3.dylib",
"LIBS"=>"-lpthread ",
"LINK_SO"=>"\n" + "dsymutil $@ 2>/dev/null; { test -z '$(RUBY_CODESIGN)' || codesign -s '$(RUBY_CODESIGN)' -f $@; }",
"LN_S"=>"ln -s",
"MAINLIBS"=>"-ldl -lobjc -lpthread ",
"MAJOR"=>"3",
"MAKEDIRS"=>"mkdir -p",
"MAKEFILES"=>"Makefile GNUmakefile",
"MANTYPE"=>"doc",
"MINOR"=>"3",
"MKDIR_P"=>"mkdir -p",
"MKMF_VERBOSE"=>"0",
"NM"=>"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm --no-llvm-bc",
"NULLCMD"=>":",
"OBJCOPY"=>":",
"OBJDUMP"=>"objdump",
"OBJEXT"=>"o",
"OUTFLAG"=>"-o ",
"PACKAGE"=>"ruby",
"PACKAGE_BUGREPORT"=>"",
"PACKAGE_NAME"=>"",
"PACKAGE_STRING"=>"",
"PACKAGE_TARNAME"=>"",
"PACKAGE_URL"=>"",
"PACKAGE_VERSION"=>"",
"PATCHLEVEL"=>"0",
"PATH_SEPARATOR"=>":",
"PKG_CONFIG"=>"pkg-config",
"PLATFORM_DIR"=>"",
"POSTLINK"=>"dsymutil $@ 2>/dev/null; { test -z '$(RUBY_CODESIGN)' || codesign -s '$(RUBY_CODESIGN)' -f $@; }",
"PRELOADENV"=>"DYLD_INSERT_LIBRARIES",
"PREP"=>"miniruby",
"RANLIB"=>"ranlib",
"RI_BASE_NAME"=>"ri",
"RJIT_SUPPORT"=>"yes",
"RM"=>"rm -f",
"RMALL"=>"rm -fr",
"RMDIR"=>"rmdir",
"RMDIRS"=>"rmdir -p",
"RPATHFLAG"=>"",
"RUBYW_BASE_NAME"=>"rubyw",
"RUBYW_INSTALL_NAME"=>"",
"RUBY_API_VERSION"=>"3.3",
"RUBY_BASE_NAME"=>"ruby",
"RUBY_DEVEL"=>"",
"RUBY_EXEC_PREFIX"=>"/opt/homebrew/Cellar/ruby/3.3.0",
"RUBY_INSTALL_NAME"=>"ruby",
"RUBY_LIB_VERSION"=>"",
"RUBY_LIB_VERSION_STYLE"=>"3\t/* full */",
"RUBY_PROGRAM_VERSION"=>"3.3.0",
"RUBY_SEARCH_PATH"=>"",
"RUBY_SO_NAME"=>"ruby.3.3",
"RUBY_VERSION_NAME"=>"ruby-3.3.0",
"RUSTC"=>"rustc",
"SDKROOT"=>"",
"SET_MAKE"=>"",
"SHELL"=>"/bin/sh",
"SOEXT"=>"dylib",
"SOLIBS"=>"-ldl -lobjc -lpthread ",
"STATIC"=>"",
"STRIP"=>"strip -A -n",
"SYMBOL_PREFIX"=>"_",
"TEENY"=>"0",
"TEST_RUNNABLE"=>"yes",
"THREAD_MODEL"=>"pthread",
"TRY_LINK"=>"",
"UNICODE_EMOJI_VERSION"=>"15.0",
"UNICODE_VERSION"=>"15.0.0",
"UNIVERSAL_ARCHNAMES"=>"",
"UNIVERSAL_INTS"=>"",
"USE_LLVM_WINDRES"=>"",
"WASMOPT"=>"",
"WERRORFLAG"=>"-Werror",
"WINDRES"=>"",
"YJIT_LIBS"=>"yjit/target/release/libyjit.a",
"YJIT_OBJ"=>"yjit.o",
"YJIT_SUPPORT"=>"yes",
"arch"=>"arm64-darwin23",
"archdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/arm64-darwin23",
"archincludedir"=>"/opt/homebrew/Cellar/ruby/3.3.0/include/arm64-darwin23",
"archlibdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/lib/arm64-darwin23",
"bindir"=>"/opt/homebrew/Cellar/ruby/3.3.0/bin",
"build"=>"aarch64-apple-darwin23.2.0",
"build_alias"=>"",
"build_cpu"=>"aarch64",
"build_os"=>"darwin23.2.0",
"build_vendor"=>"apple",
"cflags"=>
"-fdeclspec -O3 -fno-fast-math -ggdb3 -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 -Wmis
sing-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 -Wunus
ed-variable -Wmisleading-indentation -Wundef",
"cleanlibs"=>"$(TARGET_SO).dSYM",
"codesign"=>"codesign",
"configure_args"=>
" '--prefix=/opt/homebrew/Cellar/ruby/3.3.0' '--enable-shared' '--disable-silent-rules' '--with-sitedir=/opt/homebrew/lib/ruby/site_ruby' '--with-vendordir=/opt/homebrew/lib/ruby/vendor_ruby' '--with-opt-dir=/opt/homebrew/opt/libyaml:/opt/homebrew/opt/
openssl@3' '--without-gmp' 'MJIT_CC=/usr/bin/clang' 'CC=clang' 'CXX=clang++'",
"cppflags"=>"",
"cxxflags"=>"",
"datadir"=>"/opt/homebrew/Cellar/ruby/3.3.0/share",
"datarootdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/share",
"debugflags"=>"-ggdb3",
"docdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/share/doc/ruby",
"dsymutil"=>"dsymutil",
"dvidir"=>"/opt/homebrew/Cellar/ruby/3.3.0/share/doc/ruby",
"exec"=>"exec",
"exec_prefix"=>"/opt/homebrew/Cellar/ruby/3.3.0",
"host"=>"arm64-apple-darwin23",
"host_alias"=>"",
"host_cpu"=>"arm64",
"host_os"=>"darwin23",
"host_vendor"=>"apple",
"htmldir"=>"/opt/homebrew/Cellar/ruby/3.3.0/share/doc/ruby",
"incflags"=>"-I/opt/homebrew/opt/libyaml/include -I/opt/homebrew/opt/openssl@3/include",
"includedir"=>"/opt/homebrew/Cellar/ruby/3.3.0/include",
"incflags"=>"-I/opt/homebrew/opt/libyaml/include -I/opt/homebrew/opt/openssl@3/include", [1/1264]
"includedir"=>"/opt/homebrew/Cellar/ruby/3.3.0/include",
"infodir"=>"/opt/homebrew/Cellar/ruby/3.3.0/share/info",
"libdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/lib",
"libdirname"=>"libdir",
"libexecdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/libexec",
"localedir"=>"/opt/homebrew/Cellar/ruby/3.3.0/share/locale",
"localstatedir"=>"/opt/homebrew/Cellar/ruby/3.3.0/var",
"mandir"=>"/opt/homebrew/Cellar/ruby/3.3.0/share/man",
"oldincludedir"=>"/usr/include",
"optflags"=>"-O3 -fno-fast-math",
"pdfdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/share/doc/ruby",
"platform"=>"arm64-darwin23",
"prefix"=>"/opt/homebrew/Cellar/ruby/3.3.0",
"psdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/share/doc/ruby",
"ridir"=>"/opt/homebrew/Cellar/ruby/3.3.0/share/ri",
"ruby_install_name"=>"ruby",
"ruby_pc"=>"ruby-3.3.pc",
"ruby_version"=>"3.3.0",
"rubyarchdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/arm64-darwin23",
"rubyarchhdrdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/include/ruby-3.3.0/arm64-darwin23",
"rubyarchprefix"=>"/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/arm64-darwin23",
"rubyhdrdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/include/ruby-3.3.0",
"rubylibdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0",
"rubylibprefix"=>"/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby",
"rubysitearchprefix"=>"/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/arm64-darwin23",
"rubyw_install_name"=>"",
"runstatedir"=>"/opt/homebrew/Cellar/ruby/3.3.0/var/run",
"sbindir"=>"/opt/homebrew/Cellar/ruby/3.3.0/sbin",
"setup"=>"Setup",
"sharedstatedir"=>"/opt/homebrew/Cellar/ruby/3.3.0/com",
"sitearch"=>"arm64-darwin23",
"sitearchdir"=>"/opt/homebrew/lib/ruby/site_ruby/3.3.0/arm64-darwin23",
"sitearchhdrdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/include/ruby-3.3.0/site_ruby/arm64-darwin23",
"sitearchincludedir"=>"/opt/homebrew/Cellar/ruby/3.3.0/include/arm64-darwin23",
"sitearchlibdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/lib/arm64-darwin23",
"sitedir"=>"/opt/homebrew/lib/ruby/site_ruby",
"sitehdrdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/include/ruby-3.3.0/site_ruby",
"sitelibdir"=>"/opt/homebrew/lib/ruby/site_ruby/3.3.0",
"strict_warnflags"=>"",
"sysconfdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/etc",
"target"=>"arm64-apple-darwin23",
"target_alias"=>"",
"target_cpu"=>"arm64",
"target_os"=>"darwin23",
"target_vendor"=>"apple",
"topdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/lib/ruby/3.3.0/arm64-darwin23",
"try_header"=>"",
"vendorarchdir"=>"/opt/homebrew/lib/ruby/vendor_ruby/3.3.0/arm64-darwin23",
"vendorarchhdrdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/include/ruby-3.3.0/vendor_ruby/arm64-darwin23",
"vendordir"=>"/opt/homebrew/lib/ruby/vendor_ruby",
"vendorhdrdir"=>"/opt/homebrew/Cellar/ruby/3.3.0/include/ruby-3.3.0/vendor_ruby",
"vendorlibdir"=>"/opt/homebrew/lib/ruby/vendor_ruby/3.3.0",
"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",
"wasmoptflags"=>""}
from homebrew-core.
My brew doctor output says Your system is ready to brew. and am still able to reproduce my issue.
I ticked this box even though the output says differently but I am absolutely certain that would change nothing, and the issue reproduces 100% regardless of that brew doctor
output. It's an issue that is simply part of the prebuilt [email protected] and [email protected] bottles.
One more thought: this problem could likely also be solved if the bottle was built on a system which does not have XCode installed, because then CRuby wouldn't find those executables. Or maybe there are ways to tell CRuby which toolchain to use (the CLT is better if it's always guaranteed to be there for Homebrew) rather than letting it guess.
from homebrew-core.
This is caused by ruby/ruby@038f9ad.
from homebrew-core.
Indeed, I see:
bash-3.2$ cc -print-prog-name=ar
/Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar
bash-3.2$ cc -print-prog-name=nm
/Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm
bash-3.2$ cc -print-prog-name=ld
/Applications/Xcode_15.0.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld
Interesting that LD above is not affected but AR and NM are.
Any idea how to fix this in Homebrew?
Maybe AR=ar NM=nm ./configure ...
or so could work.
Maybe it should be changed in CRuby? But that wouldn't fix it for existing 3.2 and 3.3 releases.
cc @nobu since you did this change and might know more about it
from homebrew-core.
This bug will likely affect all macOS Ruby builds (unless Xcode is missing) so definitely seems like an upstream fix is desirable here.
from homebrew-core.
Agreed, although for the common case of compiling ruby from source on the same machine it's not an issue because then either no XCode and fine anyway, or XCode is installed and then those paths will most likely work fine (unless XCode is later uninstalled).
from homebrew-core.
@Bo98 Could you file an issue at https://bugs.ruby-lang.org/ ?
Also, since this basically only happens with Homebrew builds of CRuby (Homebrew is one of the very few to have binary builds of Ruby on macOS), it seems worth working around in parallel in Homebrew until it gets fixed & released in CRuby.
from homebrew-core.
Related Issues (20)
- Octave 9.1.0 opengl bug interacting with qt6-6.7.0 HOT 4
- musikcube 3.0.2_1 crashing on startup HOT 7
- clang-18 failed with exit code 139 HOT 4
- /usr/local/bin/apachectl: line 95: lynx: command not found
- Cannot install plugins within poetry HOT 3
- mecab-ipadic: character encoding corruption HOT 9
- mingw-w64 SHA256 mismatch HOT 2
- Deno 1.43.2 homebrew build segmentation fault HOT 16
- virt-manager crashes without `--no-fork` HOT 1
- `rust` should not bundle huge HTML documentation HOT 4
- ncurses build depends on TERMINFO variable HOT 1
- mpv formula is missing molten-vk as a dependency HOT 6
- parquet-cli has an extra dependency jar HOT 1
- glibmm 2.80 bottle: link error when using Glib::DateTime::create_now_local() HOT 1
- bottled emacs exit with SIGSEGV when use built-in rust-ts-mode HOT 6
- helm-docs version report issue HOT 7
- tgenv should point to new github instead of old one HOT 3
- git-svn died of signal 11 on imac m1 HOT 1
- sip formulae doesn't appear in pip3 list on sonoma
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from homebrew-core.