LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   32bit programs on amd64 (https://www.linuxquestions.org/questions/slackware-14/32bit-programs-on-amd64-523776/)

Mig21 01-29-2007 10:27 AM

32bit programs on amd64
 
hello

i am considering buying an amd64 machine. i might not because most of them don't have an agp slot for my radeon 9250 but i think i should be able to find one.

anyway, i'm wondering could someone tell me some basics about amd64 computers? i would like to:

1. take advantage of the new architecture as much as i can, so i don't want to run my whole system in a 386 emulation mode, so i guess slamd64 is my only choice?
2. still be able to run programs compiled for 32bits like flash and a few games.
3. be able to test the software i write in both 64 and 32 bit modes

is it possible that i get both 1 and 2? 2 is more important but then i might as well buy a cheaper 32bit machine..

if there's anything you know about compatibility and emulation, please share, i'm almost completely ignorant on the topic.

thanks in advance

weibullguy 01-29-2007 11:25 AM

No reason to emulate. Use a multilib distro like Gentoo or CLFS. You will have both 32-bit and 64-bit libraries so you will be able to run 32-bit and 64-bit applications. The key is the toolchain.

As far as #3, the distro you choose may not provide all the 32-bit libraries you are interested in because it won't need to. But, if the toolchain is built for multilib support, then rolling your own isn't a problem. Just pass the correct flag to gcc.

Mig21 01-29-2007 11:49 AM

thanks for the reply. i'm asking here because i'm a slackware user, i like it a lot. i'm guessing the multilib support isn't available in slackware? that would be a shame, i'd have to switch distros :(

i've heard from people with 64bit machines that they can't run flash. is that just because their browser was compiled for 64 bits?

weibullguy 01-29-2007 12:34 PM

Correct, Slackware doesn't provide a multilib option, or a 64-bit option either.

AMD64 uP are designed to be backward compatible. If someone can't run a 32-bit application, it's not the hardware. Adobe only provides Flash as a 32-bit plugin and it won't work with a 64-bit browser. I suspect they are using a 64-bit browser.

For example, Gentoo offers a 32-bit and a 64-bit browser for the multilibbers. The 32-bit browser handles all the plugins you're used to. CLFS only provides both if you compile and install both.

cathectic 01-29-2007 07:58 PM

AMD64 doesn't exactly "emulate" i386 - it can run the code in protected mode, as any normal x86 processor will (unlike the old Intel Itanium IA-64, which really does use emulation); the processor just switches to long mode for 64 bit access. If you don't run a 64 bit OS, the 32 bit OS will just stay in protected mode and be none the wiser.

Slackware does not have AMD64 support (and even if it does, Pat has stated that such a port would not be multilib).

Slamd64 can do 1 and 2. 3 is a problem - you can run 32 bit applications, but the 32 bit gcc has been dropped from Slamd64, so you would need a chroot with Slackware to compile 32 bit applications (and if you're doing so, this is the recommended way anyway, rather than having a strange mess of 32 and 64 bit libraries in the way).

To run Flash on AMD64 there are alternatives to installing 32 bit browsers - there is a rather hackish way to make 64 bit Konqueror load Flash, and for 64 bit Firefox, you can try using nspluginwrapper.

Mig21 01-30-2007 04:31 PM

that's great, i'll give slamd64 a try when i get the new hardware.

do you know if it gets security updates?

cathectic 01-30-2007 07:15 PM

As of Slamd64 11.0, yes.

oddiofile 08-16-2009 04:48 PM

What about programs like dpkg?
 
What about debian programs like dpkg that check the architecture of the package and reject it if the arch does not match?

I sometimes download .deb files that install fine as long as I can modify the 'control' file inside the .deb file to 'lie' and say it's amd64. But extracting, editing and repackaging the .deb file seems rather cumbersome.

What's an easier way to accompish the same thing? I.e. Tell my package installer to temporarily pretend it is an i386 instead of an amd64 while I try to install 'this one thing'.

oddiofile 08-16-2009 04:55 PM

Nevermind. I'm going to answer my own question:

sudo dpkg --force-architecture -i packageName.deb

should've rtfm'd this a long time ago!


All times are GMT -5. The time now is 05:43 PM.