Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Architectures & Platforms Gentoo on AMD64
  • Search

(amd64) 32bit apps..

Have an x86-64 problem? Post here.
Locked
Advanced search
7 posts • Page 1 of 1
Author
Message
ryanCD
n00b
n00b
Posts: 60
Joined: Thu Aug 28, 2003 8:34 pm

(amd64) 32bit apps..

  • Quote

Post by ryanCD » Thu Feb 05, 2004 9:22 pm

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
Top
ryanCD
n00b
n00b
Posts: 60
Joined: Thu Aug 28, 2003 8:34 pm

  • Quote

Post by ryanCD » Fri Feb 06, 2004 5:02 am

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
Top
64bittux
n00b
n00b
Posts: 6
Joined: Fri Feb 06, 2004 9:39 am

32bit

  • Quote

Post by 64bittux » Fri Feb 06, 2004 9:47 am

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.

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.
Top
ryanCD
n00b
n00b
Posts: 60
Joined: Thu Aug 28, 2003 8:34 pm

  • Quote

Post by ryanCD » Fri Feb 06, 2004 2:14 pm

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
Top
borh
Tux's lil' helper
Tux's lil' helper
Posts: 89
Joined: Sun Nov 24, 2002 1:53 pm
Location: Ljubljana

  • Quote

Post by borh » Fri Feb 06, 2004 4:18 pm

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.
Top
Kioshen
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 109
Joined: Tue Sep 23, 2003 3:28 pm
Location: Montreal, PQ

  • Quote

Post by Kioshen » Fri Feb 06, 2004 6:02 pm

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 :)
Top
ryanCD
n00b
n00b
Posts: 60
Joined: Thu Aug 28, 2003 8:34 pm

  • Quote

Post by ryanCD » Sun Feb 08, 2004 9:59 pm

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
Top
Locked

7 posts • Page 1 of 1

Return to “Gentoo on AMD64”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy