osx 10.11 community 17.4 __dependent_type undefined

as mentioned in the topic i’m using the 17.4 community edition on osx 10.11.6 with xcode 8.1. i had 8.0 before and got the same error.

i tried to post a simple test program in code and quote tags but both give me a 403 forbidden message so i can at least tell you that it’s using a map, iostreams for cin and cout and two c++11 style for loops.
anyway i get the following error:

"/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/utility", line

         266: error: identifier "__dependent_type" is undefined

         __dependent_type<is_default_constructible<_T1>, _Dummy>::value &&

         ^

any help is welcome

i tried the 17.4 on osx 10.9.5 and there were no problems. seems to be specific to 10.11 and/or xcode 8

Send the source to trs@pgroup.com or post using the “code”
qualifier above.

Always a danger to update the OS to the latest versions, if you expect
6-month old 3rd party software to work. Apple always changes enough
to need work on releases.

dave

as i said, that didn’t work.

Always a danger to update the OS to the latest versions

latest versions? 10.11.6 is from july last year and my xcode is 3 months younger.

put your code in

And then preview to see if the characters between \

 and \

are altered.

If not send the code via email to trs@pgroup.com

Sorry about the ‘New’ OS X comments. My confusion.

I will wait for your example.

dave

hehe yes i know how to use code tags but as i said i always get a 403 error. with both, preview and submit.

If not send the code via email to > trs@pgroup.com

i will, thanks

Sorry about the ‘New’ OS X comments. My confusion.

no problem at all

Thanks! I got your C++ example.

sierra% uname -a

Darwin sierra.pgi.net 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 15 17:36:27 PDT 201

sierra% g++ --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

When I compile with
sierra% pgc++ -V

pgc++ 17.10-0 64-bit target on macOS -tp haswell
PGI Compilers and Tools
Copyright © 2017, NVIDIA CORPORATION. All rights reserved.

sierra% pgc++ -c test.cpp
“test.cpp”, line 13: error: expected a “;”
for (char c : buf) {
^

“test.cpp”, line 13: error: expected an expression
for (char c : buf) {
^

“test.cpp”, line 13: error: expected a “;”
for (char c : buf) {
^

“test.cpp”, line 22: warning: explicit type is missing (“int” assumed)
for (auto count : nums)
^

“test.cpp”, line 22: error: expected a “;”
for (auto count : nums)
^

“test.cpp”, line 22: error: expected an expression
for (auto count : nums)
^

“test.cpp”, line 22: error: expected a “;”
for (auto count : nums)
^

“test.cpp”, line 23: error: no instance of overloaded function “get” matches
the argument list
argument types are: (int)
cout << (char)get<0>(count) << " occurs " << get<1>(count) << " times\n";
^

“test.cpp”, line 23: error: no instance of overloaded function “get” matches
the argument list
argument types are: (int)
cout << (char)get<0>(count) << " occurs " << get<1>(count) << " times\n";
^

8 errors detected in the compilation of “test.cpp”

=================================================
Now when I add c++11 to the compilation, things work.

sierra% pgc++ -o test test.cpp -std=c++11

and test is built.
On Linux pgc++ will not support -std=c++11 unless you are
g++ 4.8 or newer. For -std=c++14 you need g++ 5.2 or newer.

This OS X Xcode version works, but the
" --with-gxx-include-dir=/usr/include/c++/4.2.1" is confusing.

dave

EDIT actually, you tested that on the wrong osx version. mine is 10.11.6 which would be kernel 15.6.0 but yours is 16.7.0 which equals 10.12.6

Okay - I think this is the correct OS X version.
Same results.

dave


elcapitan% uname -a
Darwin elcapitan.pgi.net 15.6.0 Darwin Kernel Version 15.6.0: Sun Jun 4 21:43:07 PDT 2017; root:xnu-3248.70.3~1/RELEASE_X86_64 x86_64
elcapitan% which pgc++
/opt/pgi/osx86-64/17.9/bin/pgc++


elcapitan% pgc++ -o test test.cpp -std=c++11 -v
Export PGI=/opt/pgi
Export PGIBIN=/opt/pgi/osx86-64/17.9/bin

/opt/pgi/osx86-64/17.9/bin/pggpp1 --llalign -Dunix -D__unix -D__unix__ -D__LITTLE_ENDIAN__ -D__inline__= -Dosx86 -D__osx86 -D__osx86__ -D__APPLE__ -D__LP64__ -D__x86_64__ -D_M_IX86 -D__NO_MATH_INLINES -D__amd64__ -D__PGI_STRPTIME -D__extension__= -D__SSE__ -D__MMX__ -D__SSE2__ -D__SSE3__ -D__SSSE3__ -D__PGI_7XC__ -D__PGI_XC_VER__=70301 -D__PGI -D_GNU_SOURCE -D_PGCG_SOURCE -D__signed__=signed -I- -I/opt/pgi/osx86-64/17.9/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/include/c++/v1 -I/usr/local/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/…/lib/clang/7.3.0/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/usr/include -I/System/Library/Frameworks -I/Library/Frameworks --clang_version=30900 --gnu_version=40201 -D__pgnu_vsn=40201 --no_using_std --c++11 --preinclude stdarg.h --preinclude_macros _cplus_macros.h -q -o /var/tmp/pgc++dREnjZHGaoXq.il test.cpp

/opt/pgi/osx86-64/17.9/bin/pggpp2 test.cpp -opt 1 -x 119 0x10000010 -x 129 0x80 -x 19 0x400000 -dollar ‘$’ -x 119 0x40610400 -x 119 0x1000 -x 59 4 -x 129 0x10 -x 70 0x8000 -x 122 1 -x 125 0x20000 -x 120 0x80 -x 122 0x40 -x 123 0x1000 -x 127 21 -tp haswell -y 80 0x40000000 -x 120 0x400 -x 120 0x1000 -y 120 0x400 -astype 1 -fn test.cpp -il /var/tmp/pgc++dREnjZHGaoXq.il -x 117 0x600 -x 123 0x80000000 -x 123 4 -x 119 0x20 -def __pgnu_vsn=40201 -x 120 0x200000 -x 70 0x40000000 -x 117 0x2000 -y 163 0xc0000000 -x 189 0x10 -y 189 0x4000000 -gnuvsn 40201 -x 69 0x200 -cmdline ‘+pgc++ /var/tmp/pgc++dREnjZHGaoXq.il --no_using_std -o test -std=c++11 -v’ -asm /var/tmp/pgc++BREnrmqsJ9u4.s
PGCC/x86 OSX 17.9-0: compilation successful

/usr/bin/clang -x assembler -Qunused-arguments -arch x86_64 /var/tmp/pgc++BREnrmqsJ9u4.s -c -o test.o
Action(ReadTIFile(./test.ti))

/usr/bin/ld /usr/lib/crt1.o /opt/pgi/osx86-64/17.9/lib/pgimainmx.o -L/opt/pgi/osx86-64/17.9/lib -L/usr/lib -L/Applications/Xcode.app/Contents/Developer/usr/lib/llvm-gcc/4.2.1 test.o -macosx_version_min 10.11.6 -rpath /opt/pgi/osx86-64/17.9/lib -o test -framework Security -framework IOKit -framework CoreFoundation -arch x86_64 -no_compact_unwind -no_pie -no_new_main -lpgatm -lgcc -lc++ -lpgmp -lpthread -lc -lnspgc -lpgc -lm -lgcc -lc -lgcc -lSystem
Unlinking /var/tmp/pgc++dREnjZHGaoXq.il
Unlinking /var/tmp/pgc++BREnrmqsJ9u4.s
Unlinking /var/tmp/pgc++ZREnzUX9xsXC.ll

yes, osx is correct now but not the pgi version.

Well, I see that 17.4 does fail. But the upcoming 17.10 community
edition (next week?) should have this fixed.

dave

great, thanks for the info!

The 17.10 Community Edition has landed.

dave

thanks, grabbed it. unfortunately now iostream has the same problem. test case:

#include <iostream>

int main(int argc, char *argv[]) {
   std::cerr << "test" << std::endl;
   return 0;
}

error:

"/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/utility", line
         266: error: identifier "__dependent_type" is undefined
         __dependent_type<is_default_constructible<_T1>, _Dummy>::value &&
         ^

and tons of follow ups due to the unknown __dependent_type

code tags are working again btw :-)