dobi icon indicating copy to clipboard operation
dobi copied to clipboard

Building under WSL2 on Windows

Open flcdrg opened this issue 5 years ago • 2 comments

Apologies, I'm completely unfamiliar with Go, so trying to find my way.

I thought I'd try compiling the latest version from master. After some weird gofmt errors, I discovered that the repo needs to be checked out with autocrlf=false.

I had some problems with the test-examples, but figured they're examples, so commented that part out and moved on. Same with docs-build.

I now got as far as the Windows binary step, but that's failing:

[job: binary] script/build -> ./dist/bin/ Start
Number of parallel builds: 7

-->   windows/amd64: github.com/dnephin/dobi
-->       linux/arm: github.com/dnephin/dobi
-->     linux/arm64: github.com/dnephin/dobi
-->    darwin/amd64: github.com/dnephin/dobi
-->     linux/amd64: github.com/dnephin/dobi

1 errors occurred:
--> windows/amd64 error: exit status 2
Stderr: go: downloading github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: downloading github.com/inconshreveable/mousetrap v1.0.0
go: downloading github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873
go: downloading github.com/Microsoft/hcsshim v0.8.7
go: downloading github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78
go: extracting github.com/inconshreveable/mousetrap v1.0.0
go: extracting github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: extracting github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78
go: extracting github.com/Microsoft/hcsshim v0.8.7
go: extracting github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: finding github.com/Microsoft/go-winio v0.4.15-0.20200113171025-3fe6c5262873
go: finding github.com/Microsoft/hcsshim v0.8.7
go: finding github.com/Azure/go-ansiterm v0.0.0-20170929234023-d6e3b3328b78
go: finding github.com/inconshreveable/mousetrap v1.0.0
# github.com/docker/docker/pkg/system
/go/pkg/mod/github.com/docker/[email protected]+incompatible/pkg/system/filesys_windows.go:111:24: cannot use uintptr(unsafe.Pointer(&sd[0])) (type uintptr) as type *"golang.org/x/sys/windows".SECURITY_DESCRIPTOR in assignment

[ERROR] failed to execute task "binary:": exited with non-zero status code 1

Any suggestions?

flcdrg avatar Apr 28 '20 13:04 flcdrg

I think this relates to https://github.com/golang/go/issues/34610 and https://stackoverflow.com/questions/61306742/version-of-golang-org-x-syshash-in-go-mod-ignored

flcdrg avatar Apr 28 '20 23:04 flcdrg

Thank you for the bug report! I think you are correct, that is the problem. I think this was probably fixed in the docker/docker dependency, so updating that dependency should fix the build.

dnephin avatar May 06 '20 01:05 dnephin