PGI User Forum
 SearchSearch   MemberlistMemberlist     RegisterRegister   ProfileProfile    Log inLog in 

CUDA-x86.

gcc directory problem

 
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation
View previous topic :: View next topic  
Author Message
alain



Joined: 09 Jul 2007
Posts: 2

PostPosted: Tue Jul 10, 2007 9:09 am    Post subject: gcc directory problem Reply with quote

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 :

Code:

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) :

Code:

/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 :

Code:

/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.
Back to top
View user's profile
mkcolg



Joined: 30 Jun 2004
Posts: 5952
Location: The Portland Group Inc.

PostPosted: Tue Jul 10, 2007 2:28 pm    Post subject: Reply with quote

Hi Alain,

Can you please post the output of the following commands:

1. gcc -v hello.c
2. gcc -v -m32 hello.c
3. pgf77 -tp k8-64 -dryrun hello.f
4. pgf77 -tp k8-32 -dryrun hello.f
5. pgf77 -v hello.f
6. pgf77 -tp k8-64 -v hello.f
7. pgf77 -tp k8-32 -v hello.f

Where "hello.f" is:
Code:
   print *,"hello "
      end

and "hello.c" is
Code:
#include <stdio.h>
int main()
{
 printf(" hello\n");
}


Thanks,
Mat
Back to top
View user's profile
alain



Joined: 09 Jul 2007
Posts: 2

PostPosted: Wed Jul 11, 2007 5:25 am    Post subject: Problem Resolved Reply with quote

Hi Mat,

when using the following command :
pgf77 -tp k8-64 -dryrun hello.f
I saw that PGI was reading files located in my home directory :
.mypgf77rc and .mypgf90rc

These files are 1 years old, and should have been created by the network administrator, who installed the previous version of PGI.
The wrong gcc directory (/usr/lib/gcc/i586-suse-linux/4.0.2) was defined in these files.

I have renamed these files, and now the compiler works properly !

I thank you for your help !

Alain.
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    PGI User Forum Forum Index -> Licenses and Installation All times are GMT - 7 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © phpBB Group