I am on machine 64 bits with a linux 64 bits… Anybody knows how to compile a code FORTRAN in 32 bits with pgf77 on a machine 64 bits?
Hi,
Either set PATH to 32-bit compiler which is located in $PGI/linux86/ directory or add -tp flag if you set PATH to 64-bit compiler. See pgf90 -help -tp for detail which tp flag is the best for your system.
Hongyon
Hi,
I try : /opt/pgi/linux86/7.1-6/bin/pgf77 -o remplir remplir.f
and i have _____________________________________________________________
/usr/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libc.a when searching for -lc
/usr/bin/ld: i386:x86-64 architecture of input file /usr/lib/crt1.o' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file
/usr/lib/crti.o’ is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/crtn.o’ is incompatible with i386 output
And i try pgf77 -tp core2 -o remplir remplir.f
I have _________________________________________________________________
/usr/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libc.a when searching for -lc
/usr/bin/ld: i386:x86-64 architecture of input file /usr/lib/crt1.o' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file
/usr/lib/crti.o’ is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/crtn.o’ is incompatible with i386 output
I use in my PATH
compilo PGI
export PGI=/opt/pgi
export LM_LICENSE_FILE=$PGI/license.dat
export PATH=$PGI/linux86/7.1/bin:$PATH
export MANPATH=$MANPATH:$PGI/linux86/7.1/man
and for LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/opt/pgi/linux86/7.1-6/lib:/usr/lib32:/lib32:/opt/pgi/linux86/7.1-6/liblf
But i have this problem
/usr/bin/ld: skipping incompatible /usr/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/librt.so when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/librt.a when searching for -lrt
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libpthread.a when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libm.so when searching for -lm
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libm.a when searching for -lm
/usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libc.so when searching for -lc
/usr/bin/ld: skipping incompatible /usr/bin/…/lib/libc.a when searching for -lc
/usr/bin/ld: i386:x86-64 architecture of input file /usr/lib/crt1.o' is incompatible with i386 output /usr/bin/ld: i386:x86-64 architecture of input file
/usr/lib/crti.o’ is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/crtn.o’ is incompatible with i386 output
Hi,
What OS is this? Is it possible that your system support only 64-bit? PGI compiler rely on system 32-bit libraries and linker.
Can you try unset LD_LIBRARY_PATH and compile? Can you post what is in /opt/pgi/linux86/7.1/bin/localrc?
Hongyon
Hi,
Os is Xubuntu 64 bits
The command : uname -a give :
Linux DEBIAN64 2.6.22-14-generic #1 SMP Tue Feb 12 02:46:46 UTC 2008 x86_64 GNU/Linux
My system can support 64-bit and 32-bit, i can compile with g77 -m32…
i try unset LD_LIBRAY_PATH and compile but i have the same problem as…
In /opt/pgi/linux86/7.1/bin/localrc:
set LFC=-lg2c;
set LDSO=/lib/ld-linux.so.2;
set GCCDIR=/usr/lib/gcc/x86_64-linux-gnu/4.1.3/32;
set GCCINC=/usr/lib/gcc/x86_64-linux-gnu/4.1.3/include;
set G77DIR=/usr/lib/gcc/x86_64-linux-gnu/3.4.6//32;
set OEM_INFO=32-bit target on x86-64 Linux $INFOTPVAL;
set LOCALRC=YES;
set THROW=__THROW=;
set EXTENSION=extension=;
set LC=$if(-Bstatic,-lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc, -lgcc -lc -lgcc);
set DEFLIBDIR=/usr/lib;
set DEFSTDOBJDIR=/usr/lib;
set EXTRAASARGS=–32;
GLIBC version 2.6.1
GCC version 4.1.3
export PGI=/opt/pgi;
makelocalrc executed by root Wed Apr 30 15:45:52
Hi,
We will install Ubantu here. Once it is up and running, we will let you know what the problem is.
Thanks for your patience.
Hongyon
Hi,
Do you have /usr/lib32 ? If not, Please run following command:
% sudo apt-get install ia32-libs
Then reinstall again.
Hongyon
i have /usr/lib32 and i have /lib32.
The compilation 32 is ok with gcc or g77 for exemple :
g77 -m32 -o remplir remplir.f
and the command ldd give
espinasse@DEBIAN64:~/_REMPLIR_V2/src$ ldd remplir
linux-gate.so.1 => (0xffffe000)
libm.so.6 => /lib32/libm.so.6 (0xf7f44000)
libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7f39000)
libc.so.6 => /lib32/libc.so.6 (0xf7dee000)
/lib/ld-linux.so.2 (0xf7f80000)
espinasse@DEBIAN64:~/_REMPLIR_V2/src$ file remplir
remplir: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.6.8, dynamically linked (uses shared libs), not stripped
Hi,
Can you please try edit /opt/pgi/linux86/7.1-6/localrc as follow:
set DEFLIBDIR=/usr/lib32
set DEFSTDOBJDIR=/usr/lib32
and remove
set EXTRAASARGS=–32.
and let me know if that works. We will review our install for our Ubantu installation once we have it up and running.
Thanks for you help,
Hongyon
Hi,
i edit my /opt/pgi/linux86/7.1-6/bin/localrc :
set LFC=-lg2c;
set LDSO=/lib/ld-linux.so.2;
set GCCDIR=/usr/lib/gcc/x86_64-linux-gnu/4.1.3/32;
set GCCINC=/usr/lib/gcc/x86_64-linux-gnu/4.1.3/include;
set G77DIR=/usr/lib/gcc/x86_64-linux-gnu/3.4.6//32;
set OEM_INFO=32-bit target on x86-64 Linux $INFOTPVAL;
set LOCALRC=YES;
set THROW=__THROW=;
set EXTENSION=extension=;
set LC=$if(-Bstatic,-lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc, -lgcc -lc -lgcc);
set DEFLIBDIR=/usr/lib;
set DEFSTDOBJDIR=/usr/lib;
set EXTRAASARGS=–32;
GLIBC version 2.6.1
GCC version 4.1.3
export PGI=/opt/pgi;
makelocalrc executed by root Wed Apr 30 15:45:52
I try remplace DEFLIBDIR and DEFSTDOBJDIR and remove EXTRAASARGS as this :
set LFC=-lg2c;
set LDSO=/lib/ld-linux.so.2;
set GCCDIR=/usr/lib/gcc/x86_64-linux-gnu/4.1.3/32;
set GCCINC=/usr/lib/gcc/x86_64-linux-gnu/4.1.3/include;
set G77DIR=/usr/lib/gcc/x86_64-linux-gnu/3.4.6//32;
set OEM_INFO=32-bit target on x86-64 Linux $INFOTPVAL;
set LOCALRC=YES;
set THROW=__THROW=;
set EXTENSION=extension=;
set LC=$if(-Bstatic,-lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc, -lgcc -lc -lgcc);
#set DEFLIBDIR=/usr/lib;
#set DEFSTDOBJDIR=/usr/lib;
set DEFLIBDIR=/usr/lib32;
set DEFSTDOBJDIR=/usr/lib32;
#set EXTRAASARGS=–32;
GLIBC version 2.6.1
GCC version 4.1.3
export PGI=/opt/pgi;
makelocalrc executed by root Wed Apr 30 15:45:52
Now, THE COMPILATION with pgf77 is ok in 32 bits on OS 64 bits
Thanks