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: collect2: error: ld returned 1 exit status #41915

Closed
felipeweb opened this issue Oct 11, 2020 · 6 comments
Closed

cmd/link: collect2: error: ld returned 1 exit status #41915

felipeweb opened this issue Oct 11, 2020 · 6 comments

Comments

@felipeweb
Copy link

@felipeweb felipeweb commented Oct 11, 2020

Please file a new issue at golang.org/issue/new using this template:

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

$ go version
go version go1.15.2 linux/amd64

Does this issue reproduce with the latest release?

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

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN="/home/felipeweb/go/bin"
GOCACHE="/home/felipeweb/.cache/go-build"
GOENV="/home/felipeweb/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/felipeweb/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/felipeweb/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/home/linuxbrew/.linuxbrew/Cellar/go/1.15.2/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/home/linuxbrew/.linuxbrew/Cellar/go/1.15.2/libexec/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc-5"
CXX="g++-5"
CGO_ENABLED="1"
GOMOD="/home/felipeweb/projects/getupcloud/undistro/go.mod"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build303208127=/tmp/go-build -gno-record-gcc-switches"
GOROOT/bin/go version: go version go1.15.2 linux/amd64
GOROOT/bin/go tool compile -V: compile version go1.15.2
uname -sr: Linux 5.4.0-1024-gcp
Distributor ID:	Ubuntu
Description:	Ubuntu 20.04.1 LTS
Release:	20.04
Codename:	focal
/lib/x86_64-linux-gnu/libc.so.6: GNU C Library (Ubuntu GLIBC 2.31-0ubuntu9) stable release version 2.31.

What did you do?

make test on https://github.com/kubernetes-sigs/cluster-api

Additional context

This error began after I upgrade the version of k8s modules from v0.18.9 to v0.19.2

we just exclude tests for now kubernetes-sigs/cluster-api@2fb9590#diff-bebcf249b0c23c2726a5a915ea21a6932d2a09e9c6cc2e828cc760c919f557d5R442

What did you expect to see?

go test exited with code 0

What did you see instead?

# github.com/getupio-undistro/undistro/client/cluster.test
/home/linuxbrew/.linuxbrew/Cellar/go/1.15.2/libexec/pkg/tool/linux_amd64/link: running gcc-5 failed: exit status 1
collect2: error: ld returned 1 exit status

FAIL    github.com/getupio-undistro/undistro/client/cluster [build failed]
@felipeweb felipeweb changed the title collect2: error: ld returned 1 exit status cmd/link: collect2: error: ld returned 1 exit status Oct 11, 2020
@dmitshur
Copy link
Member

@dmitshur dmitshur commented Oct 13, 2020

Please provide more information about how to reproduce the error. "go test ./..." is not enough information. What repository did you run that in?

@ianlancetaylor
Copy link
Contributor

@ianlancetaylor ianlancetaylor commented Oct 13, 2020

Also note that gcc-5 is quite old. The current version is gcc-10.

@felipeweb
Copy link
Author

@felipeweb felipeweb commented Oct 13, 2020

Sorry about that! information updated.

@dmitshur
Copy link
Member

@dmitshur dmitshur commented Oct 13, 2020

From your report, the error happens when testing the github.com/getupio-undistro/undistro/client/cluster package, but that package doesn't appear to be available publicly.

Is it possible to reduce this to a smaller reproducible sample? That would help with the investigation. Thanks.

@felipeweb
Copy link
Author

@felipeweb felipeweb commented Oct 13, 2020

@felipeweb
Copy link
Author

@felipeweb felipeweb commented Oct 13, 2020

closing because old gcc seems to be the cause

@felipeweb felipeweb closed this Oct 13, 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.