MaXX Interactive Tech-Notes ~ How-to 32/64 bit Architectures
Tech-Note number : TN-0806-0001
Category : system
Tags : system, x86_64, Ubuntu
Version : 0.8
Created on : June, 23rd 2008
Last Modification : Sept, 18th 2008
I. Prerequisite Tech-Note reading prior to read this one! None at the moment.
II. References and useful reading

Wiki x86-64

http://en.wikipedia.org/wiki/x86-64

Running 32-bit Applications on 64-bit Debian GNU/Linux

http://www.debian-administration.org/articles/534

Using proprietary i386 apps on an amd64 system
http://www.debian-administration.org/articles/531


1. How to properly setup an Environment to support both x86 and
x86_64bit architectures on Ubuntu 8.04+
Ok, we assume you are already running Ubuntu x86_64, right? To make sure try this Linux command;
$ uname -p
The output should be:  x86_64   if you are running a full 64bit Linux. Otherwise

3.1 Fetching the ia32 sub-system for supporting 32bit libraries and applications under Linux X86_64.

The ia32 sub-system is very useful for running code that has no 64bit support yet. The ia32 sub-system can be removed later when there are no more 32bit code hanging around.  But for the time being, we will learn to live with a dual architecture platform.   Linux is very good when it comes to supporting both 32 and 64 bits architectures and they key to success is a clean separation between the two execution environments.

$ sudo apt-get install ia32-libs
3.2 Learn about how to use the modular aspect of ldd with the /etc/ld.so.conf file and its
new directory /etc/ld.so.conf.d/ where all *.conf file resides.

$ cat /etc/ld.so.conf

you should see this: include /etc/ld.so.conf.d/*.conf

$ cd /etc/ld.so.conf.d/

it should show you a list of existing files which includes directory to be added to ldd library_path.

3.3 A
dding 32bit MaXX library_path file
$ sudo echo /opt/MaXX/lib32 > /etc/ld.so.conf.d/MaXX-32bit.conf

3.4 Adding 64bit MaXX library_path file

$ sudo echo /opt/MaXX/lib64  > /etc/ld.so.conf.d/MaXX-64bit.conf
$ sudo echo /opt/MaXX/OpenMotif-2.1.32/lib64  >> /etc/ld.so.conf.d/MaXX-64bit.conf

more to come...