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

gccgo: runtime/trace not available in gcc-6.1.0 #15544

Closed
tamird opened this issue May 4, 2016 · 5 comments
Closed

gccgo: runtime/trace not available in gcc-6.1.0 #15544

tamird opened this issue May 4, 2016 · 5 comments
Milestone

Comments

@tamird
Copy link
Contributor

tamird commented May 4, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
$ gccgo go version
go version go1.6.1 gccgo (GCC) 6.1.0 linux/amd64
  1. What operating system and processor architecture are you using (go env)?
$ gccgo go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/tamird/src/go"
GORACE=""
GOROOT="/opt/gccgo"
GOTOOLDIR="/opt/gccgo/libexec/gcc/x86_64-pc-linux-gnu/6.1.0"
GO15VENDOREXPERIMENT="1"
CC="/opt/gccgo/bin/gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="/opt/gccgo/bin/g++"
CGO_ENABLED="1"
  1. What did you do?
$ cat main.go
package main

import _ "runtime/trace"

func main() {
fmt.Println("hello world")
}
$ gccgo go run main.go
  1. What did you expect to see?
hello world
  1. What did you see instead?
main.go:3:8: cannot find package "runtime/trace" in any of:
    /opt/gccgo/src/runtime/trace (from $GOROOT)
    /home/tamird/src/go/src/runtime/trace (from $GOPATH)
@tamird
Copy link
Contributor Author

tamird commented Aug 13, 2016

@ianlancetaylor triage ping. This also affects gcc mainline.

@ianlancetaylor
Copy link
Contributor

This is going to require updating the gccgo runtime package to 1.7. I've started working on it but it will take a while. It's definitely not going to happen for GCC 6.

@ianlancetaylor ianlancetaylor modified the milestones: Gccgo, Unplanned Aug 13, 2016
@gopherbot
Copy link

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

gopherbot pushed a commit to golang/tools that referenced this issue Aug 13, 2016
Moves runtime/trace support (including its command line flag) behind
a "gc" build tag to allow goimports to build under gccgo, which does
not support runtime/trace.

Updates golang/go#15544.

Change-Id: I017a44089c0a4f3d3ba98815d57a141e25b3fe56
Reviewed-on: https://go-review.googlesource.com/26998
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
@tamird
Copy link
Contributor Author

tamird commented Jan 31, 2018

@ianlancetaylor looks like this was initially done in golang/gofrontend@9401e71#diff-2eab022867c5cfa1e28487d9bf4b836f?

@ianlancetaylor
Copy link
Contributor

Yes, current gccgo has the runtime/trace package.

@golang golang locked and limited conversation to collaborators Jan 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants