- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm running macOS Catalina 10.15.3, Xcode 11.3.1 (all is a fresh install, new computer) with Intel C++ 2020 Initial Release. When trying to compile the simple program "main.cpp" :
- - - - - - -
#include <iostream> int main() { std::cout << "hello world" << std::endl; return 0; }
- - - - - - - -
with the command "icpc main.cpp" I get the following error:
- - - - - - - -
In file included from /Library/Developer/CommandLineTools/usr/include/c++/v1/iosfwd(96), from /Library/Developer/CommandLineTools/usr/include/c++/v1/ios(215), from /Library/Developer/CommandLineTools/usr/include/c++/v1/iostream(38), from main.cpp(1): /Library/Developer/CommandLineTools/usr/include/c++/v1/wchar.h(119): catastrophic error: cannot open source file "wchar.h" #include_next <wchar.h> ^ compilation aborted for main.cpp (code 4)
- - - - - - - -
The error goes away and the code compiles fine when I use: "icpc main.cpp -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"
How come Intel doesn't ship these headers so that the compiler is self-contained? I'm executing the compilervars script when I launch my terminal, why is this directory not set? Is there a way around setting sysroot when compiling? This was also address in stack overflow, but no alternative solution was proposed:
https://stackoverflow.com/questions/59938881/intel-c-cannot-open-wchar-h-on-mac-osx
Thanks -
Mike
- Tags:
- CC++
- Development Tools
- General Support
- Intel® C++ Compiler
- Intel® Parallel Studio XE
- Intel® System Studio
- Optimization
- Parallel Computing
- Vectorization
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't have Xcode 11.3.1 on our systems. But it compiled on Xcode 11.2.1
orcsme146:tmp super$ sw_vers -productVersion
10.15.3
orcsme146:tmp super$ /opt/intel/compilers_and_libraries_2020.0.166/mac/bin/intel64/icpc t.cpp -V
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.0.166 Build 20191121
Copyright (C) 1985-2019 Intel Corporation. All rights reserved.
orcsme146:tmp super$ /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version
Xcode 11.2.1
Build version 11B500
orcsme146:tmp super$
orcsme146:tmp super$ cat t.cpp
#include <iostream>
int main() {
std::cout << "hello world" << std::endl;
return 0;
}
orcsme146:tmp super$ /opt/intel/compilers_and_libraries_2020.0.166/mac/bin/intel64/icpc t.cpp
orcsme146:tmp super$
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Micheal,
This sounds like a bug. We are investigating on this issue and we will get back to you at the earliest.
Thanks for reporting this issue.
Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great - thanks very much for looking into this!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't have Xcode 11.3.1 on our systems. But it compiled on Xcode 11.2.1
orcsme146:tmp super$ sw_vers -productVersion
10.15.3
orcsme146:tmp super$ /opt/intel/compilers_and_libraries_2020.0.166/mac/bin/intel64/icpc t.cpp -V
Intel(R) C++ Intel(R) 64 Compiler for applications running on Intel(R) 64, Version 19.1.0.166 Build 20191121
Copyright (C) 1985-2019 Intel Corporation. All rights reserved.
orcsme146:tmp super$ /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -version
Xcode 11.2.1
Build version 11B500
orcsme146:tmp super$
orcsme146:tmp super$ cat t.cpp
#include <iostream>
int main() {
std::cout << "hello world" << std::endl;
return 0;
}
orcsme146:tmp super$ /opt/intel/compilers_and_libraries_2020.0.166/mac/bin/intel64/icpc t.cpp
orcsme146:tmp super$
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Directly running /opt/intel/compilers_and_libraries_2020.0.166/mac/bin/intel64/icpc on my machine still did not work.
What do you recommend? Installing Xcode 11.12.1 for the time being and using that one? Do you have detailed instructions for how to maintain multiple Xcode versions? Do the Intel compilers need to be reinstalled? Are these the correct instructions?
http://iosdevelopertips.com/xcode/xcode-select-managing-multiple-versions-of-xcode.html
What is the correct order of installations:
1 - Xcode 11.12.1
2 - Command-line tools
3 - (Reinstall Intel compilers?)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Xcode 11.3.1 release just about a month ago (a few months after Intel C++ 2020 Initial Release). I would suggest to use Xcode versions which released before the compiler released date.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I can confirm that this code will build with Xcode 11.2.1. Thanks for your help!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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,
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page