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/link: duplicate symbol runtime.exit #36643

Closed
hugelgupf opened this issue Jan 19, 2020 · 1 comment
Closed

cmd/link: duplicate symbol runtime.exit #36643

hugelgupf opened this issue Jan 19, 2020 · 1 comment
Milestone

Comments

@hugelgupf
Copy link
Contributor

@hugelgupf hugelgupf commented Jan 19, 2020

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

$ go version
go version go1.13.4 linux/amd64

Does this issue reproduce with the latest release?

afaict.

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/usr/local/google/home/chrisko/.cache/go-build"
GOENV="/usr/local/google/home/chrisko/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/usr/local/google/home/chrisko/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/lib/google-golang"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/google-golang/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
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 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build430274013=/tmp/go-build -gno-record-gcc-switc
hes"

What did you do?

$ go get github.com/hugelgupf/p9/cmd/p9ufs
$ cd $GOPATH/github.com/hugelgupf/p9/cmd/p9ufs
$ GOARCH=mips go build 
# github.com/hugelgupf/p9/cmd/p9ufs
2020/01/19 12:18:10 duplicate symbol runtime.exit (types 1 and 1) in runtime and $WORK/b005/_pkg_.a(sys_linux_mipsx.)
$ GOARCH=mips go1.12 build
$ echo $?
0
$ go1.12 version
go version go1.12 linux/amd64

If you add github.com/djdv/p9 as a remote and checkout restream/ipfs (adds support for more GOARCH/GOOS), you can see different errors in combination with other architectures:

--> darwin/arm
# github.com/hugelgupf/p9/cmd/p9ufs
runtime.save_g: relocation target runtime.read_tls_fallback not defined
runtime.load_g: relocation target runtime.read_tls_fallback not defined
runtime._initcgo: relocation target runtime.read_tls_fallback not defined
xx_cgo_panicmem: relocation target runtime.exit not defined for ABI0 (but is defined for ABIInternal)
--> linux/arm64
--> windows/arm64
cmd/go: unsupported GOOS/GOARCH pair windows/arm64
--> darwin/arm64
# github.com/hugelgupf/p9/cmd/p9ufs
xx_cgo_panicmem: relocation target runtime.exit not defined for ABI0 (but is defined for ABIInternal)

What did you expect to see?

builds correctly, like it did with go 1.12

What did you see instead?

failed build.

@hugelgupf hugelgupf changed the title cmd/link: 1.13 only - duplicate symbol runtime.exit cmd/link: duplicate symbol runtime.exit Jan 19, 2020
@hugelgupf

This comment has been minimized.

Copy link
Contributor Author

@hugelgupf hugelgupf commented Jan 19, 2020

It seems internal Go has some patches that make this happen. I'll open another bug for other linker problems.

@hugelgupf hugelgupf closed this Jan 19, 2020
@toothrot toothrot added this to the Unplanned milestone Jan 22, 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
2 participants
You can’t perform that action at this time.