Skip to content
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

Custom plugin fails to compile on Windows #23791

Closed
kamyar1979 opened this issue Aug 11, 2024 · 3 comments · Fixed by hashicorp/nomad-skeleton-driver-plugin#41
Closed

Custom plugin fails to compile on Windows #23791

kamyar1979 opened this issue Aug 11, 2024 · 3 comments · Fixed by hashicorp/nomad-skeleton-driver-plugin#41
Assignees
Labels

Comments

@kamyar1979
Copy link

kamyar1979 commented Aug 11, 2024

Nomad version

Nomad v1.8.2
BuildDate 2024-07-16T08:50:09Z
Revision 7f0822c
go version go1.22.6 windows/arm64

Operating system and Environment details

Windows 11 ARM64

Issue

Custom plugin fails to compile, Go 1.22.6

Reproduction steps

  1. Get our open source plugin: https://github.com/TibaGroup/nomad-dotnet-driver
  2. Remove go.mod and go.sum
  3. go mod init github.com/TibaGroup/nomad-dotnet-driver
  4. Add following line to go mod: "replace github.com/armon/go-metrics v0.5.3 => github.com/hashicorp/go-metrics v0.5.3"
  5. go mod tidy
  6. go build -o plugin_directory/nomad-dotnet-driver

Expected Result

The binary must be built.

Actual Result

github.com/hashicorp/nomad/client/lib/fifo
..\go\pkg\mod\github.com\hashicorp\nomad@v1.8.2\client\lib\fifo\fifo_windows.go:101:18: undefined: winio.ListenOnlyPipe

@kamyar1979
Copy link
Author

kamyar1979 commented Aug 11, 2024

Resolved: Changed winio.ListenOnlyPipe to winio.ListenPipe
Apparently it is a long time that the function name has changed!

@pkazmierczak
Copy link
Contributor

Hey @kamyar1979, thanks for reporting this! Sadly, we depend on a fork of Microsoft/go-winio, so you'll need another line in the go.mod file:

replace (
	github.com/Microsoft/go-winio => github.com/endocrimes/go-winio v0.4.13-0.20190628114223-fb47a8b41948
	github.com/armon/go-metrics => github.com/armon/go-metrics v0.0.0-20230509193637-d9ca9af9f1f9
)

Let me know if this helps!

@kamyar1979
Copy link
Author

Thank you! The solution works! It would be better to mention these changes in the documents.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

Successfully merging a pull request may close this issue.

2 participants