0
votes

Hope someone can shed a light on this issue for me. I am building ruby 32bit in RHEL 6 x86_64 using rvm. Followed this guide(ignored Mac related stuffs), I ran

rvm_archflags="-arch i386" CFLAGS="-arch i386" LDFLAGS="-arch i386" rvm install 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:

'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'

Looking at the config.log, it says C compiler cannot create executables. From the look of the errors, I guess it mismatched the target machine(Mac instead of RHEL). I don't quite understand why because the gcc is definitely built for x86_64 Red Hat linux. Can someone give me a hint on this issue?

Thanks alot

1

1 Answers

1
votes

Compiling in 32bit requires using the -m32 option on linux. The -arch i386 option is Mac specific.

You will, of course require the full suite of 32bit development libraries.