configure: error: something wrong with LDFLAGS="" #2484
Answered
by
notapatch
notapatch
asked this question in
Build failures
-
Demoing the issue in ruby-build (but I use mise normally). Had the issue for a month or so and I've been unable to build any Ruby version. Using latest ruby-build: ruby-build 20241225.2 (but all the versions from mid-November onward had the same result)
Dependencies are installed
ruby-build Verbose outputruby-build 3.2.2 /opt/rubies/ruby-3.2.2 --verbose
ruby-build: using openssl@3 from homebrew
cd /var/folders/06/s_2667k90gs6j7b4jg5pp9fr0000gn/T/ruby-build.20241227164411.33459.pGGxEp
==> Downloading ruby-3.2.2.tar.gz...
-> curl -q -fL -o ruby-3.2.2.tar.gz https://cache.ruby-lang.org/pub/ruby/3.2/ruby-3.2.2.tar.gz
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 19.5M 100 19.5M 0 0 4380k 0 0:00:04 0:00:04 --:--:-- 4481k
cd /var/folders/06/s_2667k90gs6j7b4jg5pp9fr0000gn/T/ruby-build.20241227164411.33459.pGGxEp/ruby-3.2.2
==> Installing ruby-3.2.2...
ruby-build: using readline from homebrew
ruby-build: using libyaml from homebrew
ruby-build: using gmp from homebrew
-> ./configure --prefix=/opt/rubies/ruby-3.2.2 --with-openssl-dir=/opt/homebrew/opt/openssl@3 --enable-shared --with-readline-dir=/opt/homebrew/opt/readline --with-libyaml-dir=/opt/homebrew/opt/libyaml --with-gmp-dir=/opt/homebrew/opt/gmp --with-ext=openssl,psych,+
checking for ruby... /Users/julianwigley/.local/share/mise/installs/ruby/3.3.5/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... aarch64-apple-darwin24.2.0
checking host system type... aarch64-apple-darwin24.2.0
checking target system type... aarch64-apple-darwin24.2.0
checking for llvm-ar... no
checking for clang++... clang++
checking for llvm-nm... no
checking for llvm-objcopy... no
checking for llvm-objdump... no
checking for llvm-ranlib... no
checking for llvm-strip... no
checking for gcc... clang
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether clang accepts -g... yes
checking for clang option to enable C11 features... none needed
checking whether the compiler supports GNU C++... yes
checking whether clang++ accepts -g... yes
checking for clang++ option to enable C++11 features... none needed
checking how to run the C preprocessor... clang -E
checking for ranlib... ranlib
checking for gar... no
checking for ar... ar
checking for gas... no
checking for as... as
checking for gnm... no
checking for nm... nm
checking for gobjcopy... no
checking for objcopy... no
checking for gobjdump... no
checking for objdump... objdump
checking for gstrip... no
checking for strip... strip
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for wchar.h... yes
checking for minix/config.h... no
checking for vfork.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking whether _XOPEN_SOURCE should be defined... no
checking if minimum required OS X version is supported... yes
checking if thread-local storage is supported... yes
checking whether the linker is GNU ld... no
checking whether clang -E accepts -o... yes
checking for clang... /usr/bin/clang
checking for real target cpu... arm64
checking arch option...
checking for ar flags... rcu
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /opt/homebrew/bin/ginstall -c
checking for a race-free mkdir -p... /opt/homebrew/bin/gmkdir -p
checking for dtrace... dtrace
checking for dot... dot
checking for doxygen... no
checking for pkg-config... pkg-config
checking whether it is Android... no
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... yes
checking whether LDFLAGS is valid... no
configure: error: something wrong with LDFLAGS=""
external command failed with status 1
BUILD FAILED (macOS 15.2 on arm64 using ruby-build 20241225.2)
You can inspect the build directory at /var/folders/06/s_2667k90gs6j7b4jg5pp9fr0000gn/T/ruby-build.20241227164411.33459.pGGxEp
Setting LDFLAGSI've tried it with AI suggested exports but it didn't work and I didn't know what I was doing. I think I've read that I shouldn't need to set the LDFLAGS??
Ref |
Beta Was this translation helpful? Give feedback.
Answered by
notapatch
Dec 29, 2024
Replies: 1 comment 1 reply
-
Hi, do you have LDFLAGS or LIBRARY_PATH set in your environment?
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello mislav!
EDIT: The library path /opt/homebrew/opt/mysql-client/lib .... doesn't exist... That would feel a bad thing.
EDIT2: I removed the invalid library path that was in my .zshrc and now everything works again...
Thanks @mislav !