Cross compiling Xerces 32bit library on a 64bit machine

Oh the bundle of joy this was….

To build 32 bit serves on a 64 bit machine you need to run the following 🙂

apt-get install libc6-i386  libc6-dev-i386 lib32gcc1 libstdc++6  libstdc++6-4.4-dev g++-multilib gcc-multilib

CC=”gcc-4.4 -m32″ CXX=’g++ -m32′ LDFLAGS=”-m32 -L/lib32 -L/usr/lib32 -Wl,-rpath,/lib32 -Wl,-rpath,/usr/lib32″ ./configure –v


make install

ln -s /usr/local/lib/ /usr/lib32/

Hope this helps someone 🙂

Oh install readelf so you can run

readelf -h /usr/lib32/

To check it has compiled as 32 bit 🙂