OSX link warning with pgcc & -fPIC

I’m seeing a compile warning when pgcc is invoked with -fPIC [on OSX]

Its not a critical issue - but wanted to reprot.

thanks,

balay@imav^~/junk $ sw_vers
ProductName: Mac OS X
ProductVersion: 10.9.2
BuildVersion: 13C64
balay@imav^~/junk $ clang --version
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.1.0
Thread model: posix
balay@imav^~/junk $ pgcc --version

pgcc 14.3-0 64-bit target on Apple OS/X developer
The Portland Group - PGI Compilers and Tools
Copyright © 2014, NVIDIA CORPORATION. All rights reserved.
balay@imav^~/junk $ cat x.c
#include <stdio.h>

int main(int argc,char **args)
{
printf(“testing\n”);
return 0;
}
balay@imav^~/junk $ pgcc x.c
balay@imav^~/junk $ pgcc -fPIC x.c
ld: warning: directory not found for option ‘-L/Applications/Free PGI.app/Contents/Resources/pgi/osx86-64/14.3/libso’
balay@imav^~/junk $ ls “/Applications/Free PGI.app/Contents/Resources/pgi/osx86-64/14.3/”
bin/ etc/ lib/ src/
doc/ include/ man/

Hi sab,

Thanks for the report. I’ll file a report on this with our developers here.

Best regards,

+chris

This issues exists in 17.10 aswell

petsc-mini:junk petsc$ pgcc -fPIC ntest.c
ld: warning: directory not found for option '-L/opt/pgi/osx86-64/17.10/libso'
petsc-mini:junk petsc$ sw_vers 
ProductName:	Mac OS X
ProductVersion:	10.11.6
BuildVersion:	15G17023
petsc-mini:junk petsc$ xcodebuild -version
Xcode 8.2.1
Build version 8C1002
petsc-mini:junk petsc$ pgcc --version

pgcc 17.10-0 64-bit target on macOS -tp penryn 
PGI Compilers and Tools
Copyright (c) 2017, NVIDIA CORPORATION.  All rights reserved.
petsc-mini:junk petsc$

workarround:

sudo mkdir /opt/pgi/osx86-64/17.10/libso

I see this issue is not yet fixed in:

pgcc 18.4-0 64-bit target on macOS -tp penryn

Hi sab,

Hmm. Looking at TPR#20337 which is the report Chris filed, this was fixed in the 14.9 release. Though I just checked and see the warning. We must have accidentally reintroduced this at some point. I’ve reopended the report and will have out engineers take a look.

Note that “-fPIC” is a no-op on MacOSX and the fix is for the compiler to ignore this flag.

-Mat

This issue should be resolved in 19.1