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: vendoring doesn't work in gcc 6.1 #15628
Comments
FWIW, I think this might be quite easy to fix: when compiling package p from GOPATH component q, pass -I q/pkg_GOOS_GOARCH_gccgo/vendor/ to gccgo, if it exists. (Or maybe it needs to be more complicated than this, I don't really know how vendoring is implemented) |
@mwhudson It should be. We have the same issue and work around it by using a manual shell script that adds vendor directory to the include path set. |
This continues to fail with the upgrade in gcc trunk to Go 1.7. |
For anyone interested, we have added a dodgy workaround by setting
I haven't had the patience to make a more general solution, but this one works OK for a single project. |
Continues to fail with the upgrade in gcc trunk to go1.8rc3 (gcc-mirror/gcc@905e044). |
Use a workaround from golang/go#15628 for issues with newer-style vendoring in gcc-go. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Use a workaround from golang/go#15628 for issues with newer-style vendoring in gcc-go. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Use a workaround from golang/go#15628 for issues with newer-style vendoring in gcc-go. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
Use a workaround from golang/go#15628 for issues with newer-style vendoring in gcc-go. Travis's trusty images have gcc-go 4.9, which implements Go 1.2, so it's missing sync.Pool (introduced in 1.3), so we can't enable the test there. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
I have submitted this CL for gccgo (gofrontend) to fix this problem. https://go-review.googlesource.com/c/39590/. Once it is approved I will submit the corresponding change to golang so it will work the same when using the option -compiler gccgo. It fixes the example posted above. |
CL https://golang.org/cl/39590 mentions this issue. |
cmd/go: generate vendor paths for -I arg on compile This change generates the vendor path to be used with -I on a gccgo compile to find imports from the vendor directories. Fixes golang/go#15628 Reviewed-on: https://go-review.googlesource.com/39590 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@246864 138bc75d-0d04-0410-961f-82ee72b054a4
CL https://golang.org/cl/40432 mentions this issue. |
Curently the vendor paths are not always searched for imports if the compiler is gccgo. This change generates the vendor paths and adds them with -I as arguments to the gccgo compile. Fixes #15628 Change-Id: I318accbbbd8e6af45475eda399377455a3565880 Reviewed-on: https://go-review.googlesource.com/40432 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Curently the vendor paths are not always searched for imports if the compiler is gccgo. This change generates the vendor paths and adds them with -I as arguments to the gccgo compile. Fixes golang#15628 Change-Id: I318accbbbd8e6af45475eda399377455a3565880 Reviewed-on: https://go-review.googlesource.com/40432 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.6.1 gccgo (GCC) 6.1.1 20160501 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/urandom/.go"
GORACE=""
GOROOT="/usr"
GOTOOLDIR="/usr/lib/gcc/x86_64-pc-linux-gnu/6.1.1"
GO15VENDOREXPERIMENT="1"
CC="/usr/bin/gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="/usr/bin/g++"
CGO_ENABLED="1"
What did you do?
go get -u github.com/hashicorp/consul
What did you expect to see?
No errors
What did you see instead?
github.com/hashicorp/consul/vendor/github.com/armon/go-metrics/datadog
github.com/hashicorp/consul/vendor/github.com/armon/go-metrics/datadog/dogstatsd.go:7:38: error: import file ‘github.com/DataDog/datadog-go/statsd’ not found
"github.com/DataDog/datadog-go/statsd"
And many more after that
The text was updated successfully, but these errors were encountered: