Operating System - Linux
1829103 Members
2217 Online
109986 Solutions
New Discussion

32-bit apps on Itanium running Redhat

 
C R S
Occasional Advisor

32-bit apps on Itanium running Redhat

Ok,
There seems to be some debate about compiling and running 32-bit applications on an Itanium server running Linux.

I've been told that it can't or shouldn't be done. That you can't compile but you can run a 32-bit application under an emulation layer with a hit on performance.

Well, a co-worker has just recently downloaded the 32-bit source code of several utilities and compiled them on a Itanium 2620 running EL4 and they are working fine. So now I'm not sure what to think.

any help out there?

TIA

CRS
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: 32-bit apps on Itanium running Redhat

Shalom,

it definitely can be done, depending of course on how it was compiled and what compiler was used to compile it.

It is possible however for developers to use calls the OS does not support and thereby requiring a recompile. It again totally depends on the code and the compiler that was used.

A great deal of effort has been made to give developers tools that work on both the 32 bit and 64 bit OS. The question is how they use those nice toys.

Your last paragraph says it all. Much of the open source stuff works both ways.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Manuel Wolfshant
Trusted Contributor

Re: 32-bit apps on Itanium running Redhat

Just a few things to add to the excellent reply Sep has offered :
- the first issue consists in the applications themselves. The code must be correctly written, that is _without_ making implied or hidden assumptions about where the code will run. In the early days of 64 bit, it was common for applications to blindly assume that they are on a 32bit platform. Writting portable code is not very difficult, but slipping away is easy, too. More then that, just because an application compiles and runs on 64 bit does not make it error free. Proper testing MUST be performed, especially with regard to sensitive applications. Just imagine that in some place a buffer with the length of one "word" is defined (whatever that length would be) and somewhere else it is used assuming a "specific" length (not necessary identical to the one used when defining it). It is a less common error today, but one that can still be found. And the compilers are not able to catch everything...
- second, in order to compile an application in order to run on a pure 64 bit destination requires proper settings of the devel chain. compiler, linker, libraries and so on. Not very difficult, either, but mandatory.
- last but not least: all 64 bit machines should, at least in theory, be able to run code written for 32 bit platforms. However, specific libraries might be needed for that. For instance I was forced to install the 32 bit version of glibc on an RHEL 4 / AMD64 (on which I intented to run only 64bit code), because I was supplied with only the 32bit version of an expensive commercial application (that is no source available).

Bottom line: on a 64 bit platform, you can develop/compile/run both 32 and 64 bit applications. The only obstacles are poorly written software or poor settings.