k2-fsa / sherpa-onnx

Speech-to-text, text-to-speech, speaker recognition, and VAD using next-gen Kaldi with onnxruntime without Internet connection. Support embedded systems, Android, iOS, Raspberry Pi, RISC-V, x86_64 servers, websocket server/client, C/C++, Python, Kotlin, C#, Go, NodeJS, Java, Swift, Dart, JavaScript, Flutter, Object Pascal, Lazarus, Rust
https://k2-fsa.github.io/sherpa/onnx/index.html
Apache License 2.0
3.11k stars 362 forks source link

libtool: error: unrecognised option: '-static' on Mac M1 #1135

Closed minchopm closed 4 days ago

minchopm commented 1 month ago

I am using Mac M1 chipset, and when I execute build-swift-macos.h it is throwing an error:

libtool:   error: unrecognised option: '-static'
csukuangfj commented 1 month ago

Could you post more logs?

minchopm commented 1 month ago

I tried with old Xcode 17, and it was building the onnx framework for iOS, but with Xcode beta 3 throw this error: just before executig: libtool -static -o build/simulator/sherpa-onnx.a \ got: libtool: error: unrecognised option: '-static'


Interesting point is the framework for iOS has been build but sherpa xcframework does not because of the issue.
I even tried to downgrade libtool 2.4.6 to 2.4.2 but does not work at all.
csukuangfj commented 1 month ago
(py38) fangjuns-MacBook-Pro:workflows fangjun$ libtool -V
Apple Inc. version cctools-1001.2
(py38) fangjuns-MacBook-Pro:workflows fangjun$ which libtool
/usr/bin/libtool

Here is the output on my mac.