【问题标题】:Trying to install filosottile/musl-cross/musl-cross on m1 macbook试图在 m1 macbook 上安装 filosottile/musl-cross/musl-cross
【发布时间】:2021-07-31 15:50:48
【问题描述】:

我正在尝试通过 brew 安装 filosottile/musl-cross/musl-cross 并在此阶段遇到错误:

==> /opt/homebrew/opt/make/bin/gmake install TARGET=x86_64-linux-musl
Last 15 lines from /Users/galshalom/Library/Logs/Homebrew/musl-cross/01.gmake:
  "_host_hooks", referenced from:
      gt_pch_save(__sFILE*) in libbackend.a(ggc-common.o)
      gt_pch_restore(__sFILE*) in libbackend.a(ggc-common.o)
      toplev::main(int, char**) in libbackend.a(toplev.o)
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[3]: *** [../../src_gcc/gcc/lto/Make-lang.in:81: lto1] Error 1
gmake[3]: *** Waiting for unfinished jobs....
rm gcc.pod
gmake[3]: Leaving directory '/private/tmp/musl-cross-20210510-41370-xpfsk6/musl-cross-make-0.9.9/build/local/x86_64-linux-musl/obj_gcc/gcc'
gmake[2]: *** [Makefile:4361: all-gcc] Error 2
gmake[2]: Leaving directory '/private/tmp/musl-cross-20210510-41370-xpfsk6/musl-cross-make-0.9.9/build/local/x86_64-linux-musl/obj_gcc'
gmake[1]: *** [Makefile:222: obj_gcc/gcc/.lc_built] Error 2
gmake[1]: Leaving directory '/private/tmp/musl-cross-20210510-41370-xpfsk6/musl-cross-make-0.9.9/build/local/x86_64-linux-musl'
gmake: *** [Makefile:183: install] Error 2

在网上找不到合适的解决方案。

【问题讨论】:

    标签: macos gcc homebrew apple-m1


    【解决方案1】:

    brew 编辑 musl-cross

    patch do # Apple Silicon build fix for gcc-10.3.0 及以下

    网址“https://github.com/richfelker/musl-cross-make/commit/3dd050fa.patch?full_index=1”

    sha256 "6ecb5d306b2307e058ec0538862bbddec9fcb7a1c4f9cae5c55d29fb39dc34d8"

    结束

    brew 重新安装 musl-cross

    【讨论】:

    • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
    猜你喜欢
    • 2023-04-02
    • 2021-10-30
    • 1970-01-01
    • 2022-11-11
    • 2023-02-20
    • 1970-01-01
    • 2021-11-21
    • 2022-01-18
    • 1970-01-01
    相关资源
    最近更新 更多