Skip to content

build: decide on policy for supporting Go on Microsoft Linux #16628

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

Closed
aeneasr opened this issue Aug 7, 2016 · 19 comments
Closed

build: decide on policy for supporting Go on Microsoft Linux #16628

aeneasr opened this issue Aug 7, 2016 · 19 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@aeneasr
Copy link

aeneasr commented Aug 7, 2016

  1. What version of Go are you using (go version)?

Go1.4 is installed from binaries: go version go1.4 linux/amd64

  1. What operating system and processor architecture are you using (go env)?

I am trying out the new bash on ubuntu on windows 10 (amd64) feature: https://msdn.microsoft.com/en-us/commandline/wsl/about

$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/mnt/d/workspace/go"
GORACE=""
GOROOT="/home/foobar/.gvm/gos/go1.4"
GOTOOLDIR="/home/foobar/.gvm/gos/go1.4/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"
  1. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.

I tried installing go 1.6 from source using gvm:

# install go1.4 from binaries
gvm install go1.4 -B
gvm use go1.4
export GOROOT_BOOTSTRAP=$GOROOT

# install go1.6 from source
gvm install go1.6
Installing go1.6...
 * Compiling...
ERROR: Failed to compile. Check the logs at /home/foobar/.gvm/logs/go-go1.6-compile.log
ERROR: Failed to use installed version
  1. What did you expect to see?

I expected Go to be compiled

  1. What did you see instead?
$ cat  /home/foobar/.gvm/logs/go-go1.6-compile.log
##### Building Go bootstrap tool.
cmd/dist
# _/home/foobar/.gvm/gos/go1.6/src/cmd/dist
%L%: internal compiler error: fault
@aeneasr aeneasr changed the title Compiling Go on ubuntu for windows 10 fails with: "internal compiler error: fault" Compiling Go and Go Code on Bas On Ubuntu On Windows 10 fails with: "internal compiler error: fault" Aug 7, 2016
@aeneasr
Copy link
Author

aeneasr commented Aug 7, 2016

The same thing happens when running go run ... on any go code:

$ go run main.go
# github.com/Sirupsen/logrus
%L%: internal compiler error: fault
# github.com/julienschmidt/httprouter
%L%: internal compiler error: fault
# github.com/ory-am/common/rand/sequence
%L%: internal compiler error: fault
# github.com/go-errors/errors
%L%: internal compiler error: fault
# github.com/asaskevich/govalidator
%L%: internal compiler error: fault
# github.com/pkg/errors
%L%: internal compiler error: fault
# golang.org/x/crypto/blowfish
%L%: internal compiler error: fault
....

@aeneasr aeneasr changed the title Compiling Go and Go Code on Bas On Ubuntu On Windows 10 fails with: "internal compiler error: fault" Compiling Go and Go Code on Bas On Ubuntu On Windows 10 fails with: "internal compiler error: fault"h Aug 7, 2016
@aeneasr aeneasr changed the title Compiling Go and Go Code on Bas On Ubuntu On Windows 10 fails with: "internal compiler error: fault"h Compiling Go and Go Code on Bash On Ubuntu On Windows 10 fails with: "internal compiler error: fault" Aug 7, 2016
@davecheney
Copy link
Contributor

The windows 10 emulation is not perfect. I recommend you use a newer
version of go as your bootstrap compile.

On Sun, 7 Aug 2016, 20:22 Aeneas [email protected] wrote:

The same thing happens when running go run ... on any go code:

$ go run main.go

github.com/Sirupsen/logrus

%L%: internal compiler error: fault

github.com/julienschmidt/httprouter

%L%: internal compiler error: fault

github.com/ory-am/common/rand/sequence

%L%: internal compiler error: fault

github.com/go-errors/errors

%L%: internal compiler error: fault

github.com/asaskevich/govalidator

%L%: internal compiler error: fault

github.com/pkg/errors

%L%: internal compiler error: fault

golang.org/x/crypto/blowfish

%L%: internal compiler error: fault
....


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#16628 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAAcA62PLh7nlC_XCZsL5_pniVHVzYM9ks5qdbHvgaJpZM4JeeFN
.

@aeneasr
Copy link
Author

aeneasr commented Aug 7, 2016

Thank you, that got me a step further. I am now using go1.6 from binaries to compile go1.7rc4, which still fails, unfortunately:

$ cat /home/foobar/.gvm/logs/go-go1.7rc4-compile.log
##### Building Go bootstrap tool.
cmd/dist

##### Building Go toolchain using /home/foobar/.gvm/gos/go1.6.
bootstrap/internal/sys
bootstrap/internal/obj
bootstrap/internal/obj/arm
bootstrap/internal/obj/arm64
bootstrap/internal/obj/mips
bootstrap/internal/obj/ppc64
bootstrap/internal/obj/s390x
bootstrap/internal/obj/x86
bootstrap/asm/internal/arch
bootstrap/asm/internal/flags
bootstrap/asm/internal/lex
bootstrap/asm/internal/asm
bootstrap/internal/bio
bootstrap/asm
bootstrap/compile/internal/big
bootstrap/compile/internal/ssa
bootstrap/internal/gcprog
bootstrap/compile/internal/gc
bootstrap/compile/internal/amd64
bootstrap/compile/internal/arm
bootstrap/compile/internal/arm64
bootstrap/compile/internal/mips64
bootstrap/compile/internal/ppc64
bootstrap/compile/internal/s390x
bootstrap/compile/internal/x86
bootstrap/compile
bootstrap/link/internal/ld
bootstrap/link/internal/amd64
bootstrap/link/internal/arm
bootstrap/link/internal/arm64
bootstrap/link/internal/mips64
bootstrap/link/internal/ppc64
bootstrap/link/internal/s390x
bootstrap/link/internal/x86
bootstrap/link

##### Building go_bootstrap for host, linux/amd64.
runtime/internal/sys
runtime/internal/atomic
go tool dist: FAILED: /home/foobar/.gvm/gos/go1.7rc4/pkg/tool/linux_amd64/asm -I /tmp/go-tool-dist-364143704/runtime/internal/atomic -I /home/foobar/.gvm/gos/go1.7rc4/pkg/include -D GOOS_linux -D GOARCH_amd64 -D GOOS_GOARCH_linux_amd64 -o /tmp/go-tool-dist-364143704/runtime/internal/atomic/asm_amd64.o /home/foobar/.gvm/gos/go1.7rc4/src/runtime/internal/atomic/asm_amd64.s: wait: interrupted system call
go tool dist: open /tmp/go-tool-dist-364143704/runtime/internal/atomic/_go_.a: no such file or directory

What's weird, running gvm install go1.7rc4 consecutive times results in a variety of error messages, for example:

##### Building go_bootstrap for host, linux/amd64.
runtime/internal/sys
runtime/internal/atomic
runtime
go tool dist: FAILED: /home/foobar/.gvm/gos/go1.7rc4/pkg/tool/linux_amd64/asm -I /tmp/go-tool-dist-949347488/runtime -I /home/foobar/.gvm/gos/go1.7rc4/pkg/include -D GOOS_linux -D GOARCH_amd64 -D GOOS_GOARCH_linux_amd64 -o /tmp/go-tool-dist-949347488/runtime/asm_amd64.o /home/foobar/.gvm/gos/go1.7rc4/src/runtime/asm_amd64.s: read |0: interrupted system call
unicode/utf16
unicode/utf8
encoding
errors
internal/race
internal/syscall/windows/sysdll
math
sort
sync/atomic
unicode
go tool dist: FAILED: /home/foobar/.gvm/gos/go1.7rc4/pkg/tool/linux_amd64/compile -pack -o /tmp/go-tool-dist-949347488/sort/_go_.a -p sort /home/foobar/.gvm/gos/go1.7rc4/src/sort/search.go /home/foobar/.gvm/gos/go1.7rc4/src/sort/sort.go: wait: interrupted system call
go tool dist: FAILED: /home/foobar/.gvm/gos/go1.7rc4/pkg/tool/linux_amd64/compile -pack -o /tmp/go-tool-dist-949347488/internal/syscall/windows/sysdll/_go_.a -p internal/syscall/windows/sysdll /home/foobar/.gvm/gos/go1.7rc4/src/internal/syscall/windows/sysdll/sysdll.go: fork/exec /home/foobar/.gvm/gos/go1.7rc4/pkg/tool/linux_amd64/compile: interrupted system call
go tool dist: open /tmp/go-tool-dist-949347488/sync/atomic/asm_amd64.o: no such file or directory
can't create /tmp/go-tool-dist-949347488/sort/_go_.a: open /tmp/go-tool-dist-949347488/sort/_go_.a: no such file or directory
can't create /tmp/go-tool-dist-949347488/math/_go_.a: open /tmp/go-tool-dist-949347488/math/_go_.a: no such file or directory
can't create /tmp/go-tool-dist-949347488/unicode/_go_.a: open /tmp/go-tool-dist-949347488/unicode/_go_.a: no such file or directory

@davecheney
Copy link
Contributor

Real talk: the Windows 10 Linux thing isn't complete, some stuff isn't working and that isn't Go's fault. I've heard that go 1.6.3 works well.

On 7 Aug 2016, at 20:38, Aeneas [email protected] wrote:

Thank you, that got me a step further. I am now using go1.6 from binaries to compile go1.7rc4, which still fails, unfortunately:

$ cat /home/foobar/.gvm/logs/go-go1.7rc4-compile.log

Building Go bootstrap tool.

cmd/dist

Building Go toolchain using /home/foobar/.gvm/gos/go1.6.

bootstrap/internal/sys
bootstrap/internal/obj
bootstrap/internal/obj/arm
bootstrap/internal/obj/arm64
bootstrap/internal/obj/mips
bootstrap/internal/obj/ppc64
bootstrap/internal/obj/s390x
bootstrap/internal/obj/x86
bootstrap/asm/internal/arch
bootstrap/asm/internal/flags
bootstrap/asm/internal/lex
bootstrap/asm/internal/asm
bootstrap/internal/bio
bootstrap/asm
bootstrap/compile/internal/big
bootstrap/compile/internal/ssa
bootstrap/internal/gcprog
bootstrap/compile/internal/gc
bootstrap/compile/internal/amd64
bootstrap/compile/internal/arm
bootstrap/compile/internal/arm64
bootstrap/compile/internal/mips64
bootstrap/compile/internal/ppc64
bootstrap/compile/internal/s390x
bootstrap/compile/internal/x86
bootstrap/compile
bootstrap/link/internal/ld
bootstrap/link/internal/amd64
bootstrap/link/internal/arm
bootstrap/link/internal/arm64
bootstrap/link/internal/mips64
bootstrap/link/internal/ppc64
bootstrap/link/internal/s390x
bootstrap/link/internal/x86
bootstrap/link

Building go_bootstrap for host, linux/amd64.

runtime/internal/sys
runtime/internal/atomic
go tool dist: FAILED: /home/foobar/.gvm/gos/go1.7rc4/pkg/tool/linux_amd64/asm -I /tmp/go-tool-dist-364143704/runtime/internal/atomic -I /home/foobar/.gvm/gos/go1.7rc4/pkg/include -D GOOS_linux -D GOARCH_amd64 -D GOOS_GOARCH_linux_amd64 -o /tmp/go-tool-dist-364143704/runtime/internal/atomic/asm_amd64.o /home/foobar/.gvm/gos/go1.7rc4/src/runtime/internal/atomic/asm_amd64.s: wait: interrupted system call
go tool dist: open /tmp/go-tool-dist-364143704/runtime/internal/atomic/go.a: no such file or directory
What's weird, running gvm install go1.7rc4 consecutive times results in a variety of error messages, for example:

Building go_bootstrap for host, linux/amd64.

runtime/internal/sys
runtime/internal/atomic
runtime
go tool dist: FAILED: /home/foobar/.gvm/gos/go1.7rc4/pkg/tool/linux_amd64/asm -I /tmp/go-tool-dist-949347488/runtime -I /home/foobar/.gvm/gos/go1.7rc4/pkg/include -D GOOS_linux -D GOARCH_amd64 -D GOOS_GOARCH_linux_amd64 -o /tmp/go-tool-dist-949347488/runtime/asm_amd64.o /home/foobar/.gvm/gos/go1.7rc4/src/runtime/asm_amd64.s: read |0: interrupted system call
unicode/utf16
unicode/utf8
encoding
errors
internal/race
internal/syscall/windows/sysdll
math
sort
sync/atomic
unicode
go tool dist: FAILED: /home/foobar/.gvm/gos/go1.7rc4/pkg/tool/linux_amd64/compile -pack -o /tmp/go-tool-dist-949347488/sort/go.a -p sort /home/foobar/.gvm/gos/go1.7rc4/src/sort/search.go /home/foobar/.gvm/gos/go1.7rc4/src/sort/sort.go: wait: interrupted system call
go tool dist: FAILED: /home/foobar/.gvm/gos/go1.7rc4/pkg/tool/linux_amd64/compile -pack -o /tmp/go-tool-dist-949347488/internal/syscall/windows/sysdll/go.a -p internal/syscall/windows/sysdll /home/foobar/.gvm/gos/go1.7rc4/src/internal/syscall/windows/sysdll/sysdll.go: fork/exec /home/foobar/.gvm/gos/go1.7rc4/pkg/tool/linux_amd64/compile: interrupted system call
go tool dist: open /tmp/go-tool-dist-949347488/sync/atomic/asm_amd64.o: no such file or directory
can't create /tmp/go-tool-dist-949347488/sort/go.a: open /tmp/go-tool-dist-949347488/sort/go.a: no such file or directory
can't create /tmp/go-tool-dist-949347488/math/go.a: open /tmp/go-tool-dist-949347488/math/go.a: no such file or directory
can't create /tmp/go-tool-dist-949347488/unicode/go.a: open /tmp/go-tool-dist-949347488/unicode/go.a: no such file or directory

You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

@aeneasr
Copy link
Author

aeneasr commented Aug 7, 2016

That explanation works for me ;)

@aeneasr aeneasr closed this as completed Aug 7, 2016
@bradfitz
Copy link
Contributor

bradfitz commented Aug 7, 2016

You can file bugs against Microsoft Linux at https://github.com/Microsoft/BashOnWindows/issues

@minux
Copy link
Member

minux commented Aug 7, 2016 via email

@aeneasr
Copy link
Author

aeneasr commented Aug 8, 2016

Please try Go 1.7.

Compiling regular Go code with Go 1.6 works fine. Compiling Go 1.7 using Go 1.6 doesn't work. Compiling Go 1.7rc2 using Go 1.7rc1 (installed from binaries) doesn't work either.

@aeneasr
Copy link
Author

aeneasr commented Aug 8, 2016

Compiling Go 1.7rc2 using Go 1.7rc1 results in:

##### Building Go bootstrap tool.
cmd/dist
go build _/home/foobar/.gvm/gos/go1.7rc2/src/cmd/dist: /home/foobar/.gvm/gos/go1.7rc1/pkg/tool/linux_amd64/compile: waitid: function not implemented

which looks to me like there's some APIs missing?

@minux
Copy link
Member

minux commented Aug 8, 2016 via email

@aeneasr
Copy link
Author

aeneasr commented Aug 8, 2016

Please wait for the next 1.7rc (1.7rc6) for the waitid fix.

I will! I'll also reopen this issue as it seems of interest

@aeneasr aeneasr reopened this Aug 8, 2016
@minux minux added this to the Go1.8 milestone Aug 8, 2016
@minux
Copy link
Member

minux commented Aug 8, 2016 via email

@bradfitz bradfitz changed the title Compiling Go and Go Code on Bash On Ubuntu On Windows 10 fails with: "internal compiler error: fault" build: decide on policy for supporting Go on Microsoft Linux Aug 8, 2016
@ianlancetaylor
Copy link
Contributor

The waitid bug is #16610.

@jboelter
Copy link

jboelter commented Aug 9, 2016

This issue is tracking SA_RESTART support (microsoft/WSL#349)

You can upvote it here: https://wpdev.uservoice.com/forums/266908-command-prompt-console-bash-on-ubuntu-on-windo/suggestions/14046789-add-support-for-restartable-system-calls-i-e-sa

@aeneasr
Copy link
Author

aeneasr commented Aug 20, 2016

Support for restartable syscalls shipped in Windows 10 Insiders build 14905: https://msdn.microsoft.com/en-us/commandline/wsl/release_notes#build-14905

@quentinmit
Copy link
Contributor

waitid is now implemented.

@arekkas Can you please try the latest version of Go 1.7 against the latest version of Windows?

@rsc I hear you were working on getting "bash on windows" running; if you have success, can you try running all.bash to see how close we are to passing?

@quentinmit quentinmit added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Oct 5, 2016
@quentinmit
Copy link
Contributor

As for policy: I think we should support Linux-on-Windows as a second-class port. We should run a builder for it, but not let broken builds block the release.

@rsc
Copy link
Contributor

rsc commented Oct 6, 2016

I failed at getting the "Anniversary Edition" of Windows onto my laptop despite repeated updates. It just didn't want to offer it to me, and you need that one to get to the Ubuntu developer mode. Even though I didn't get it installed, the docs I saw online had it clearly marked as very beta. It's OK if we want to put fixes in, but it's not going to block Go 1.8.

As far as "make a decision", it sounds like other people were saying the same thing, so I think we've decided.

@rsc rsc closed this as completed Oct 6, 2016
@quentinmit
Copy link
Contributor

FYI, #17365 is tracking our setup of a Linux-on-Windows builder. We'll try to get this done in time for Go 1.9, but given that Windows Server 2016 doesn't support Linux, I'm not sure how we'll get there.

There are still problems with all.bash on Linux on Windows 10, more details in that issue.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

9 participants