【发布时间】:2011-05-26 06:17:29
【问题描述】:
使用 RVM,我在安装 Fedora 15 后尝试安装 ree-1.8.7-2011.03,但出现以下错误。在 Ubuntu 11.04 上使用 rvm install ree-1.8.7-2011.03 可以正常工作..
在 Fedora 15 上使用 MRI ruby-1.8.7-p334 时出现相同的错误(和解决方案)。
关于如何解决这个问题的任何想法?
make[1]: Entering directory `/home/ryguy/.rvm/src/ree-1.8.7-2011.03/source/ext/dl'
gcc -I/opt/local/include -I. -I/opt/local/include -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR -I. -fPIC -g -O2 -fno-defer-pop -fno-omit-frame-pointer -c ptr.c
gcc -I/opt/local/include -I. -I/opt/local/include -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR -I. -fPIC -g -O2 -fno-defer-pop -fno-omit-frame-pointer -c handle.c
Generating callback.func
Generating cbtable.func
gcc -I/opt/local/include -I. -I/opt/local/include -I../.. -I../../. -I../.././ext/dl -DHAVE_DLFCN_H -DHAVE_DLOPEN -DHAVE_DLCLOSE -DHAVE_DLSYM -DHAVE_DLERROR -I. -fPIC -g -O2 -fno-defer-pop -fno-omit-frame-pointer -c dl.c
In file included from dl.c:104:0:
callback.func:1:1: warning: data definition has no type or storage class [enabled by default]
callback.func:1:7: error: expected identifier or ‘(’ before ‘long’
In file included from dl.c:104:0:
callback.func:78:33: error: expected ‘)’ before ‘(’ token
callback.func:79:3: warning: data definition has no type or storage class [enabled by default]
callback.func:79:24: error: ‘proc’ undeclared here (not in a function)
callback.func:79:39: error: ‘argc’ undeclared here (not in a function)
callback.func:79:45: error: ‘argv’ undeclared here (not in a function)
callback.func:82:1: error: expected identifier or ‘(’ before ‘}’ token
dl.c:106:1: error: expected ‘;’, ‘,’ or ‘)’ before ‘static’
make[1]: *** [dl.o] Error 1
make[1]: Leaving directory `/home/ryguy/.rvm/src/ree-1.8.7-2011.03/source/ext/dl'
make: *** [all] Error 1
【问题讨论】:
-
rvm notes的输出是什么? -
为什么要将 /opt/local/include 添加到包含路径中?你这样做了吗?
-
@Andy gist.github.com/992640 @noodl 我所做的只是
rvm install ree-1.8.7-2011.03 -
我确实安装了
rvm notes中所需的所有软件包,除了 yum 找不到 iconv-devel -
小更新:在 callback.fun 中,最后两行是这样的:gist.github.com/992644 很明显,这段代码不知何故被切断了,但我不明白为什么。