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
Milestone

Comments

@paleozogt
Copy link

@paleozogt paleozogt commented Feb 18, 2020

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

This comment has been minimized.

Copy link
Author

@paleozogt 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

This comment has been minimized.

Copy link
Author

@paleozogt paleozogt commented Feb 18, 2020

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

This comment has been minimized.

Copy link
Contributor

@toothrot toothrot commented Feb 18, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.