I had to get PGI 19.10 to work on macOS Big Sur with XCode 12 to build some software (Gaussian). Even though not officially supported it seems to work with minor adjustments.
I already had PGI 19.10 installed prior to the update and it might not even be possible to install it on newer macOS, but if you already have PGI 19.x installed and updated to Big Sur, here are some instructions to make it run:
-
After an update of macOS/XCode, you probably have to run
makelocalrc
to update the include/library paths. Butmakelocalrc
contains a version check for XCode, hence “fix” the version check inbin/makelocalrc
by changingif test $xcodever -gt 11 ; then
to
if test $xcodever -gt 12 ; then
Then run:
sudo makelocalrc -x /opt/pgi/osx86-64/19.10
. -
Compiling software may fail at the linker step stating that either
-lpthread
or theSecurity framework
could not be found (even though you haven’t specified either). Comparing the linker invocation emitted bypgcc
/pgf77
/pgf90
by runningpgcc -v somefile.c
and comparing toclang -v somefile.c
reveals that-syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk
is missing. Add it to theEXTRAPGILNKOPT
variable inbin/osxrc
:variable EXTRAPGILNKOPT is default (-syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -framework Security -framework IOKit -framework CoreFoundation);
After that I was able to use pgcc
, pgf77
and pgf90
again to build functional executables.