You are not logged in.

#1 2009-02-21 12:28:14

lucho
Member
Registered: 2009-02-21
Posts: 5

32-bit apps on x86_64

Hello, im a new to Arch

I have a very newbish question and I guess it has been discussed many times already, but i was not able to find answer, so here i go
I installed the 64-bit Arch linux (x86_64). It seems to run well except for that i have trouble running 32-bit apps.

At first i tried a simple 32-bit app that only uses glibc. It said "no such file or directory" or something similar.
After a bit digging i installed a 32-bit glibc. Fortunately the 32-bit glibc did not produce any file name clashes with the 64-bit glibc.
The whole system continued to work and the simple 32-bit application now worked too.

Then i tried some more complex 32-bit app, which uses other 32-bit libs (lile libX11).
This time it did not say "no such file or directory" but complained about wrong ELF type or something like that.
From that i comclude that now it finds a library with the wanted name, but it is 64-bit instead of 32-bit.
So maybe if i try to install 32-bit variant there will be file name clashes.

Is there a way to run _any_ 32-bit apps on x86_64 Arch linux? Maybe some compatibility package?

If you suggest that i recompile my 32-bit apps to 64-bit, that is not that easy and sometimes it is impossible.
For example i have some binary-only apps that are not open-source. Like, say, the game doom3.

Offline

#2 2009-02-21 12:58:51

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: 32-bit apps on x86_64

Have you seen this page in the wiki?


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#3 2009-02-21 13:16:37

evilgold
Member
Registered: 2008-10-30
Posts: 120

Re: 32-bit apps on x86_64

well as xyne suggested you could set up a 32bit chroot, but depening on how many 32bit apps you need to run, installing the proper libs shouldnt be too hard. the only 32 bit apps i use are wine and skype. I know wine requires quiet a bit of libs to fully work, and i ended up using yaourt to search for "lib32" and installing all the results. One of the most important ones would be whatever lib32 is for your video card, which took me a minute to figure out when i had wine working but couldnt load and no working direct-x graphics.

Offline

#4 2009-02-21 18:19:18

lucho
Member
Registered: 2009-02-21
Posts: 5

Re: 32-bit apps on x86_64

I don't like the chroot idea.
I need my system to natively run 32-bit programs as well as 64-bit in the same file system and without any unnecessary complications.
I gather there is no way to do that in Arch linux then.
That's too bad. I liked Archlinux and its package system. But now it seems it won't work for me after all  sad
Well, thanx for the replies anyway.

Offline

#5 2009-02-21 18:40:06

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: 32-bit apps on x86_64

What system can run 64-bit and 32-bit apps natively at the same time? If you think another system is doing that for you then it's probably because it hides the 32-bit libs from you.

You could also use virtualization to host a 32-bit system and run what you need in that.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#6 2009-02-21 18:48:48

Ranguvar
Member
Registered: 2008-08-12
Posts: 2,549

Re: 32-bit apps on x86_64

Arch'll work fine. If you don't want a chroot, then just run the 32-bit app you want, look for its error message, and install that lib32 from the AUR. If there isn't one, make one - it's very simple.

Offline

#7 2009-02-22 15:26:46

lucho
Member
Registered: 2009-02-21
Posts: 5

Re: 32-bit apps on x86_64

Xyne wrote:

What system can run 64-bit and 32-bit apps natively at the same time? If you think another system is doing that for you then it's probably because it hides the 32-bit libs from you.

If no distro can do what i want, then i guess i will have to stick to 32-bit linux for now. I'd hate the thought that half of my CPU stays unused tho sad


Ranguvar wrote:

Arch'll work fine. If you don't want a chroot, then just run the 32-bit app you want, look for its error message, and install that lib32 from the AUR. If there isn't one, make one - it's very simple.

I think the problem with this is that both the 64- and 32-bit variants of some libs use the same name.
Maybe if i put the 32-bits in a different dir (like /lib32 and /usr/lib32) and somehow explain to the 32-bit dynamic loader where to look for them (or patch it)?

It would be best if it was possible to build the libs in a way to permit both 32-bit and 64-bit apps to link with them at the same time. Maybe provide 2 entry points for each exported function - one for 32-bit apps and another for 64-bit.

Last edited by lucho (2009-02-22 15:52:59)

Offline

#8 2009-02-22 16:14:08

Zeist
Arch Linux f@h Team Member
Registered: 2008-07-04
Posts: 532

Re: 32-bit apps on x86_64

lucho wrote:

If no distro can do what i want, then i guess i will have to stick to 32-bit linux for now. I'd hate the thought that half of my CPU stays unused tho sad

Why would half of your CPU stay unused? I think you need to read up a bit more on what the actual difference is in running 32bit and 64bit applications.

Last edited by Zeist (2009-02-22 16:15:03)


I haven't lost my mind; I have a tape back-up somewhere.
Twitter

Offline

#9 2009-02-22 16:36:13

toxygen
Member
Registered: 2008-08-22
Posts: 713

Re: 32-bit apps on x86_64

Zeist wrote:
lucho wrote:

If no distro can do what i want, then i guess i will have to stick to 32-bit linux for now. I'd hate the thought that half of my CPU stays unused tho sad

Why would half of your CPU stay unused? I think you need to read up a bit more on what the actual difference is in running 32bit and 64bit applications.

yeah, i'm thinking there's a misunderstanding about 32bit vs 64 bit going on here. 
And lucho, the lib32 packages coexist with the 64bit lib packages, doing exactly what you referred to in a previous post (ie. ldd can tell the difference, and 32 bit apps get loaded with 32bit libs, 64bit apps with 64 bit libs), so i'm still not seeing the problem you have with that?

they wont use the "same name", as you will have libX11.so, and lib32-libX11.so, both co-existing, and the 32 bit apps are setup in such a way to know where to look for their lib32 versions..

Last edited by toxygen (2009-02-22 16:37:16)


"I know what you're thinking, 'cause right now I'm thinking the same thing. Actually, I've been thinking it ever since I got here:
Why oh why didn't I take the BLUE pill?"

Offline

#10 2009-02-22 16:39:36

lucho
Member
Registered: 2009-02-21
Posts: 5

Re: 32-bit apps on x86_64

Zeist wrote:
lucho wrote:

If no distro can do what i want, then i guess i will have to stick to 32-bit linux for now. I'd hate the thought that half of my CPU stays unused tho sad

Why would half of your CPU stay unused? I think you need to read up a bit more on what the actual difference is in running 32bit and 64bit applications.

I know, in practice 64bit system is not faster or anything.

It just bothers me to think that half of the cpu registers stay unused (the 8 new ones), the old 8 registers have only their lower 32-bits in use. The fat 64-bit multipliers, barrel shifters, etc.
All that fancy new stuff in the CPU, that i was enthusiastic about when i bought it, now it stays unused.

Its just a psychological condition i guess smile

Offline

Board footer

Powered by FluxBB