New messages from FreePGI after OS X updates

After updating to the latest Yosemite and Xcode, get a bunch of the following messages when compiling my application exactly as before:

pgfortran-Warning-Malformed $expr(), nonnumeric value Apple LLVM version 60100 (clang-60200049) (based on LLVM 30600svn)

Also FreePGi is still at version 14.7-0. Will there be an update to 15.0?

Al Greynolds

After updating the OS X system, you must install again.

I think you will find the current Free PGI OSX version is 15.4.

regards,
dave

I don’t see a separate FreePGI download so I can update from 14.7 to 15.4.

Al

I just now installed FreePGI 15.4 on Mac OS 10.10.3 and got the same kind of warnings:

pgfortran-Warning-Malformed $expr(), nonnumeric value Apple LLVM version 60100 (clang-60200049) (based on LLVM 30600svn)
pgfortran-Warning-Malformed $expr(), nonnumeric value Apple LLVM version 60100 (clang-60200049) (based on LLVM 30600svn)
:
pgfortran-Warning-Malformed $expr(), nonnumeric value Apple LLVM version 60100 (clang-60200049) (based on LLVM 30600svn)

I can confirm that the install Xcode version is 6.3.1 and command line tools are up to date means version 6.3 (April 22, 2015 release). Any solution will be appreciated.

PS: Apart from the noted warnings, the freePGI also fails to compile a code which has overloaded type. I took the same example as given in PGI documentation and attached herewith for consideration.

! Note: Type Overloading is not working with freePGI

module mod_shape

  implicit none
  private ! hide the type-bound procedure implementation procedures
  public :: shape ! allow access to shape
  !
  ! parent type
  !
  type shape
    private
    integer :: color
    logical :: filled
    integer :: x
    integer :: y
  contains
    private 
    procedure         :: initShape  ! private type-bound procedure
    procedure, public :: print      ! allow access to print type-bound procedure
  end type shape
  !
  ! child type
  !
  type, extends(shape) :: rectangle
    integer :: length
    integer :: width
  end type rectangle
  !
  ! grandchild type
  !
  type, extends(rectangle) :: square
  end type square
  !
  ! generic interface
  !
  interface shape
    procedure :: constructor
  end interface shape
  
contains
  
  function constructor (color, filled, x, y) result (res)
    implicit none
    type(shape) :: res
    integer,     intent(in)    :: color
    logical,     intent(in)    :: filled
    integer,     intent(in)    :: x
    integer,     intent(in)    :: y
    call res%initShape (color, filled, x, y)
  end function constructor
  
  subroutine initShape (this, color, filled, x, y)
    implicit none
    class(shape), intent(inout)        :: this
    integer,      intent(in)           :: color
    logical,      intent(in)           :: filled
    integer,      intent(in)           :: x
    integer,      intent(in)           :: y
    
    ! initialize shape type compoenents
    this%color  = color
    this%filled = filled
    this%x      = x
    this%y      = y

  end subroutine initShape
  
  subroutine print(this)
    implicit none
    class(shape), intent(in) :: this
    print *, this%color, this%filled, this%x, this%y
  end subroutine
  
end module mod_shape

program test_shape
  use mod_shape
  
  implicit none
  type(shape) :: sh
  
  ! invoke constructor through shape generic interface
  sh = shape (5, .true., 100, 200)
  call sh%print()
  
end program test_shape

This will not be fixed until the 15.5 release is out.

makelocalrc does not handle this properly.

Send the localrc file created in the 64-bit PGI bin directory, along with the
output dialog of

% gcc -v -m64 -o hello hello.c


where hello.c is a very simple C program.

Send it to trs@pgroup.com
and we will construct the proper localrc file for now.

I do not see any localrc file in the 64-bit PGI bin directory but there are makelocalrc and nolocalrc files. Moreover, the output dialog of

$ gcc -v -m64 -o hello hello.c

is

Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix

Did you compile a real hello.c file?

===========================
#include <stdio.h>
int main(){printf(“Hello!\n”);}

we need to see verbose output to see where gcc is getting its files,
and determine that you really are running Xcode 6.3.1

thanks,
dave

The verbose output of the program what you suggested is as follows:

Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang" -cc1 -triple x86_64-apple-macosx10.10.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name hello.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 242 -v -dwarf-column-info -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0 -fdebug-compilation-dir /Users/rkgautam/Desktop -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.10.0 -fencode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/tw/d26hhdw56zbb9_4_l2_5b4km0000gn/T/hello-793149.o -x c hello.c
clang -cc1 version 6.1.0 based upon LLVM 3.6.0svn default target x86_64-apple-darwin14.3.0
ignoring nonexistent directory "/usr/local/include"
#include "..." search starts here:
#include <...> search starts here:
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0/include
 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
 /usr/include
 /System/Library/Frameworks (framework directory)
 /Library/Frameworks (framework directory)
End of search list.
 "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld" -demangle -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o a.out /var/folders/tw/d26hhdw56zbb9_4_l2_5b4km0000gn/T/hello-793149.o -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/6.1.0/lib/darwin/libclang_rt.osx.a

I also checked Xcode version:

$ xcodebuild -version
Xcode 6.3.1
Build version 6D1002

I’m having exactly the same problem. The simple program compiles but the warnings are annoying and it looks like there is something wrong with the configuration.

pgfortran-Warning-Malformed $expr(), nonnumeric value Apple LLVM version 60100 (clang-60200049) (based on LLVM 30600svn)

gcc -v test.c -o testc

Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn)
Target: x86_64-apple-darwin14.3.0
Thread model: posix
“/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang” -cc1 -triple x86_64-apple-macosx10.10.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name test.c -mrelocation-model pic -pic-level 2 -mdisable-fp-elim -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 242 -v -dwarf-column-info -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/lib/clang/6.1.0 -fdebug-compilation-dir /Users/user/dir/dir/dir/test -ferror-limit 19 -fmessage-length 80 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime=macosx-10.10.0 -fencode-extended-block-signature -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -o /var/folders/wz/rkvf2_0j38n3r9zt53jw2jm00000gn/T/test-3f2719.o -x c test.c
clang -cc1 version 6.1.0 based upon LLVM 3.6.0svn default target x86_64-apple-darwin14.3.0
#include “…” search starts here:
#include <…> search starts here:
/usr/local/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/lib/clang/6.1.0/include
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
/usr/include
/System/Library/Frameworks (framework directory)
/Library/Frameworks (framework directory)
End of search list.
“/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld” -demangle -dynamic -arch x86_64 -macosx_version_min 10.10.0 -o testc /var/folders/wz/rkvf2_0j38n3r9zt53jw2jm00000gn/T/test-3f2719.o -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/lib/clang/6.1.0/lib/darwin/libclang_rt.osx.a

Please help.

All the best,
Thoth.

Edit the /opt/PGI/linux86-64/15.4/bin/localrc file.

set LOCALDEFS=PGI_5XC;
to
set LOCALDEFS=PGI_6XC;

and change the line
set ISCLANG31=Apple LLVM version 60100 (clang-60200049) (based on LLVM 30600svn);
to
set ISCLANG31=601;

(Note: semicolons are important!)

Now try the compilers.

dave

I fixed those variables in this file:
/Applications/Free\ PGI.app/Contents/Resources/pgi/osx86-64/15.4/bin/makelocalrc

added this line at 418:
clang31=echo $clang31 | awk '{print $4}'

and updated those lines at 439:
elif test $xcodever -eq 5; then
print_line “set LOCALDEFS=PGI_5XC;”
mylocaldefs=“PGI_5XC
else
print_line “set LOCALDEFS=PGI_6XC;”
mylocaldefs=“PGI_6XC
fi

Worked for me as a charm.

Thanks dave!

Many thanks Dave and thoth
Now the problem has been resolved.

Regards,