I can not compile a simple program on RedHat 7.5 using PGI 18.4:
% cat hello_world.f90
write(,) “Hello, world”
% pgfortran hello_world.f90
/usr/bin/ld: cannot find /usr/lib/gcc/x86_64-redhat-linux/4.4.7/crtbegin.o: No such file or directory
% uname -a
Linux atmos3 3.10.0-693.21.1.el7.x86_64 #1 SMP Fri Feb 23 18:54:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
% pgfortran --version
pgfortran 18.4-0 LLVM 64-bit target on x86-64 Linux -tp haswell
My site has a Professional license, and PGI 18.5 is fine, but I usually assume the community version is the most stable.
Did you update your OS or perhaps using a PGI 18.4 which was installed on a different system?
The error is because the compilers can’t find the system crtbegin.o object file which comes with the GNU installation. It’s expecting it to be GNU version 4.4.7, but RedHat 7.5 uses GNU 4.8.5.
The compiler configuration information (including information on the installed GNU version) is contained a file call “localrc” in your compiler bin directory. You can update the localrc file by running the “makelocalrc” script or reinstall the compilers.
Usage: /proj/pgi/linux86-64/18.4/bin/makelocalrc [installdir] [switches]...
installdir the directory where the PGI compilers are installed
-d outdir directory to put localrc; default is installdir
-n show the install information, do not write a localrc file
-o create the localrc file and write to stdout
-x write the localrc file and place in outputdir
-l lic flexlm license file to add to localrc
-gcc gcc gcc command name; default is gcc
-gpp g++ g++ command name; default is g++
-g77 g77 g77 command name; default is g77
-net locdir perform network install with named local directory
Example: /proj/pgi/linux86-64/18.4/bin/makelocalrc -x /proj/pgi/linux86-64/18.4/bin
Hmm, I’m not sure how that happened. I reinstalled, and it is fine now. We don’t have any cluster nodes at an earlier version of the OS.
When installing, I typically choose “network installation”, and when it is done, I rename the (now two) bin/localrc.hostname files to bin/localrc because the file system is shared by all the nodes of the cluster. Quite possibly there is an install guide somewhere that I’m not reading, but that works for me.