相关疑难解决方法(0)

无法在Lion下使用RVM安装Ruby - GCC问题

关于这个问题的大多数问题是由于缺少Xcode; 我安装了Xcode 4.2.

安装尝试:

rvm install 1.9.3
Installing Ruby from source to: /Users/jamie/.rvm/rubies/ruby-1.9.3-p0, this may take a while depending on your cpu(s)...

ruby-1.9.3-p0 - #fetching 
ruby-1.9.3-p0 - #extracted to /Users/jamie/.rvm/src/ruby-1.9.3-p0 (already extracted)
Fetching yaml-0.1.4.tar.gz to /Users/jamie/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/jamie/.rvm/src
Configuring yaml in /Users/jamie/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/jamie/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/jamie/.rvm/usr
ruby-1.9.3-p0 - #configuring 
ERROR: Error running ' ./configure --prefix=/Users/jamie/.rvm/rubies/ruby-1.9.3-p0 --enable-shared --disable-install-doc --with-libyaml-dir=/Users/jamie/.rvm/usr ', please read /Users/jamie/.rvm/log/ruby-1.9.3-p0/configure.log
ERROR: There has been an error while running configure. Halting the installation. …
Run Code Online (Sandbox Code Playgroud)

ruby gcc rvm xcode4.2 osx-lion

268
推荐指数
4
解决办法
8万
查看次数

Clang和OS X Lion中的默认编译器

在OS X Snow Leopard(10.6)中,我使用以下几行~/.bashrc来强制使用clang而不是标准gcc进行编译:

# Set Clang as the default compiler for the system
export CC=clang
export CFLAGS=-Qunused-arguments
export CPPFLAGS=-Qunused-arguments
Run Code Online (Sandbox Code Playgroud)

我也(偶尔)必须使用以下行来使用llvm-gcc,当clang无法编译某些东西时(PostgreSQL很长一段时间都犯了这个错误):

# Set LLVM GCC as the default compiler for the system
export CPP='llvm-gcc-4.2'
export CC='llvm-gcc-4.2'
export CXX='llvm-g++'
Run Code Online (Sandbox Code Playgroud)

在OS X Lion(10.7)上,这些行仍然需要吗?llvm-gcc(或clang)是系统的默认编译器吗?或者这些线仍然需要住在我的~/.bashrc

compiler-construction default osx-snow-leopard osx-lion

8
推荐指数
2
解决办法
2万
查看次数