pgfortran-Fatal-Unable to find executable pgfortran in path

Hi,

It appears that the pgfortran compiler can’t determine it’s own path when executable permissions are given through ACLs rather than standard POSIX permissions:

> whoami
bjm900

> groups
z00 ANUSF

> which pgfortran
/apps/pgi/pgi-15.7/linux86-64/15.7/bin/pgfortran

> ls -l /apps/pgi/pgi-15.7/linux86-64/15.7/bin/pgfortran
-r-xrwx---+ 1 rxk900 apps 191888 Jul 10 06:16 /apps/pgi/pgi-15.7/linux86-64/15.7/bin/pgfortran

> getfacl /apps/pgi/pgi-15.7/linux86-64/15.7/bin/pgfortran
getfacl: Removing leading '/' from absolute path names
# file: apps/pgi/pgi-15.7/linux86-64/15.7/bin/pgfortran
# owner: rxk900
# group: apps
user::r-x
user:bjm900:r-x
group::r-x
mask::rwx
other::---

> pgfortran
pgfortran-Fatal-Unable to find executable pgfortran in path

> /apps/pgi/pgi-15.7/linux86-64/15.7/bin/pgfortran
pgfortran-Warning-No files to process

This is because it appears to be using stat(2) instead of access(2) to determine if it can execute it, and thus misses when executability is provided via ACLs.

Cheers,
Ben