Skip to content

Add iOS Support for sherpa-onnx-go #2

@JatosDetking

Description

@JatosDetking

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/sherpa-onnx-go@v1.8.7/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/sherpa-onnx-go@v1.8.7/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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions