gpt4 book ai didi

ruby - 在 OS X 10.8.5 上使用 rvm 安装 ruby​​-1.9.3-p194

转载 作者:数据小太阳 更新时间:2023-10-29 08:04:32 26 4
gpt4 key购买 nike

我已经安装了 XCode 命令行开发工具,并且安装了 ruby-1.9.3-p448ruby-2.0.0-p247 没有任何问题。

但是,当我执行 rvm install ruby​​-1.9.3-p194 时,出现错误:

Error running '__rvm_make -j 1',
please read /Users/michaelirey/.rvm/log/1382458979_ruby-1.9.3-p194/make.log
There has been an error while running make. Halting the installation.

这是该文件的输出:

[2013-10-22 09:23:22] __rvm_make
__rvm_make ()
{
\make "$@" || return $?
}
current path: /Users/michaelirey/.rvm/src/ruby-1.9.3-p194
command(3): __rvm_make -j 1
CC = gcc
LD = ld
LDSHARED = gcc -dynamiclib
CFLAGS = -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Werror=pointer-arith -Werror=write-strings -Werror=declaration-after-statement -Werror=shorten-64-to-32 -Werror=implicit-function-declaration -fno-common -pipe
XCFLAGS = -include ruby/config.h -include ruby/missing.h -fvisibility=hidden -DRUBY_EXPORT
CPPFLAGS = -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -I. -I.ext/include/x86_64-darwin12.5.0 -I./include -I.
DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -Wl,-flat_namespace -install_name /Users/michaelirey/.rvm/rubies/ruby-1.9.3-p194/lib/libruby.1.9.1.dylib -current_version 1.9.1 -compatibility_version 1.9.1 -Wl,-unexported_symbol,_Init_* -Wl,-unexported_symbol,*_threadptr_* -Wl,-u,_objc_msgSend
SOLIBS =
compiling regparse.c
regparse.c:582:15: error: implicit conversion loses integer precision: 'st_index_t' (aka 'unsigned long') to 'int' [-Werror,-Wshorten-64-to-32]
return t->num_entries;
~~~~~~ ~~~^~~~~~~~~~~
1 error generated.
make: *** [regparse.o] Error 1

我也试过:rvm install ruby​​-1.9.3-p194 --with-gcc=clang

同样的结果...

最佳答案

您的环境中是否有 CC=gcc - 这可以解释问题 - ruby​​ 1.9.3 尚未准备好使用它构建(或 clang),使确保在尝试之前取消设置:

rvm get stable              # always update rvm first in case of problems
unset CC # unset CC to allow autodetection to work
rvm install ruby-1.9.3-p194 # do not add extra flags

这应该允许 RVM 自动检测给定 ruby​​ 构建所需的正确 GCC,如果它仍然失败,则意味着您仍然有一些环境阻止自动检测或存在错误 - 在此处打开错误报告:https://github.com/wayneeseguin/rvm/issues

关于ruby - 在 OS X 10.8.5 上使用 rvm 安装 ruby​​-1.9.3-p194,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19523504/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com