[MacPorts] #60449: gcc10 missing header <wchar.h>
MacPorts
noreply at macports.org
Fri May 8 12:42:40 UTC 2020
#60449: gcc10 missing header <wchar.h>
-----------------------+----------------------
Reporter: haberg-1 | Owner: (none)
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.6.2
Resolution: | Keywords: catalina
Port: gcc10 |
-----------------------+----------------------
Comment (by cjones051073):
Run build with the -v option. That will tell you agmonst other things the
search paths the compiler is using to find headers.
{{{
> g++-mp-10 -v test.cpp
<snip>
#include <...> search starts here:
/opt/local/include/gcc10/c++/
/opt/local/include/gcc10/c++//x86_64-apple-darwin19
/opt/local/include/gcc10/c++//backward
/opt/local/lib/gcc10/gcc/x86_64-apple-darwin19/10.1.0/include
/opt/local/lib/gcc10/gcc/x86_64-apple-darwin19/10.1.0/include-fixed
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks
End of search list.
<snip>
}}}
Do you have the CLT installed ? i.e. what is in
{{{
> ls -l /Library/Developer/CommandLineTools/SDKs/
total 0
lrwxr-xr-x 1 root wheel 15 16 Apr 12:53 MacOSX.sdk -> MacOSX10.15.sdk
drwxr-xr-x 7 root wheel 224 16 Apr 12:53 MacOSX10.14.sdk
drwxr-xr-x 8 root wheel 256 16 Apr 12:53 MacOSX10.15.sdk
}}}
Bottom line is, with the removal of /usr/include, you have to do
*something* to instruct the compiler where to find the SDK to use.
- define SDKROOT
- use xcrun
- pass the `-sysroot /path/to/SDK` compiler flag
- install the CLT package
--
Ticket URL: <https://trac.macports.org/ticket/60449#comment:10>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list