-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Description:
I'm attempting to cross-compile JuiceFS for RISC-V (riscv64) architecture but encountering build failures due to incompatible dependencies. The following packages appear to have build constraints excluding RISC-V:
github.com/erikdubbelboer/gsptgithub.com/hungys/go-lz4github.com/DataDog/zstd
Error message:
build constraints exclude all Go files in ...
Reproduction Steps:
- Set up Go cross-compilation environment for riscv64
- Run:
CGO_ENABLED=0 GOARCH=riscv64 go build -v -tags nosqlite \ -ldflags="-s -w -X github.com/juicedata/juicefs/pkg/version.revision=... \ -X github.com/juicedata/juicefs/pkg/version.revisionDate=..." \ -o juicefs.riscv .
Expected Behavior:
Successful compilation for riscv64 architecture
Actual Behavior:
Build fails due to unsupported architecture in dependencies
Suggested Solutions:
-
Evaluate alternative packages that support RISC-V:
- Replace
go-lz4withgithub.com/pierrec/lz4 - Replace
DataDog/zstdwithgithub.com/klauspost/compress/zstd
- Replace
-
Add riscv64 to build constraints for critical dependencies
-
Consider maintaining a riscv64 compatible build tag
Additional Context:
RISC-V is gaining significant adoption in edge computing and embedded systems where JuiceFS could provide valuable distributed storage capabilities. Official support would enable JuiceFS deployment in these growing ecosystems.
Environment:
- Go version: [1.23]
- OS: [Ubuntu]
- Architecture: riscv64 (cross-compiling from [x86_64])