【问题标题】:Buildroot 2021.08.x on MacOS 10.15.6 gcc not installed errorMacOS 10.15.6 gcc 上的 Buildroot 2021.08.x 未安装错误
【发布时间】:2021-10-12 09:53:11
【问题描述】:

尝试在 MacOS 10.15.6 上使用 Buildroot 2021.08.x 构建一个非常简单的测试镜像,并得到 gcc 未安装的错误:

z:buildroot User$ make
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
LLVM ERROR: IO failure on output stream: Broken pipe
/bin/sh: line 0: [: : integer expression expected
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
       sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]

You must install 'gcc' on your build machine
make: *** [dependencies] Error 1

我用 brew 安装并重新安装了 gcc。用brew安装的版本是11.2.0

z:~ User$ brew list --versions gcc
gcc 11.2.0

但是 gcc --version 输出看起来像这样:

z:~ User $ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/4.2.1
Apple clang version 11.0.3 (clang-1103.0.32.62)
Target: x86_64-apple-darwin19.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

有什么想法吗?

【问题讨论】:

    标签: macos gcc buildroot


    【解决方案1】:

    您不应该将 clang 用于 buildroot 编译器。

    您必须将 gcc 命令链接到 homebrew 安装的位置。

    【讨论】:

    • 感谢您的回复。我们已经从 BuildRoot 继续前进,现在正在使用 Yocto。不过,我很感谢您的回复!
    • 很高兴听到这个消息!谢谢!
    猜你喜欢
    • 2020-12-29
    • 1970-01-01
    • 2020-01-15
    • 2017-06-27
    • 2011-03-06
    • 1970-01-01
    • 1970-01-01
    • 2021-04-10
    • 2019-04-01
    相关资源
    最近更新 更多