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/compile: internal compiler error: cannot export NONAME (2) node #20682

Closed
mkumatag opened this issue Jun 15, 2017 · 7 comments
Closed

cmd/compile: internal compiler error: cannot export NONAME (2) node #20682

mkumatag opened this issue Jun 15, 2017 · 7 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mkumatag
Copy link

Please answer these questions before submitting your issue. Thanks!

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

go version devel +ff07486 Thu Jun 15 04:17:30 2017 +0000 linux/amd64

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

root@localhost:~/origin# go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build567431999=/tmp/go-build -gno-record-gcc-switches"
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"
root@localhost:~/origin#

What did you do?

  1. Git clone openshift origin code - https://github.com/openshift/origin.git
  2. Apply patch from mkumatag/origin@4b0a97f to proceed the build with upstream go.
  3. make all

What did you expect to see?

Make all should work fine without any issues and should be able generate all the openshift binaries but throwing the error

What did you see instead?

root@localhost:~/origin# make all
hack/build-go.sh  
[WARNING] Detected Go version: go version devel +ff07486 Thu Jun 15 04:17:30 2017 +0000 linux/amd64.
[WARNING] Origin builds require Go version 1.7 or greater.
++ Building go targets for linux/amd64: cmd/openshift cmd/oc cmd/kubefed pkg/sdn/plugin/sdn-cni-plugin vendor/github.com/containernetworking/cni/plugins/ipam/host-local vendor/github.com/containernetworking/cni/plugins/main/loopback
# github.com/openshift/origin/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options
/root/origin/_output/local/go/src/github.com/openshift/origin/vendor/gopkg.in/natefinch/lumberjack.v2/lumberjack.go:110:0: undefined: lumberjack.megabyte
$GOROOT/src/strings/strings.go:499:0: undefined: strings.HasSuffix
<autogenerated>:1:0: internal compiler error: cannot export NONAME (2) node
==> please file an issue and assign to gri@


goroutine 1 [running]:
runtime/debug.Stack(0x0, 0x0, 0x0)
	/usr/local/go/src/runtime/debug/stack.go:24 +0xa7
cmd/compile/internal/gc.Fatalf(0xb7305b, 0x47, 0xc421849140, 0x2, 0x2)
	/usr/local/go/src/cmd/compile/internal/gc/subr.go:181 +0x230
cmd/compile/internal/gc.(*exporter).expr(0xc421849628, 0xc42109b480)
	/usr/local/go/src/cmd/compile/internal/gc/bexport.go:1399 +0x380
cmd/compile/internal/gc.(*exporter).expr(0xc421849628, 0xc42109b500)
	/usr/local/go/src/cmd/compile/internal/gc/bexport.go:1377 +0x5b7
cmd/compile/internal/gc.(*exporter).expr(0xc421849628, 0xc42109b580)
	/usr/local/go/src/cmd/compile/internal/gc/bexport.go:1320 +0x826
cmd/compile/internal/gc.(*exporter).exprList(0xc421849628, 0xc4210966a0)
	/usr/local/go/src/cmd/compile/internal/gc/bexport.go:1126 +0xd9
cmd/compile/internal/gc.(*exporter).stmt(0xc421849628, 0xc42109b300)
	/usr/local/go/src/cmd/compile/internal/gc/bexport.go:1466 +0x7e8
cmd/compile/internal/gc.(*exporter).stmtList(0xc421849628, 0xc4210966c0)
	/usr/local/go/src/cmd/compile/internal/gc/bexport.go:1103 +0xfe
cmd/compile/internal/gc.(*exporter).stmt(0xc421849628, 0xc42109b080)
	/usr/local/go/src/cmd/compile/internal/gc/bexport.go:1481 +0x6b9
cmd/compile/internal/gc.(*exporter).stmtList(0xc421849628, 0xc421096700)
	/usr/local/go/src/cmd/compile/internal/gc/bexport.go:1103 +0xfe
cmd/compile/internal/gc.export(0xc4213924c0, 0x0, 0x0)
	/usr/local/go/src/cmd/compile/internal/gc/bexport.go:380 +0x7f5
cmd/compile/internal/gc.dumpexport()
	/usr/local/go/src/cmd/compile/internal/gc/export.go:180 +0x8a
cmd/compile/internal/gc.dumpobj1(0x7ffcdc8e8be7, 0x6c, 0x3)
	/usr/local/go/src/cmd/compile/internal/gc/obj.go:95 +0xa5d
cmd/compile/internal/gc.dumpobj()
	/usr/local/go/src/cmd/compile/internal/gc/obj.go:51 +0x61
cmd/compile/internal/gc.Main(0xb75728)
	/usr/local/go/src/cmd/compile/internal/gc/main.go:631 +0x24f7
main.main()
	/usr/local/go/src/cmd/compile/main.go:49 +0x95

[ERROR] PID 7097: hack/lib/build/binaries.sh:223: `GOOS=${platform%/*} GOARCH=${platform##*/} go install -pkgdir "${OS_OUTPUT_PKGDIR}/${platform}" -tags "${OS_GOFLAGS_TAGS-} ${!platform_gotags_envvar:-}" -ldflags="${local_ldflags}" "${goflags[@]:+${goflags[@]}}" "${nonstatics[@]}"` exited with status 2.
[INFO] 		Stack Trace: 
[INFO] 		  1: hack/lib/build/binaries.sh:223: `GOOS=${platform%/*} GOARCH=${platform##*/} go install -pkgdir "${OS_OUTPUT_PKGDIR}/${platform}" -tags "${OS_GOFLAGS_TAGS-} ${!platform_gotags_envvar:-}" -ldflags="${local_ldflags}" "${goflags[@]:+${goflags[@]}}" "${nonstatics[@]}"`
[INFO] 		  2: hack/lib/build/binaries.sh:158: os::build::internal::build_binaries
[INFO] 		  3: hack/build-go.sh:37: os::build::build_binaries
[INFO]   Exiting with code 2.
[ERROR] PID 6999: hack/lib/build/binaries.sh:152: `( os::build::internal::build_binaries "${binaries[@]+"${binaries[@]}"}" )` exited with status 2.
[INFO] 		Stack Trace: 
[INFO] 		  1: hack/lib/build/binaries.sh:152: `( os::build::internal::build_binaries "${binaries[@]+"${binaries[@]}"}" )`
[INFO] 		  2: hack/build-go.sh:37: os::build::build_binaries
[INFO]   Exiting with code 2.
Makefile:41: recipe for target 'all' failed
make: *** [all] Error 2
root@localhost:~/origin# 
@mkumatag
Copy link
Author

/cc @laboger

@mkumatag
Copy link
Author

mkumatag commented Jun 15, 2017

/cc @griesemer @mdempsky @bradfitz

@odeke-em
Copy link
Member

I've tried 2 times in a row to clone that repo openshift, in order to try to reproduce and isolate the issue but git has bailed out

$ git clone https://github.com/openshift/origin.git
Cloning into 'origin'...
remote: Counting objects: 273625, done.
remote: Compressing objects: 100% (68/68), done.
error: RPC failed; curl 56 SSLRead() return error -36 661.00 KiB/s   
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Emmanuels-MacBook-Pro-2:openshift emmanuelodeke$ git clone https://github.com/openshift/origin.git
Cloning into 'origin'...
remote: Counting objects: 273625, done.
remote: Compressing objects: 100% (68/68), done.
error: RPC failed; curl 56 SSLRead() return error -36 695.00 KiB/s    
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

@ALTree ALTree changed the title internal compiler error: cannot export NONAME (2) node cmd/compile: internal compiler error: cannot export NONAME (2) node Jun 15, 2017
@ALTree ALTree added this to the Go1.9Maybe milestone Jun 15, 2017
@bradfitz
Copy link
Contributor

Assigning to @griesemer per his request:

<autogenerated>:1:0: internal compiler error: cannot export NONAME (2) node
==> please file an issue and assign to gri@

@bradfitz bradfitz added the NeedsFix The path to resolution is known, but the work has not been done. label Jun 15, 2017
@mdempsky
Copy link
Member

The compiler also first printed two undefined symbol errors:

# github.com/openshift/origin/vendor/k8s.io/kubernetes/cmd/kube-apiserver/app/options
/root/origin/_output/local/go/src/github.com/openshift/origin/vendor/gopkg.in/natefinch/lumberjack.v2/lumberjack.go:110:0: undefined: lumberjack.megabyte
$GOROOT/src/strings/strings.go:499:0: undefined: strings.HasSuffix
<autogenerated>:1:0: internal compiler error: cannot export NONAME (2) node

Normally, undefined symbols would prevent us from even getting to writing out the object file. But oddly, here we're emitting undefined symbol errors against the imported package's source files.

Waiting for git to finish cloning the openshift repo. (650MB downloaded so far.)

@mdempsky
Copy link
Member

This appears to be due to CL 36170. If I revert CLs 45817 and 36170 (plus adjustments for splitting out package types from package gc), package options builds again.

I'm leaning towards just doing that for 1.9. CL 36170 was supposed to be a simple code cleanup, but it's turned out to have some subtle consequences.

@gopherbot
Copy link

CL https://golang.org/cl/45911 mentions this issue.

gopherbot pushed a commit that referenced this issue Jun 15, 2017
Minimal reconstruction of reported failure case.

Manually verified that test fails with CL 45911 reverted.

Change-Id: Ia5d11500d91b46ba1eb5d841db3987edb9136c39
Reviewed-on: https://go-review.googlesource.com/45970
Run-TryBot: Matthew Dempsky <mdempsky@google.com>
Reviewed-by: Robert Griesemer <gri@golang.org>
@golang golang locked and limited conversation to collaborators Jun 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

7 participants