Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
7700 Discussions

MacOS 10.15.7 Compilation fail on mkl.h

Lecris
Novice
574 Views

Under the newest Intel compiler and MacOS (10.15.7) and XCode (12) versions, I am unable to compile even an empty source that uses `#include<mkl.h>`

Steps to reproduce:

- Update to the latest versions of MacOS and XCode

- Try to compile an empty `test.cpp` using `icpc`

 

#include <mkl.h>
int main(){
   return 0;
}

 

Error trace:

 

In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h(311),
                 from /opt/intel/compilers_and_libraries_2020.2.258/mac/compiler/include/math.h(177),
                 from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h(100),
                 from /opt/intel/compilers_and_libraries_2020.2.258/mac/mkl/include/mkl_service.h(23),
                 from /opt/intel/compilers_and_libraries_2020.2.258/mac/mkl/include/mkl_rci.h(25),
                 from /opt/intel/compilers_and_libraries_2020.2.258/mac/mkl/include/mkl.h(38),
                 from Test2.cpp(2):
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/type_traits(3178): error: function call is not allowed in a constant expression
      : public integral_constant<bool, noexcept(_VSTD::declval<_Tp>() = _VSTD::declval<_Arg>()) 

 

Edit: Confirmed it is only in XCode 12. Using even XCode 11.7 will compile correctly.

0 Kudos
1 Solution
Viet_H_Intel
Moderator
542 Views

Xcode12.0 is just released a couple week ago. We weren't able to validate our compiler back then. Please use older Xcode versions for the time being.

Thanks,


View solution in original post

3 Replies
PrasanthD_intel
Moderator
552 Views

Hi,


Thanks for reporting this to us.

We haven’t seen this in our environment (Ubuntu), but since this issue is in MacOS we are transferring this query to our internal team.

Regards

Prasanth


Viet_H_Intel
Moderator
543 Views

Xcode12.0 is just released a couple week ago. We weren't able to validate our compiler back then. Please use older Xcode versions for the time being.

Thanks,


Viet_H_Intel
Moderator
329 Views

This issue has been resolved and we will no longer respond to this thread. If you require additional assistance from Intel, please start a new thread. Any further interaction in this thread will be considered community only.

Thanks,


Reply