Howto for compiling in 32-bit?

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

Roger P. 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.

On Sat, 10 Jan 2009 05:53:23 +0900, Roger P. 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

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.

Disappointing that it’s not as easy as like apt-get install ruby.32 or
something.

-=r