Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails on macOS: something wrong with LDFLAGS="-pipe -s" #177

Closed
qnighy opened this issue Dec 10, 2020 · 1 comment
Closed

Fails on macOS: something wrong with LDFLAGS="-pipe -s" #177

qnighy opened this issue Dec 10, 2020 · 1 comment

Comments

@qnighy
Copy link
Contributor

qnighy commented Dec 10, 2020

Most probably due to #165. Changing LDFLAGS=-pipe -s to LDFLAGS=-pipe fixes the problem.

$ rake -f tasks/bin/cross-ruby.rake cross-ruby VERSION="2.7.2" HOST=x86_64-darwin11
mkdir -p /Users/qnighy/.rake-compiler/builds/x86_64-darwin11/ruby-2.7.2
cd /Users/qnighy/.rake-compiler/builds/x86_64-darwin11/ruby-2.7.2
/Users/qnighy/.rake-compiler/sources/ruby-2.7.2/configure --host=x86_64-darwin11 --target=x86_64-darwin11 --build=x86_64-apple-darwin19.4.0 --enable-shared --disable-install-doc --with-ext= LDFLAGS=-pipe -s --prefix=/Users/qnighy/.rake-compiler/ruby/x86_64-darwin11/ruby-2.7.2
checking for ruby... /Users/qnighy/.rbenv/versions/2.7.1/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... x86_64-apple-darwin19.4.0
checking host system type... x86_64-pc-darwin11
checking target system type... x86_64-pc-darwin11
checking for x86_64-darwin11-clang... no
checking for x86_64-darwin11-gcc... no
checking for x86_64-darwin11-cc... no
checking for clang... clang
configure: WARNING: using cross tools not prefixed with host triplet
checking for x86_64-darwin11-gcc... clang
checking for x86_64-darwin11-gcc... (cached) 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... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether clang accepts -g... yes
checking for clang option to accept ISO C89... none needed
checking for clang option to accept ISO C99... none needed
checking for x86_64-darwin11-clang++... no
checking for clang++... clang++
checking whether we are using the GNU C++ compiler... yes
checking whether clang++ accepts -g... yes
checking how to run the C preprocessor... clang -E
checking if minimum required OS X version is supported... yes
checking whether we are using the GNU C++ compiler... (cached) yes
checking whether clang++ accepts -g... (cached) yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether clang needs -traditional... no
checking for x86_64-darwin11-ld... no
checking for ld... ld
checking whether the linker is GNU ld... no
checking whether clang -E accepts -o... yes
checking for x86_64-darwin11-clang-ranlib... no
checking for x86_64-darwin11-ranlib... no
checking for clang-ranlib... (cached) :
checking for x86_64-darwin11-clang-ar... no
checking for x86_64-darwin11-ar... no
checking for clang-ar... (cached) libtool -static
checking for libtool -static flags... (cached) -no_warning_for_no_symbols -o
checking for x86_64-darwin11-as... no
checking for as... as
checking for x86_64-darwin11-objdump... no
checking for x86_64-darwin11-gobjdump... no
checking for objdump... objdump
checking for x86_64-darwin11-objcopy... no
checking for x86_64-darwin11-gobjcopy... no
checking for objcopy... no
checking for gobjcopy... no
checking for x86_64-darwin11-clang-nm... no
checking for x86_64-darwin11-nm... no
checking for clang-nm... no
checking for nm... nm
checking whether ln -s works... yes
checking whether make sets $(MAKE)... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for a thread-safe mkdir -p...  -d
use 'mkdir -p' as MKDIR_P
checking for x86_64-darwin11-dtrace... no
checking for dot... dot
checking for doxygen... no
checking for pkg-config... pkg-config
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
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="-pipe -s"
rake aborted!
Command failed with status (1): [/Users/qnighy/.rake-compiler/sources/ruby-...]
/Users/qnighy/workdir/rake-compiler/tasks/bin/cross-ruby.rake:129:in `block (2 levels) in <top (required)>'
/Users/qnighy/workdir/rake-compiler/tasks/bin/cross-ruby.rake:126:in `block in <top (required)>'
Tasks: TOP => cross-ruby => install => /Users/qnighy/.rake-compiler/ruby/x86_64-darwin11/ruby-2.7.2/bin/ruby.exe => /Users/qnighy/.rake-compiler/builds/x86_64-darwin11/ruby-2.7.2/ruby.exe => /Users/qnighy/.rake-compiler/builds/x86_64-darwin11/ruby-2.7.2/Makefile
(See full trace by running task with --trace)
@larskanis
Copy link
Member

I think it's better to not set any LDFLAGS as in #182. I stumbled over the same issue when preparing rake-compiler-dock for MacOS.

@kou kou closed this as completed Dec 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants