MacOS Big Sur : impossible to compile with a C++ code with Intel compiler

Hello,

I have just migrated from Catalina to Big Sur and I have issues when compiling a simple C++ code with Intel icpc compiler (version 2020 Update 4).



With brew's GNU version g++-4.9, it doesn't work also but compiles fine with brew's g++-6 and g++-10.



Before the Big Sure update, I had no problems with icpc on Catalina.



For intel, I thought that installing CTL (Command Tools line) version 11 would be sufficient but this is not the case : indeed, it is misssing the package Headers .pkg in CTL version 11 : how can I do without these Headers now ?



For the instant, I get these errors :



icpc -std=c++11 -O3 -xHost -qopenmp -Wall -c -I/opt/intel/compilers_and_libraries_2020.4.301/mac/mkl/include -I/Library/Developer/CommandLineTools/usr/include/c++/v1 -mkl=parallel main.cpp -o main.o
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/math.h(311),
                 from /opt/intel/compilers_and_libraries_2020.4.301/mac/compiler/include/math.h(177),
                 from /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath(304),
                 from TSAF.h(1),
                 from main.cpp(1):
/Library/Developer/CommandLineTools/usr/include/c++/v1/type_traits(903): error: type name is not allowed
      __is_function(_Tp)
                    ^

In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/math.h(311),
                 from /opt/intel/compilers_and_libraries_2020.4.301/mac/compiler/include/math.h(177),
                 from /Library/Developer/CommandLineTools/usr/include/c++/v1/cmath(304),
                 from TSAF.h(1),
                 from main.cpp(1):
/Library/Developer/CommandLineTools/usr/include/c++/v1/type_traits(903): error: identifier "__is_function" is undefined
      __is_function(_Tp)
      ^

In file included from TSAF.h(2),
                 from main.cpp(1):
/Library/Developer/CommandLineTools/usr/include/c++/v1/type_traits(903): error: type name is not allowed
      __is_function(_Tp)
                    ^
          detected during:
            instantiation of class "std::__1::is_function<_Tp> [with _Tp=long long ****************************************************************************************************]" at line 1360
            instantiation of class "std::__1::__decay<_Up, true> [with _Up=long long ****************************************************************************************************]" at line 1373
            instantiation of class "std::__1::decay<_Tp> [with _Tp=long long ****************************************************************************************************]" at line 2119
            instantiation of class "std::__1::common_type<_Tp, _Up> [with _Tp=long long ****************************************************************************************************, _Up=long long ****************************************************************************************************]" at line 2118
            instantiation of class "std::__1::common_type<_Tp, _Up> [with _Tp=long long ***************************************************************************************************, _Up=long long ***************************************************************************************************]" at line 2118
            [ 97 instantiation contexts not shown ]
            instantiation of class "std::__1::common_type<_Tp, _Up> [with _Tp=long long *, _Up=long long *]" at line 2118
            instantiation of class "std::__1::common_type<_Tp, _Up> [with _Tp=long long, _Up=long long]" at line 874 of "/Library/Developer/CommandLineTools/usr/include/c++/v1/chrono"
            instantiation of class "std::__1::common_type<std::__1::chrono::duration<_Rep1, _Period1>, std::__1::chrono::duration<_Rep2, _Period2>> [with _Rep1=long long, _Period1=std::__1::micro, _Rep2=long long, _Period2=std::__1::micro]" at line 2112
            instantiation of class "std::__1::common_type<_Tp> [with _Tp=std::__1::chrono::duration<long long, std::__1::micro>]" at line 1101 of "/Library/Developer/CommandLineTools/usr/include/c++/v1/chrono"
            instantiation of class "std::__1::chrono::duration<_Rep, _Period> [with _Rep=long long, _Period=std::__1::micro]" at line 1575 of "/Library/Developer/CommandLineTools/usr/include/c++/v1/chrono"

In file included from TSAF.h(2),
                 from main.cpp(1):
/Library/Developer/CommandLineTools/usr/include/c++/v1/type_traits(903): error: type name is not allowed
      __is_function(_Tp)
...


If someone could give me any track/clue in this issue of Intel compilation.



Why the Headers .pkg doesn't appear anymore with Command Tool Lines of last Package for Big Sur (version released the 14th December 2020) ?



How could I circumevent this issue ?



Any help is welcome


Posted on Dec 14, 2020 2:43 PM

Reply

Similar questions

3 replies

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

MacOS Big Sur : impossible to compile with a C++ code with Intel compiler

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.