lf: "cannot use stat.Nlink as uint64" when install lf
When I tried to install lf
via env CGO_ENABLED=0 go install -ldflags="-s -w" github.com/gokcehan/lf@latest
, I got an erorr. Please refer to pic below
My OS: macOS 13.3. I am not sure whether the issue is OS specific.
Thank you.
About this issue
- Original URL
- State: closed
- Created a year ago
- Reactions: 2
- Comments: 17 (5 by maintainers)
Commits related to this issue
- Generate darwin-arm64 binaries as we have users using it At least one user: https://github.com/gokcehan/lf/issues/1294 — committed to ilyagr/lf by ilyagr a year ago
- Generate darwin-arm64 binaries as we have users using it At least one user: https://github.com/gokcehan/lf/issues/1294 — committed to ilyagr/lf by ilyagr a year ago
- Generate darwin-arm64 binaries as we have users using it At least one user: https://github.com/gokcehan/lf/issues/1294 — committed to ilyagr/lf by ilyagr a year ago
- Generate darwin-arm64 binaries as we have users using it At least one user: https://github.com/gokcehan/lf/issues/1294 — committed to ilyagr/lf by ilyagr a year ago
- Make CI cross-compile lf for every supported platform; support darwin-arm64 (#1298) * Create CI job to run `gen/xbuild.sh`, adjust `xbuild.sh` to make it possible This reworks the gen/xbuild.sh sc... — committed to gokcehan/lf by ilyagr a year ago
This is what I already tried at the beginning but got an error.
@ilyagr Thanks. I just tested it. The
build
worked well andlf
can be launched by running./lf
perfectly.@ilyagr I checked the CI pipeline, it only builds on Ubuntu and Windows, so that explains the issue was not caught earlier: https://github.com/gokcehan/lf/blob/2ab4b14e883f7d989fbe1e0a193223263bfeeed1/.github/workflows/go.yml#L11-L30
Building for all the other platforms happens in a different pipeline, which I suspect is only triggered manually whenever a new release is to be created: https://github.com/gokcehan/lf/blob/2ab4b14e883f7d989fbe1e0a193223263bfeeed1/.github/workflows/release.yml#L10-L21
It’s not a bug in Go, it’s just simply because
stat.Nlink
has a different type depending on the platform. For Darwin ARM 64-bit it isuint16
, but on my platform Linux AMD 64-bit it isuint64
.My apologies for causing this bug, I only thought to test this locally and didn’t consider other platforms.