-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Closed
Copy link
Labels
FrozenDueToAgeGoCommandcmd/gocmd/goNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wanted
Milestone
Description
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
Does this issue reproduce with the latest release?
I'm using gccgo-9
, which I think is the latest release.
What operating system and processor architecture are you using (go env
)?
go env
Output
$ go env GOARCH="amd64" GOBIN="" GOCACHE="/home/apollo/.gocache" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/apollo/Development/weird-gopath" GOPROXY="" GORACE="" GOROOT="/usr" GOTMPDIR="" GOTOOLDIR="/usr/lib/gcc/x86_64-linux-gnu/9" GCCGO="/usr/bin/x86_64-linux-gnu-gccgo-9" CC="x86_64-linux-gnu-gcc-9" CXX="x86_64-linux-gnu-g++-9" 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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build492198966=/tmp/go-build -gno-record-gcc-switches -funwind-tables"
What did you do?
Code: https://play.golang.org/p/CwSEukNuiAg
// main.go
package main
import "fmt"
import "golang.org/x/tools/container/intsets"
func main() {
var foo intsets.Sparse
fmt.Println(foo)
}
Building with regular go works:
> go version
go version go1.12.2 linux/amd64
> CGO_ENABLED=1 go build -v -i -o foo
> ./foo
{{0 [0 0 0 0] <nil> <nil>}}
while building with gccgo fails:
> go version
go version go1.12.2 gccgo (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008 linux/amd64
> CGO_ENABLED=1 go build -v -i -o foo
github.com/paleozogt/golangtoolstest
# github.com/paleozogt/golangtoolstest
/usr/bin/ld: /home/apollo/Development/weird-gopath/pkg/gccgo_linux_amd64/golang.org/x/tools/container/libintsets.a(_go_.o): in function `golang.org..z2fx..z2ftools..z2fcontainer..z2fintsets.block.len':
/home/apollo/Development/weird-gopath/src/golang.org/x/tools/container/intsets/sparse.go:137: undefined reference to `golang.org..z2fx..z2ftools..z2fcontainer..z2fintsets.popcount'
/usr/bin/ld: /home/apollo/Development/weird-gopath/pkg/gccgo_linux_amd64/golang.org/x/tools/container/libintsets.a(_go_.o): in function `intsets.nlz':
/home/apollo/Development/weird-gopath/src/golang.org/x/tools/container/intsets/util.go:51: undefined reference to `golang.org..z2fx..z2ftools..z2fcontainer..z2fintsets.popcount'
collect2: error: ld returned 1 exit status
What did you expect to see?
Build success.
What did you see instead?
Build failure.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeGoCommandcmd/gocmd/goNeedsFixThe path to resolution is known, but the work has not been done.The path to resolution is known, but the work has not been done.help wanted