dnephin / dobi

A build automation tool for Docker applications
https://dnephin.github.io/dobi/
Apache License 2.0
309 stars 36 forks source link

Building under WSL2 on Windows #190

Open flcdrg opened 4 years ago

flcdrg commented 4 years ago

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/docker@v17.12.0-ce-rc1.0.20200309214505-aa6a9891b09c+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 commented 4 years ago

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

dnephin commented 4 years ago

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