Intel® C++ Compiler
Community support and assistance for creating C++ code that runs on platforms based on Intel® processors.

icpc 19.0.4.233 not working with MacOS XCode 10.3 (10G8): template errors

Oberbrunner__Gary
1,101 Views

I'm getting compiler errors using icpc 19.0.4 on MacOS with XCode 10.3. The same code compiles fine with the xcode tools (g++, which is llvm 10.0.1) as well as standard Visual Studio 2017 on Windows. I'm just on a trial of the Intel compiler tools for now. I am using templates and tuples in the code (see the error below).

Compiler command line:

icpc -o Build/ofx-debug/math-prims.os -c -std=c++17 -g -mmacosx-version-min=10.11 -fPIC -DPROJECT=MarkyMark -DVER=0.1.0 -DVMAJ=0 -DVMIN=1 -DVPOINT=0 -DPORT=ofx -DVARIANT=debug -DPORT_OFX=1 -DSPDLOG_DEBUG_ON -DSPDLOG_TRACE_ON -DENABLE_UNIT_TESTS -Ispdlog/include -Icxxpool/src -Iinih -I/usr/local/Cellar/opencv/3.4.0_1/include Build/ofx-debug/math-prims.cxx

Errors start like this:

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits(2171): error: template instantiation resulted in unexpected function type of "std::__1::true_type (int)" (the meaning of a name may have changed since the template declaration -- the type of the template is "std::__1::__select_2nd<decltype((<expression>)), std::__1::true_type>::type (int)")
      : public decltype((_VSTD::__is_assignable_test<_Tp, _Arg>(0))) {};
                                                                  ^
          detected during:
            instantiation of "std::__1::__is_assignable_test" based on template arguments <__type_pack_element<3UL, dss::prim::add_const_op, float *, int, std::__1::tuple<float>> &, __type_pack_element<3UL, dss::prim::add_const_op, float *, int, std::__1::tuple<float>> &> at line 2171
            instantiation of class "std::__1::__is_assignable_imp<_Tp, _Arg, <unnamed>> [with _Tp=__type_pack_element<3UL, dss::prim::add_const_op, float *, int, std::__1::tuple<float>> &, _Arg=__type_pack_element<3UL, dss::prim::add_const_op, float *, int, std::__1::tuple<float>> &, <unnamed>=false]" at line 2181
            instantiation of class "std::__1::is_assignable<_Tp, _Arg> [with _Tp=__type_pack_element<3UL, dss::prim::add_const_op, float *, int, std::__1::tuple<float>> &, _Arg=__type_pack_element<3UL, dss::prim::add_const_op, float *, int, std::__1::tuple<float>> &]" at line 2192
            instantiation of class "std::__1::is_copy_assignable<_Tp> [with _Tp=__type_pack_element<3UL, dss::prim::add_const_op, float *, int, std::__1::tuple<float>> &]" at line 867 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple"
            instantiation of class "std::__1::tuple<_Tp...> [with _Tp=<__type_pack_element<0UL, dss::prim::add_const_op, float *, int, std::__1::tuple<float>> &, __type_pack_element<1UL, dss::prim::add_const_op, float *, int, std::__1::tuple<float>>={float *} &, __type_pack_element<2UL, dss::prim::add_const_op, float *, int, std::__1::tuple<float>>={int} &, __type_pack_element<3UL, dss::prim::add_const_op, float *, int, std::__1::tuple<float>> &, const float *&>]" at line 1321 of
                      "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple"
            instantiation of "std::__1::__tuple_cat_return_ref<std::__1::tuple<_Types...> &&, _Tuple0 &&, _Tuple1 &&, _Tuples &&...>::type std::__1::__tuple_cat<std::__1::tuple<_Types...>, std::__1::__tuple_indices<_I0...>, std::__1::__tuple_indices<_J0...>>::operator()(std::__1::tuple<_Types...>, _Tuple0 &&, _Tuple1 &&, _Tuples &&...) [with _Types=<>, _I0=<>, _J0=<0UL, 1UL, 2UL, 3UL>, _Tuple0=std::__1::tuple<dss::prim::add_const_op, float *, int, std::__1::tuple<float>> &,
                      _Tuple1=std::__1::array<const float *, 1UL> &, _Tuples=<>]" at line 1346 of "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/tuple"
            instantiation of "std::__1::__tuple_cat_return<_Tuple0, _Tuples...>::type std::__1::tuple_cat(_Tuple0 &&, _Tuples &&...) [with _Tuple0=std::__1::tuple<dss::prim::add_const_op, float *, int, std::__1::tuple<float>> &, _Tuples=<std::__1::array<const float *, 1UL> &>]" at line 181 of "Build/ofx-debug/primitive-base.h"
            instantiation of "void dss::prim::process_image<Op,OpArgs,Srcs...>(dss::prim::Image, dss::prim::AlphaMode, OpArgs, int, int, Srcs...) [with Op=dss::prim::add_const_op, OpArgs=std::__1::tuple<float>, Srcs=<cv::Mat &>]" at line 207 of "Build/ofx-debug/primitive-base.h"
            instantiation of "void dss::prim::process_image_mt<Op,OpArgs,Srcs...>(dss::prim::Image, dss::prim::AlphaMode, OpArgs, Srcs &&...) [with Op=dss::prim::add_const_op, OpArgs=std::__1::tuple<float>, Srcs=<cv::Mat &>]" at line 43 of "Build/ofx-debug/math-prims.cxx"

 

0 Kudos
3 Replies
Viet_H_Intel
Moderator
1,101 Views

According to the RN, XCode 10.3 isn't listed as a supported version. Is is possible to use XCode 10.2?

https://software.intel.com/en-us/articles/intel-c-compiler-190-for-macos-release-notes-for-intel-parallel-studio-xe-2019#sysreq ;

0 Kudos
Oberbrunner__Gary
1,101 Views

I see, thanks for the info. This project needs 10.3; also I don't think it's easy to switch between Xcode 10.2 and 10.3 on the same machine. Do you have any idea when Xcode 10.3 will be supported?

0 Kudos
Viet_H_Intel
Moderator
1,101 Views

Sorry, I don't have a date to share, but I am sure it will be supported in the next update.  

0 Kudos
Reply