Hi,
I have installed PGI compiler on my computer (with SUSE 10.2, 64bits), by two different ways :
- by using the program of a server,
- or by making a local installation
In both cases I have the same error when pgf90 call the linker. Lets take the
local program for example, the localrc file contains :
set LDSO=/lib64/ld-linux-x86-64.so.2;
set GCCDIR=/usr/lib64/gcc/x86_64-suse-linux/4.1.2;
set GCCINC=/usr/lib64/gcc/x86_64-suse-linux/4.1.2/include;
set G77DIR="";
set OEM_INFO=64-bit target on x86-64 Linux;
set NUMALIBS=-lnuma ;
set LOCALRC=YES;
set THROW=__THROW=;
set EXTENSION=__extension__=;
set COMPGLIBLFDIR=;
set COMPGCCINCDIR=include-gcc41;
set LC=$if(-Bstatic,-lgcc -lgcc_eh -lc -lgcc -lgcc_eh -lc, -lgcc -lc -lgcc);
# GLIBC version 2.5
# GCC version 4.1.2
set LOCALCOMPLIB=/usr/local/PGI/7.0-5/lib64;
export PGI=/usr/local/PGI;
# makelocalrc executed by root Mon Jul 9 18:11:28
All theses informations seems correct … But when I try to compile a program, I have the following error (I just use -# option to have the command line printed) :
/usr/local/PGI/linux86-64/7.0-5/bin/pgf90 -# lett_min_1.o lect_ligne_3.o lect_entree_3.o coordrot_1.o invmat.o fctmu_1.o env_8.o -o ../Exe/xenv
/usr/bin/ld /usr/lib64/crt1.o /usr/lib64/crti.o /usr/local/PGI/linux86-64/7.0-5/lib/trace_init.o /usr/lib/gcc/i586-suse-linux/4.0.2/crtbegin.o /usr/local/PGI/linux86-64/7.0-5/lib/f90main.o -m elf_x86_64 -dynamic-linker /lib/ld-linux.so.2 /usr/local/PGI/linux86-64/7.0-5/lib/pgi.ld -L/usr/local/PGI/7.0-5/lib64 -L/usr/local/PGI/linux86-64/7.0-5/lib -L/usr/lib64 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -rpath /usr/local/PGI/7.0-5/lib64 -rpath /usr/local/PGI/linux86-64/7.0-5/lib lett_min_1.o lect_ligne_3.o lect_entree_3.o coordrot_1.o invmat.o fctmu_1.o env_8.o -o ../Exe/xenv -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lnspgc -lpgc -lrt -lpthread -lm -lgcc -lc -lgcc /usr/lib/gcc/i586-suse-linux/4.0.2/crtend.o /usr/lib64/crtn.o
/usr/bin/ld: /usr/lib/gcc/i586-suse-linux/4.0.2/crtbegin.o: No such file: No such file or directory
pgf90-Fatal-linker completed with exit code 1
make: *** [main] Erreur 2
Why does the compiler use the /usr/lib/gcc/i586-suse-linux/4.0.2/ directory (which does not exist) instead of the one written in the localrc file ???
To be sure that pgf90 read the localrc file, I tried change an other line, and I replaced : “set LOCALCOMPLIB=/usr/local/PGI/7.0-5/lib64” by “set LOCALCOMPLIB=TEMPORARY_CHECK”
And this change appears in the command line :
/usr/bin/ld /usr/lib64/crt1.o /usr/lib64/crti.o /usr/local/PGI/linux86-64/7.0-5/lib/trace_init.o /usr/lib/gcc/i586-suse-linux/4.0.2/crtbegin.o /usr/local/PGI/linux86-64/7.0-5/lib/f90main.o -m elf_x86_64 -dynamic-linker /lib/ld-linux.so.2 /usr/local/PGI/linux86-64/7.0-5/lib/pgi.ld -LTEMPORARY_CHECK -Lexport -LPGI=/usr/local/PGI -L/usr/local/PGI/linux86-64/7.0-5/lib -L/usr/lib64 -L/usr/lib/gcc/i586-suse-linux/4.0.2 -rpath TEMPORARY_CHECK export PGI=/usr/local/PGI -rpath /usr/local/PGI/linux86-64/7.0-5/lib lett_min_1.o lect_ligne_3.o lect_entree_3.o coordrot_1.o invmat.o fctmu_1.o env_8.o -o ../Exe/xenv -lpgf90 -lpgf90_rpm1 -lpgf902 -lpgf90rtl -lpgftnrtl -lnspgc -lpgc -lrt -lpthread -lm -lgcc -lc -lgcc /usr/lib/gcc/i586-suse-linux/4.0.2/crtend.o /usr/lib64/crtn.o
So pgf90 read the localrc file. But why pgf90 use another gcc directory ??
If you have any idea, I would be grateful !
Alain G.