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/go: No support for vendoring with gccgo toolchain. #15814

Closed
mwhudson opened this issue May 24, 2016 · 2 comments
Closed

cmd/go: No support for vendoring with gccgo toolchain. #15814

mwhudson opened this issue May 24, 2016 · 2 comments

Comments

@mwhudson
Copy link
Contributor

Please answer these questions before submitting your issue. Thanks!

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

go version devel +ebbe4f8 Wed May 18 21:20:33 2016 +0000 linux/amd64

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

Irrelevant.

  1. What did you do?
$ cat $GOPATH/src/vendor/bar/bar.go
package bar

var World = "world"
$ cat $GOPATH/src/foo/foo.go
package main

import (
    "fmt"

    "bar"
)

func main () {
    fmt.Println("Hello", bar.World)
}
$ go build -compiler gccgo foo
  1. What did you expect to see?

Nothing, and an executable 'foo' created.

  1. What did you see instead?
$ go build -compiler gccgo foo
# foo
src/foo/foo.go:6:5: error: import file ‘bar’ not found
  "bar"
     ^
src/foo/foo.go:10:23: error: reference to undefined name ‘bar’
  fmt.Println("Hello", bar.World)
                       ^

This isn't that serious as I mostly use gccgo for packaging purposes and most packages are not built with bundled dependencies, but it's caused one package build failure I know about (https://launchpad.net/ubuntu/+source/docker-registry/2.3.1~ds2-1/+build/9640391).

@urandom
Copy link

urandom commented May 25, 2016

Perhaps this is related to #15628

@mwhudson
Copy link
Contributor Author

Oh yes, that's the same bug. Thought I searched first, apparently not!

@golang golang locked and limited conversation to collaborators May 25, 2017
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

3 participants