I installed the 32bit emulation libraries, and got a 32bit binary (cmucl) I want to work. I'm assuming I have to link the binary to the 32bit libraries, but I don't know how to do that. Just trying to make it work by linking /lib to /emul/linux/x86/lib gave me results, whereby results mean breaking everything.

As things stand, if I just run lisp (the package I'm installing) I get an immediate segmentation fault.

I did a bit of google searching, but I don't really know if I'm on the right track, so, yeah._________________The new scum

Talking too myself mostly, but I think I'll go for a chroot set up. The packages I want have a whole mess of dependancies which I'd have to figure out, and even then I might not get it to work correctly with my current level of experience. As I imagine, things should be pretty much plug and play when I chroot to the 32bit files, although I would have all sorts of bonus overhead, a second portage tree... Correct me if I'm wrong on any of those assumtions before I get too deep.

In this senario, 32bit and 64bit would be pretty sperate. I couldn't launch a 32bit application in 64bit XFree, correct? I'm looking at 32bit command line tools, but I'm trying to sort out my options.

Anyway, sleep and buy a new hard drive tommorow._________________The new scum

Now that you have read his page you should know what needs to be done. You do NOT need to chroot. You can but it is a waste of space.

Quote:

Running 32bit Programs
YOU MUST HAVE "IA32 Emulation" TURNED ON UNDER "Executable File Formats" IN YOUR KERNEL
Many changes are in progress at the moment, and the easiest way to set up a 32bit environment is to install emulation libraries.

The emulation libraries will create the /emul/linux/x86 directory and install most of the appropriate libraries you will need to run pre-compiled 32bit applications. It will also create 2 symlinks, /lib32, and /usr/lib32 which point back to the proper /emul directories. It will also create a symlink in /lib to ld-linux.so.2 from /emul/linux/x86/lib/ld-linux.so.2, as the 64bit variant is known as ld-linux-x86-64.so.2.

Having those 2 packages installed should allow you to run most 32bit precompiled applications. (e.g. Java, Oracle 9i, Opera)

Compiling 32bit applications from a 64bit environment
You must first have the standard 32bit environment up and running from the previous section. Then you need to add 'multilib' to your USE= flags in /etc/make.conf and emerge or re-emerge gcc-3.3.1-r5 or higher. This will build GCC with multilib support, which will allow you to create 32bit binaries by using the -m32 CFLAGS setting. Having multilib installed should not affect 64bit compilations (though you can pass -m64 if you want to be certain for some reason).
NOTE: We strongly discourage our users from EVER adding -m32 to /etc/make.conf or using -m32 with portage in any form what-so-ever, and recommend that to do 32bit compiles, they should be by hand, and not via the portage system. Not paying attention to this could seriously mess up your dependancy structure. Don't ask us how to fix this, it's your fault.

I did read brad's page, and have things set up as per the instructions there.

I think my problem is probably with libsigsegv, which, on reflection and after some sleep, I installed as a 64bit library. I'm going to try and install that as a 32bit library, then see if lisp will run correctly.

My bigger issue is that I don't know how to check for what run time libraries a program needs, and I don't know how to change the runtime libraries a program uses when there is more than one version availible (ie 32 and 64bit). I read through the ld man pages, but I don't really think that's what I need, or maby I still don't understand how to use it.

I may still end up with a 32 bit partion I can chroot too. This would basically give me a pation where I can emerge and install all 32bit stuff, so I wouldn't even worry that the wrong libraries are being linked too, or anything like that. It would just make my thinking cleaner at the expense of hard drive space._________________The new scum

Another option is to compile whatever package you want as a static binary on a 32-bit computer. For example, you could edit the ebuild of whatever package you want and add "--enable-static" to the configure process (I think that's the most common flag for static). Then emerge with "emerge -b [package name]". You can then use the binary tbz2 on your amd64 system with a "emerge -k [package name]". This is only usefull if you have a second 32-bit gentoo system on hand, though.