-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add iOS Support for sherpa-onnx-go #2
Comments
Please follow the instructions below strictly 1. Build sherpa-onnx for iOS# Assume you put sherpa-onnx inside /tmp
# You can change it to any directory you want
cd /tmp
git clone https://github.com/k2-fsa/sherpa-onnx
cd sherpa-onnx
./build-ios.sh
cd scripts/go/_internal
ln -s /tmp/sherpa-onnx/build-ios ./ 2. Create
|
You need to link with
|
Please have a look at Even if it is for |
@JatosDetking Does it work for you now? |
Yes thanks for IOS works. Can you help me with MACOS form swift build from arm64? |
Could you describe in detail the issue you have? Please post the complete logs and commands. |
Description:
I am currently encountering an issue while attempting to build the sherpa-onnx-go library for iOS. The build process fails with the following error message:
bash
Copy code
(.venv) aleksandarsvinarov@Aleksandars-MacBook-Pro test % GOOS=ios GOARCH=arm64 CGO_ENABLED=1 CC=$(go env GOROOT)/misc/ios/clangwrap.sh go build -ldflags -w -v -tags ios -o "IOS.a" -buildmode=c-archive
package test
imports github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx: build constraints exclude all Go files in /Users/aleksandarsvinarov/go/pkg/mod/github.com/k2-fsa/[email protected]/sherpa_onnx
Steps to Reproduce:
Set up the environment:
sh
Copy code
(.venv) aleksandarsvinarov@Aleksandars-MacBook-Pro test %
Run the following build command:
sh
Copy code
GOOS=ios GOARCH=arm64 CGO_ENABLED=1 CC=$(go env GOROOT)/misc/ios/clangwrap.sh go build -ldflags -w -v -tags ios -o "IOS.a" -buildmode=c-archive
Expected Behavior:
The library should build successfully for the iOS target architecture.
Actual Behavior:
The build process fails with the message:
bash
Copy code
package test
imports github.com/k2-fsa/sherpa-onnx-go/sherpa_onnx: build constraints exclude all Go files in /Users/aleksandarsvinarov/go/pkg/mod/github.com/k2-fsa/[email protected]/sherpa_onnx
Environment:
macOS (version details)
Go version: (version details)
sherpa-onnx-go version: v1.8.7
Additional Information:
It appears that there may be build constraints within the sherpa-onnx-go package that exclude files necessary for the iOS build. Any guidance or modifications to support iOS would be greatly appreciated.
Thank you for your attention to this issue.
The text was updated successfully, but these errors were encountered: