Project

General

Profile

Actions

Bug #10264

closed

Error compiling Ruby 2.1.3 on OSX 10.10 beta 3

Added by jamonholmgren (Jamon Holmgren) over 7 years ago. Updated over 7 years ago.

Status:
Rejected
Priority:
Normal
Target version:
-
ruby -v:
2.1.3
[ruby-core:65123]

Description

I'm getting a configure error when trying to compile Ruby 2.1.3 on OSX 10.10 Yosemite beta 3.

➜  ruby-2.1.3  ./configure --prefix=/Users/jh/.rubies/
checking build system type... x86_64-apple-darwin14.0.0
checking host system type... x86_64-apple-darwin14.0.0
checking target system type... x86_64-apple-darwin14.0.0
checking for gcc-4.2... gcc-4.2
couldn't understand kern.osversion `14.0.0'
checking for gcc... (cached) gcc-4.2
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 we are using the GNU C compiler... yes
checking whether gcc-4.2 accepts -g... yes
checking for gcc-4.2 option to accept ISO C89... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc-4.2 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking whether gcc-4.2 needs -traditional... no
checking for ld... ld
couldn't understand kern.osversion `14.0.0'
checking whether the linker is GNU ld... no
checking whether gcc-4.2 -E accepts -o... yes
checking for real target cpu... x86_64
checking for ranlib... ranlib
checking for ar... ar
checking for as... as
checking for objdump... no
checking for gobjdump... no
checking for objcopy... no
checking for gobjcopy... 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 dtrace... dtrace
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... no
configure: error: something wrong with CFLAGS="-g -O2 "

Any ideas?

Updated by jamonholmgren (Jamon Holmgren) over 7 years ago

I was able to work around this by prepending the ./configure command with CC=/usr/bin/gcc

CC=/usr/bin/gcc ./configure --prefix=/Users/jh/.rubies/

Ref: https://github.com/sstephenson/rbenv/issues/610
Ref: https://github.com/postmodern/ruby-install/issues/166

Updated by nobu (Nobuyoshi Nakada) over 7 years ago

  • Status changed from Open to Feedback

Could you show config.log?

Updated by hsbt (Hiroshi SHIBATA) over 7 years ago

What version of your xcode? I couldn't reproduce OSX 10.10 with xcode 6.1 beta2.

Updated by jamonholmgren (Jamon Holmgren) over 7 years ago

My config.log is here: https://gist.github.com/jamonholmgren/0c9921561daafe89bf23

Note that I put both error and successful config.log in there. The error was without the CC=, the successful was with it.

Xcode Version 5.1.1 (5B1008). I had XCode 6.1 beta 2 installed but uninstalled it two days ago because it was taking up too much space and I wasn't using it.

Updated by hsbt (Hiroshi SHIBATA) over 7 years ago

  • Status changed from Feedback to Rejected

couldn't understand kern.osversion `14.0.0'

xcode 5 isn't support to Yosemite. Please upgrade xcode.

Updated by jamonholmgren (Jamon Holmgren) over 7 years ago

Thank you, Hiroshi Shibata. Will do.

Actions

Also available in: Atom PDF