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: gccgo crashes when building json-iterator #37288

Open
paleozogt opened this issue Feb 18, 2020 · 3 comments
Open

cmd/go: gccgo crashes when building json-iterator #37288

paleozogt opened this issue Feb 18, 2020 · 3 comments
Labels
NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone

Comments

@paleozogt
Copy link

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

$ go version
go version go1.12.2 gccgo (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008 linux/amd64

$ powerpc64le-linux-gnu-gccgo-9 --version
powerpc64le-linux-gnu-gccgo-9 (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Does this issue reproduce with the latest release?

I'm using gccgo-9, which I think is the latest.

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

go env Output
$ go env
GOARCH="ppc64le"
GOBIN=""
GOCACHE="/home/apollo/.gocache"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/apollo/Development/json-iterator"
GOPROXY=""
GORACE=""
GOROOT="/usr"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/gcc/x86_64-linux-gnu/9"
GCCGO="/usr/bin/powerpc64le-linux-gnu-gccgo-9"
CC="powerpc64le-linux-gnu-gcc-9"
CXX="x86_64-linux-gnu-g++-9"
CGO_ENABLED="0"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build273883847=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

What did you do?

export GOARCH=ppc64le
export CC=powerpc64le-linux-gnu-gcc-9
go get -v github.com/json-iterator/go

What did you expect to see?

Successful installation of the module.

What did you see instead?

gccgo crashes:

github.com/json-iterator/go
# github.com/json-iterator/go
go1: internal compiler error: in do_get_backend, at go/gofrontend/expressions.cc:4677
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.
@gopherbot gopherbot added this to the Gccgo milestone Feb 18, 2020
@paleozogt
Copy link
Author

paleozogt commented Feb 18, 2020

Trying with different gccgo cross-compilers...

amd64 works:

export GOARCH=amd64 
export CC=x86_64-linux-gnu-gcc-9
go get -v github.com/json-iterator/go
file pkg/gccgo_linux_amd64/github.com/json-iterator/libgo.a
pkg/gccgo_linux_amd64/github.com/json-iterator/libgo.a: current ar archive

arm64 works:

export GOARCH=arm64
export CC=aarch64-linux-gnu-gcc-9
go get -v github.com/json-iterator/go
file pkg/gccgo_linux_arm64/github.com/json-iterator/libgo.a
pkg/gccgo_linux_arm64/github.com/json-iterator/libgo.a: current ar archive

ppc works:

export GOARCH=ppc
export CC=powerpc-linux-gnu-gcc-9
go get -v github.com/json-iterator/go
file pkg/gccgo_linux_ppc/github.com/json-iterator/libgo.a
pkg/gccgo_linux_ppc/github.com/json-iterator/libgo.a: current ar archive

ppc64 crashes:

export GOARCH=ppc64
export CC=powerpc64-linux-gnu-gcc-9
go get -v github.com/json-iterator/go
github.com/modern-go/concurrent
github.com/modern-go/reflect2
github.com/json-iterator/go
# github.com/json-iterator/go
go1: internal compiler error: in do_get_backend, at go/gofrontend/expressions.cc:4677
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-9/README.Bugs> for instructions.

@paleozogt
Copy link
Author

btw, the crash says to look at /usr/share/doc/gcc-9/README.Bugs, but it doesn't exist:

cat /usr/share/doc/gcc-9/README.Bugs
cat: /usr/share/doc/gcc-9/README.Bugs: No such file or directory

@toothrot toothrot added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Feb 18, 2020
@toothrot
Copy link
Contributor

/cc @ianlancetaylor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

3 participants