简体   繁体   English

在RHEL 6(x86_64 arch)中使用RVM构建32位红宝石

[英]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.

相关问题 为什么Vagrant不共享Windows 8 64位和32位上的文件夹? - Why the Vagrant do not share folders on windows 8 64bits e 32bits? 捆绑Fedora 2.0 ruby​​-2.0.0-p481时出错[x86_64] - error when bundle Fedora 2.0 ruby-2.0.0-p481 [ x86_64 ] 努力在OSX Lion上安装pg gem-“缺少文件x86_64所需的体系结构x86_64” - Struggling to install pg gem on OSX Lion - “missing required architecture x86_64 in file for architecture x86_64” Ruby On Rails:therubyracer x86-mingw32丢失的宝石 - Ruby On Rails: therubyracer x86-mingw32 missing gems 错误:rails 中止:LoadError。 dlopen(/Users..,但是是不兼容的架构(有'x86_64',需要'arm64e')) - error: rails aborted! LoadError: dlopen(/Users...but is an incompatible architecture (have 'x86_64', need 'arm64e')) /usr/local/lib/libz.1.dylib,文件是为i386构建的,它不是被链接的体系结构(x86_64) - /usr/local/lib/libz.1.dylib, file was built for i386 which is not the architecture being linked (x86_64) (mach-o 文件,但在运行 rake db:create 时是苹果 M1 芯片上的不兼容架构(具有“x86_64”,需要“arm64e”)) - (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')) on apple M1 chip when running rake db:create RVM使用错误的Ruby版本 - RVM using wrong ruby version 在已安装Ruby的情况下使用RVM - Using RVM with Ruby already installed 使用RVM的Ruby版本冲突 - Ruby version conflict using rvm
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM