Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
(amd64) 32bit apps..
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
ryanCD
n00b
n00b


Joined: 28 Aug 2003
Posts: 60

PostPosted: Thu Feb 05, 2004 9:22 pm    Post subject: (amd64) 32bit apps.. Reply with quote

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
Back to top
View user's profile Send private message
ryanCD
n00b
n00b


Joined: 28 Aug 2003
Posts: 60

PostPosted: Fri Feb 06, 2004 5:02 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
64bittux
n00b
n00b


Joined: 06 Feb 2004
Posts: 6

PostPosted: Fri Feb 06, 2004 9:47 am    Post subject: 32bit Reply with quote

First, stop reading this and instead read Brad's page on running Gentoo64. http://dev.gentoo.org/~brad_mssw/amd64-tech-notes.html

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.

* app-emulation/emul-linux-x86-baselibs
* app-emulation/emul-linux-x86-xlibs

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.
Back to top
View user's profile Send private message
ryanCD
n00b
n00b


Joined: 28 Aug 2003
Posts: 60

PostPosted: Fri Feb 06, 2004 2:14 pm    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
borh
Tux's lil' helper
Tux's lil' helper


Joined: 24 Nov 2002
Posts: 89
Location: Ljubljana

PostPosted: Fri Feb 06, 2004 4:18 pm    Post subject: Reply with quote

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.
Back to top
View user's profile Send private message
Kioshen
Tux's lil' helper
Tux's lil' helper


Joined: 23 Sep 2003
Posts: 109
Location: Montreal, PQ

PostPosted: Fri Feb 06, 2004 6:02 pm    Post subject: Reply with quote

That's a pretty good tip. I hope they will make a dedicated section for us so we can make the "Power tip of the day" thread :)
Back to top
View user's profile Send private message
ryanCD
n00b
n00b


Joined: 28 Aug 2003
Posts: 60

PostPosted: Sun Feb 08, 2004 9:59 pm    Post subject: Reply with quote

I discovered the linux32/linux64 commands, and that does what I want, ie "linux32 lisp" runs without seg faulting, so hurray.
peace, out.
_________________
The new scum
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum