[英]Build 32bits ruby using rvm in RHEL 6(x86_64 arch)
Hope someone can shed a light on this issue for me. 希望有人能为我阐明这个问题。 I am building ruby 32bit in RHEL 6 x86_64 using rvm.
我正在使用rvm在RHEL 6 x86_64中构建ruby 32bit。 Followed this guide (ignored Mac related stuffs), I ran
按照本指南 (与Mac相关的内容被忽略),我跑了
rvm_archflags="-arch i386" CFLAGS="-arch i386" LDFLAGS="-arch i386" rvm install 1.9.2
rvm_archflags =“-arch i386” CFLAGS =“-arch i386” LDFLAGS =“-arch i386” rvm安装1.9.2
I get an error like this: 我收到这样的错误:
Error running './configure --disable-install-doc --prefix=/home/deploy/.rvm/rubies/ruby-1.8.7-p371 --enable-shared'
Trying original method: rvm install 1.8.7 --32
and got this: 尝试原始方法:
rvm install 1.8.7 --32
并得到以下信息:
'env MACOSX_DEPLOYMENT_TARGET= CFLAGS=-O3 -arch i386 -g -Os -pipe -no-cpp-precomp CCFLAGS=-arch i386 -g -Os -pipe CXXFLAGS=-arch i386 -g -Os -pipe LDFLAGS=-arch i386 -bind_at_load LDSHARED=cc -arch i386 -dynamiclib -undefined suppress -flat_namespace ./configure --disable-install-doc --prefix=/home/deploy/.rvm/rubies/ruby-1.8.7-p371 --enable-shared'
'env MACOSX_DEPLOYMENT_TARGET = CFLAGS = -O3 -arch i386 -g -Os -pipe -no-cpp-precomp CCFLAGS = -arch i386 -g -Os -pipe CXXFLAGS = -arch i386 -g -Os -pipe LDFLAGS = -arch i386 -bind_at_load LDSHARED = cc -arch i386 -dynamiclib-未定义抑制-flat_namespace ./configure --disable-install-doc --prefix = / home / deploy / .rvm / rubies / ruby-1.8.7-p371 --enable-共享'
Looking at the config.log, it says C compiler cannot create executables. 查看config.log,它表示C编译器无法创建可执行文件。 From the look of the errors, I guess it mismatched the target machine(Mac instead of RHEL).
从错误的外观来看,我认为它与目标计算机(Mac而不是RHEL)不匹配。 I don't quite understand why because the gcc is definitely built for x86_64 Red Hat linux.
我不太明白为什么,因为gcc肯定是为x86_64 Red Hat Linux构建的。 Can someone give me a hint on this issue?
有人可以给我提示这个问题吗?
Thanks alot 非常感谢
Compiling in 32bit requires using the -m32
option on linux. 以32位编译需要在Linux上使用
-m32
选项。 The -arch i386
option is Mac specific. -arch i386
选项特定于Mac。
You will, of course require the full suite of 32bit development libraries. 当然,您将需要全套的32位开发库。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.