MMa*_*Max 28 c c++ gcc osx-yosemite
我安装OS X Yosemite,现在我的gcc 4.9.1编译器存在很大问题.我希望有人可以帮助我.
我尝试编译我的程序,我有警告消息:
gcc: warning: couldn’t understand kern.osversion ‘14.0.0'
Run Code Online (Sandbox Code Playgroud)
我搜索谷歌,我发现https://gcc.gnu.org/bugzilla/show_bug.cgi?id=61407 我尝试应用补丁:
sudo patch -p1 < /usr/local/bin/00-darwin-10.10.patch
Run Code Online (Sandbox Code Playgroud)
在gcc文件夹中:/usr/local/bin/gcc
我收到了以下消息:
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
|index dd45802..0db14d7 100644
|--- a/fixincludes/fixincl.x
|+++ b/fixincludes/fixincl.x
--------------------------
File to patch:
Run Code Online (Sandbox Code Playgroud)
在File to patch:我已经尝试过gcc,我收到了消息:
patching file gcc
Hunk #1 FAILED at 1.
Hunk #2 FAILED at 15.
Hunk #3 succeeded at 1274 with fuzz 2 (offset -7908 lines).
Hunk #4 FAILED at 1319.
Hunk #5 FAILED at 1548.
Hunk #6 FAILED at 2671.
patch: **** Can't rename file gcc to gcc.orig : Permission denied
Run Code Online (Sandbox Code Playgroud)
我试着sudo和我一起收到:
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x
|index dd45802..0db14d7 100644
|--- a/fixincludes/fixincl.x
|+++ b/fixincludes/fixincl.x
--------------------------
File to patch:
Run Code Online (Sandbox Code Playgroud)
我在错误的文件夹中?有人可以帮帮我吗?
小智 31
从源代码构建东西时我遇到了类似的问题,这是因为我在升级到Yosemite和xcode 6.1后忘了安装更新的命令行工具.在命令行中尝试:
xcode-select --install
Run Code Online (Sandbox Code Playgroud)
这将下载并安装命令行工具,可能会解决您的问题.
这对我来说已经足够了,它不需要任何符号链接:
export CC=/Applications/Xcode.app/Contents/Developer/usr/bin/gcc
Run Code Online (Sandbox Code Playgroud)
之后,像往常一样运行命令.
| 归档时间: |
|
| 查看次数: |
35437 次 |
| 最近记录: |