Forum: Ruby howto for compiling in 32-bit?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Ab0b39142721bf4ab6492bdeb18c9682?d=identicon&s=25 Roger Pack (Guest)
on 2009-01-09 21:54
(Received via mailing list)
Anybody know of a HOWTO for compiling a 32-bit binary [like ruby] in a
64-bit OS like...ubuntu on a 64 bit machine?
Thanks much.
-r
Ed280b073cbe589e18e9f763e998cfdf?d=identicon&s=25 Raphael Clancy (puffer_ape)
on 2009-01-09 22:23
Roger Pack wrote:
> Anybody know of a HOWTO for compiling a 32-bit binary [like ruby] in a
> 64-bit OS like...ubuntu on a 64 bit machine?
> Thanks much.
> -r

Google sez... if you are using GCC, try -m32 that should force the
compiler to make a 32 bit binary. You may need the 32bit versions of the
libraries that Ruby expects to see, and that's a whole other kettle of
bits. I suspect the Ubuntu forums would be the place to find out about
that.
768df2956f8f464c76cb2dcedcd29a50?d=identicon&s=25 Jonathan Hudson (Guest)
on 2009-01-09 22:28
(Received via mailing list)
On Sat, 10 Jan 2009 05:53:23 +0900, Roger Pack wrote:

> Anybody know of a HOWTO for compiling a 32-bit binary [like ruby] in a
> 64-bit OS like...ubuntu on a 64 bit machine?
> Thanks much.
> -r
>
>

In general, ensure you have the necessary libraries in /usr/lib32 and
set 'CC=gcc -m32' (for a C program). Thusly:

$ CC='gcc -m32' ./configure && make

Tracking down the libraries can be 'fun'.

-jh
Ab0b39142721bf4ab6492bdeb18c9682?d=identicon&s=25 Roger Pack (Guest)
on 2009-01-09 23:20
(Received via mailing list)
> Google sez... if you are using GCC, try -m32 t

Wow your google fu is much better than mine.
I did see one thing that is "supposed" to help.
http://ubuntuforums.org/showthread.php?t=474790&page=23
Disappointing that it's not as easy as like apt-get install ruby.32 or
something.

-=r
This topic is locked and can not be replied to.