compiling 32-bit binary on 64-bit machine

Hi,

I’m trying to compile 32-bit binary on a 64-bit machine. it doesen’t work and the compiler complains:

mech@roumet:11:28:03 in fortran>/opt/pgi9.0/linux86-64/9.0-3/bin/pgf95 -tp px -o test_pgi_32 test.f90
pgf95-Error-Please run makelocalrc to complete your installation

Compiling for 64-bit just works fine.

mech@roumet:11:29:53 in fortran>/opt/pgi9.0/linux86-64/9.0-3/bin/pgf95 -o test_pgi64 test.f90

I rerun makelocalrc in /opt/pgi9.0/linux86-64/9.0-3/bin/ with
makelocalrc /opt/pgi9.0/linux86-64/9.0-3/

with the result that localrc hasn’t changed.

My machine is ubuntu karmic 64-bit with glibc 2.10.1.

Any help is appreciated.

All best

mario

Hi Mario,

You most likely don’t have the Linux 32-bit development libraries installed on your system. These are required for use with the 32-bit PGI compilers. You should have received a warning message when you installed.

I believe the two packages you need are:

sudo apt-get install libc6-dev-i386
sudo apt-get install gcc-multilib

Once installed, reinstall the PGI compilers.

Hope this helps,
Mat