【发布时间】:2020-12-16 16:14:53
【问题描述】:
今天早上将 macOS BigSur 升级到 11.1 并将 Xcode 升级到 12.3 后,我的 MacPorts 2.6.4 发行版开始出现问题。我不能再用 GNU C++ v10.2.0_4 编译简单的 C++ 程序:
g++ -O3 -std=c++11 -c libvec.cpp
In file included from /opt/local/include/gcc10/c++/cmath:45,
from libvec.cpp:1:
/opt/local/lib/gcc10/gcc/x86_64-apple-darwin20/10.2.0/include-fixed/math.h:45:10: fatal error: sys/cdefs.h: No such file or directory
45 | #include <sys/cdefs.h>
| ^~~~~~~~~~~~~
compilation terminated.
初步互联网搜索表明此问题可能是由于与 Xcode 命令行工具不一致造成的。请指导我如何调试和修复它?也许我需要在这样的升级后重新安装 MacPorts 发行版?谢谢!
【问题讨论】:
-
查看 macports 邮件列表并询问 tgere