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/compile: method redeclared: aws.Config.WithSleepDelay error message with go upstream but not go 1.6 #15545

Closed
laboger opened this issue May 4, 2016 · 6 comments
Milestone

Comments

@laboger
Copy link
Contributor

laboger commented May 4, 2016

Please answer these questions before submitting your issue. Thanks!

  1. What version of Go are you using (go version)?
    go version devel +43d2a10 Wed May 4 16:50:22 2016 +0000 linux/ppc64le
  2. What operating system and processor architecture are you using (go env)?
    Fails here but also other platforms, not just ppc64le (failed on amd64 too) with upstream go. Does not give error message with go1.6.2.
    go env
    GOARCH="ppc64le"
    GOBIN=""
    GOEXE=""
    GOHOSTARCH="ppc64le"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH="/home/boger/docker.test:/home/boger/docker.test/src/github.com/docker/docker/vendor"
    GORACE=""
    GOROOT="/home/boger/golang/upstream/go"
    GOTOOLDIR="/home/boger/golang/upstream/go/pkg/tool/linux_ppc64le"
    CC="gcc"
    GOGCCFLAGS="-fPIC -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build142829163=/tmp/go-build -gno-record-gcc-switches"
    CXX="g++"
    CGO_ENABLED="1"
  3. What did you do?
    If possible, provide a recipe for reproducing the error.
    A complete runnable program is good.
    A link on play.golang.org is best.
    This is a compile time error message when building Docker. It happens on upstream Docker, 1.10.3, and 1.11.1. I haven't tried others.
    You need the docker dependencies installed:
    libsqlite3-dev btrfs-tools libdevmapper-dev

Here are the steps I followed:
mkdir -p ~/docker.test/docker.test/src/github.com/docker
cd ~/docker.test/src/github.com/docker
git clone https://github.com/docker/docker.git
cd docker
(here you can switch to an older tag or just use what's here -- I used 1.10.3)
git checkout -b v1.10.3 v1.10.3
hack/make.sh dynbinary 2>&1 | tee build.log // You can use binary instead of dynbinary and it still fails

This error is generated during the build
....
//# github.com/aws/aws-sdk-go/service/cloudwatchlogs
vendor/src/github.com/aws/aws-sdk-go/service/cloudwatchlogs/service.go:7: method redeclared: aws.Config.WithSleepDelay
method(*aws.Config) func(func(time.Duration)) *aws.Config
method(*aws.Config) func(func(time.Duration)) *<T>

once complete, you can go to this directory and reproduce the error with this command:
cd vendor/src/github.com/aws/aws-sdk-go/service/cloudwatchlogs/
go build service.go
//# command-line-arguments
./service.go:7: method redeclared: aws.Config.WithSleepDelay
method(*aws.Config) func(func(time.Duration)) *aws.Config
method(*aws.Config) func(func(time.Duration)) *<T>

  1. What did you expect to see?
    No error messages, as happens when built with go1.6
  2. What did you see instead?
    The above error messages
@josharian josharian added this to the Go1.7 milestone May 4, 2016
@sctb
Copy link
Contributor

sctb commented May 5, 2016

It looks like this was introduced by gri's export format change: 7538b1d. This command succeeds: go build -gcflags="-newexport=0" service.go.

@griesemer griesemer self-assigned this May 5, 2016
@griesemer
Copy link
Contributor

Yes, this clearly related to the import/export format change. On it.

@griesemer
Copy link
Contributor

FYI: You should be able to work around this with go build -gcflags="-newexport=0" <other args> for now. If that alone doesn't work, build the std lib also with GO_GCFLAGS="-newexport=0". This gives you all the new 1.7 code but for the new export format.

@griesemer
Copy link
Contributor

@laboger I've fixed several bugs related to import/export - could you please confirm/deny if your problem disappeared with the latest version on tip? (I made a brief attempt to recreate your scenario but failed - either I made a mistake or perhaps there's stuff missing in the description). Thanks.

@laboger
Copy link
Contributor Author

laboger commented May 9, 2016

@griesemer Yes I was able to successfully build Docker from both v1.10.3 and upstream latest using a golang built from latest version on tip from today. So I believe one of the bugs you fixed have resolved the problem in this issue.

@griesemer
Copy link
Contributor

@laboger Great! Thanks for confirming. Will close.

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

5 participants