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

cmd/go: go1.11 does not work on Alpine Linux #27264

Closed
michilu opened this issue Aug 27, 2018 · 3 comments

Comments

Projects
None yet
2 participants
@michilu
Copy link

commented Aug 27, 2018

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

go version go1.11 linux/amd64
(This is my handprint, the reason is below.)

Does this issue reproduce with the latest release?

Yes. Installed by go get golang.org/dl/go1.11.

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

go1.11: It was silently done with status 1.
go1.10.3:

GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/go"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build312539232=/tmp/go-build -gno-record-gcc-switches"

What did you do?

docker run --rm -it --cap-add sys_ptrace golang:1.10.3-alpine3.8

Then in the Docker container:

apk add --update git strace
go get -v golang.org/dl/go1.11 && go1.11 download
...

What did you expect to see?

go1.11 version
go version go1.11 linux/amd64

What did you see instead?

go1.11 version
echo $?
1

It was silently done with status 1.


I submit the results of strace go1.11 version.

@michilu

This comment has been minimized.

Copy link
Author

commented Aug 27, 2018

I seem to like the futex call is never return.

futex(0x810448, FUTEX_WAIT, 0, NULL)    = 0

This line: https://gist.github.com/michilu/131116bf3cd43abc5fe14256b3fc178d#file-strace-go1-11-txt-L170

@bradfitz

This comment has been minimized.

Copy link
Member

commented Aug 27, 2018

The official Go binaries are known to not work on Alpine because we assume glibc. That is #18773 and #19938.

Are you saying that the Go binary from go get golang.org/dl/go1.10.3 but not from go get golang.org/dl/go1.11? Or did you get your go1.10.3 from somewhere else? (e.g. from Alpine apk)

@michilu

This comment has been minimized.

Copy link
Author

commented Aug 28, 2018

The go1.10.3 was already installed from Alpine apk.

OK. I understood Golang needs the glibc for itself.
So could not install by go get.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.