Link error on FC-3

I’m trying pgi 5.2-4 on an athlon xp machine running FC-3 to compile F77 programs. I got the following error when linking:

/usr/bin/ld: /crtbegin.o: No such file: No such file or directory

However, g77 works well for the same programs. The gcc is 3.4.2, glibc is 2.3.3. Are they compatible with pgi 5.2? Any solutions for the problem?


Fedora Core 3 is new enough that its not offically supported by 5.2-4. I your case, the “makelocalrc” script either didn’t recognize or got the path to your GCCDIR wrong. The crtbegin.o file comes from glibc. Look in your bin directory’s “localrc” file. It should have the following varaibles:

set LFC=-lg2c;
set LDSO=/lib/;
set GCCDIR=/usr/lib/gcc-lib/i586-suse-linux/3.3.4;
set GCCINC=/usr/lib/gcc-lib/i586-suse-linux/3.3.4/include;
set G77DIR=/usr/lib/gcc-lib/i586-suse-linux/3.3.4;
set HAMMER=;
set X86_64=;

This is an example from a SuSE 9.2 system so your paths will be different. Make sure that you have these varaibles set and that the paths are correct. If “localrc” does not exist, then run "makelocalrc -x " or create “localrc” mannually.

Hope this helps!

Thank you VVVVVVVV much! It works!

it works
from china