Opened 4 years ago
Closed 4 years ago
#62005 closed defect (fixed)
gcc10 compiler not working
Reported by: | smeingast (Stefan Meingast) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | Cc: | ||
Port: | gcc10 |
Description
Hey guys, my apologies, but I am lost. After reinstalling my complete MacPorts installation, I found that gcc does not work anymore.
I get this error:
/opt/local/lib/gcc10/gcc/x86_64-apple-darwin20/10.2.0/include-fixed/stdio.h:78:10: fatal error: _stdio.h: No such file or directory 78 | #include <_stdio.h> | ^~~~~~~~~~ compilation terminated.
I already know that this is usually a problem with Xcode, but none of the solutions I found online worked (and the command line tools are definitely installed). Any help would be greatly appreciated! :/
Change History (4)
comment:1 follow-up: 3 Changed 4 years ago by michaellass (Michael Lass)
comment:2 Changed 4 years ago by kencu (Ken)
see <https://lists.macports.org/pipermail/macports-dev/2020-December/042769.html> for discussion about this issue...
comment:3 Changed 4 years ago by smeingast (Stefan Meingast)
Replying to michaellass:
You likely have the XCode SDK installed in version 11.1 and the gcc10 port has been built with the 11.0 SDK. Then gcc expects the headers at the wrong location. See comment:ticket:61899:4
Try compiling with the following flag:
-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdkIf that works, a proper fix for now is to recompile gcc10 yourself:
port upgrade -s -n --force gcc10
Yes! Thats works, many thanks! And it seems you guys already have this on your radar at a more global scale. 😊 Thanks for the quick help!
comment:4 Changed 4 years ago by kencu (Ken)
Resolution: | → fixed |
---|---|
Status: | new → closed |
You likely have the XCode SDK installed in version 11.1 and the gcc10 port has been built with the 11.0 SDK. Then gcc expects the headers at the wrong location. See comment:ticket:61899:4
Try compiling with the following flag:
If that works, a proper fix for now is to recompile gcc10 yourself:
port upgrade -s -n --force gcc10