huawei-noah / bolt

Bolt is a deep learning library with high performance and heterogeneous flexibility.
https://huawei-noah.github.io/bolt/
MIT License
918 stars 160 forks source link

在macos上交叉编译ios出现错误 #100

Open lixcli opened 2 years ago

lixcli commented 2 years ago

你好, 我按照文档加入iphoneos.sdk的路径后,运行./install.sh --target=ios-aarch64编译ios,出现错误:

ld: in /opt/homebrew/opt/protobuf/lib/libprotobuf.a(text_format.o), building for iOS, but linking in object file built for macOS, for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [model_tools/tools/X2bolt] Error 1
make[1]: *** [model_tools/tools/CMakeFiles/X2bolt.dir/all] Error 2
make: *** [all] Error 2

请问这个要如何处理?

yuxianzhi commented 2 years ago

链接的protobuf不是ios的,是macos系统自带的,所以会导致这个问题,建议使用bolt脚本安装protobuf