【发布时间】:2021-06-21 17:30:41
【问题描述】:
我尝试在 Mac Big Sur 11.2.3 (Silicon) 上安装 assimpcy,尽管使用 brew 和 Xcode 工具安装 gcc,但在尝试通过 pip 安装 assimpcy 或从 git 构建时出现以下错误
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch arm64 -arch x86_64 -g -I/Users/isee/Documents/P3D/env/lib/python3.9/site-packages/numpy/core/include -I/Users/isee/Documents/P3D/env/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c ./assimpcy/all.cpp -o build/temp.macosx-10.9-universal2-3.9/./assimpcy/all.o -fopenmp
clang: error: unsupported option '-fopenmp'
clang: error: unsupported option '-fopenmp'
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
更新
尝试从 home-brew 安装和使用 gcc 编译器,现在给出:
gcc-10: warning: this compiler does not support X86 (arch flags ignored)
gcc-10: error: unrecognized command-line option '-stdlib=libc++'
error: command '/opt/homebrew/bin/gcc-10' failed with exit code 1
那么到底有没有办法让它运行呢?
【问题讨论】:
-
您是否尝试过不支持的选项? (即没有
-fopenmp) -
你能指定
pip install assimpcy的选项吗?不要这么认为:/ -
我认为这是新硅架构的适配问题,我建议在 github 上打开一个 Issure。如果我怀疑 -fopenmp 确实是 openMPI,您可以尝试从 openMPI 网站本身安装和编译二进制文件。不过我只是假设,我记得我在使用 arm64 操作系统时在 ubuntu 上遇到过类似的问题。
-
根据 doitarm.com 的说法,open-mpi 完全兼容芯片,Xcode 提供 clang 作为 gcc 的链接似乎是一个完整的问题
-
你可以试试
brew install libomp libllvm
标签: python-3.x macos assimp