nakabonne / gosivy

Real-time visualization tool for Go process metrics
MIT License
472 stars 14 forks source link

Windows support #8

Open nakabonne opened 3 years ago

nakabonne commented 3 years ago

For some reasons, cannot build for windows_amd64. gopsutil/process should support it but something wrong.

release failed after 49.59s error=failed to build for windows_amd64: # github.com/shirou/gopsutil/process
Error: ../../../go/pkg/mod/github.com/shirou/gopsutil@v2.20.9+incompatible/process/process_windows.go:184:13: undefined: "golang.org/x/sys/windows".EnumProcesses
sgelhaus commented 3 years ago

Could it be similar to this solution?

nakabonne commented 3 years ago

@sgelhaus Thanks for letting me know. I tried to update with go get -u golang.org/x/sys/windows on macOS, but it didn't go well. Only on Windows, it went well.

sgelhaus commented 3 years ago

Glad that Windows worked out. Curious what errors did MacOS give?

nakabonne commented 3 years ago

Sorry for the lacking of context. The initial comment is emitted by macOS when executing greleaser:

❯ goreleaser --snapshot --skip-publish --rm-dist

   • releasing...
   • loading config file       file=.goreleaser.yaml
   • running before hooks
      • running go mod tidy
   • loading environment variables
   • getting and validating git state
      • releasing v0.2.0, commit 676660f00993cf9adc25a572c89d25484bf5dc56
      • pipe skipped              error=disabled during snapshot mode
   • parsing tag
   • setting defaults
      • snapshotting
      • github/gitlab/gitea releases
      • project name
      • building binaries
      • creating source archive
      • archives
      • linux packages
      • snapcraft packages
      • calculating checksums
      • signing artifacts
      • docker images
      • artifactory
      • blobs
      • homebrew tap formula
         • optimistically guessing `brew[0].installs`, double check
      • scoop manifests
   • snapshotting
   • checking ./dist
   • writing effective config file
      • writing                   config=dist/config.yaml
   • generating changelog
      • pipe skipped              error=not available for snapshots
   • building binaries
      • building                  binary=/Users/s07726/src/github.com/nakabonne/gosivy/dist/gosivy_windows_amd64/gosivy.exe
      • building                  binary=/Users/s07726/src/github.com/nakabonne/gosivy/dist/gosivy_linux_arm_7/gosivy
      • building                  binary=/Users/s07726/src/github.com/nakabonne/gosivy/dist/gosivy_darwin_amd64/gosivy
      • building                  binary=/Users/s07726/src/github.com/nakabonne/gosivy/dist/gosivy_linux_amd64/gosivy
      • building                  binary=/Users/s07726/src/github.com/nakabonne/gosivy/dist/gosivy_linux_arm64/gosivy
   ⨯ release failed after 5.39s error=failed to build for windows_amd64: # github.com/shirou/gopsutil/process
../../../../go/pkg/mod/github.com/shirou/gopsutil@v2.20.9+incompatible/process/process_windows.go:184:13: undefined: "golang.org/x/sys/windows".EnumProcesses

golang.org/x/sys/windows looks unable to be installed on other than Windows OS.

berkantay commented 1 year ago

Maybe we can add windows support to README.md as well 💯