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

Golang build problem under Ubuntu 20.004/go 1.15 #249

Closed
billiamx33 opened this issue Oct 19, 2020 · 3 comments
Closed

Golang build problem under Ubuntu 20.004/go 1.15 #249

billiamx33 opened this issue Oct 19, 2020 · 3 comments

Comments

@billiamx33
Copy link

$ go get github.com/coreos/bbolt
go: github.com/coreos/bbolt upgrade => v1.3.5
go get: github.com/coreos/bbolt@v1.3.5: parsing go.mod:
module declares its path as: go.etcd.io/bbolt
but was required as: github.com/coreos/bbolt

Also a build of "github.com/etcd-io/etcd" fails similarly:

// in mycode.go :
import (
"fmt"
"github.com/etcd-io/etcd"
"github.com/thatisuday/commando"
)

$ go build mycode.go
......
go: found github.com/google/btree in github.com/google/btree v1.0.0
go: found github.com/coreos/bbolt in github.com/coreos/bbolt v1.3.5
go: found github.com/golang/groupcache/lru in github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: github.com/thatisuday/tree imports
github.com/etcd-io/etcd imports
github.com/coreos/etcd/etcdmain imports
github.com/coreos/etcd/etcdserver imports
github.com/coreos/etcd/mvcc/backend imports
github.com/coreos/bbolt: github.com/coreos/bbolt@v1.3.5: parsing go.mod:
module declares its path as: go.etcd.io/bbolt
but was required as: github.com/coreos/bbolt
.....

Now I can execute : go get go.etcd.io/bbolt, but nothing seems to resolve to this module.

How do I resolve this?

@ptabor
Copy link
Contributor

ptabor commented Oct 21, 2020

Supported path to import bolt is go get go.etcd.io/bbolt

@billiamx33
Copy link
Author

billiamx33 commented Oct 21, 2020

Ptabor -

You are absolutely correct that "go get go.etcd.io/bbolt" will retrieve the bbold module library.

Hovever, that is not the problem.

I am using the modules feature with go. The module retrieval chain from the "go build" call is failing.
I can manually retrieve bbolt all day long, but the retrieval of it when go.etcd.io/etcd is declared is broken.
I am trying to figure out if there is any workaround. That is what I need to somehow make function.

Any thoughts on that?

In go.mod:

module github.com/ws/Etcd

go 1.15

require (
go.etcd.io/bbolt v1.3.5
go.etcd.io/etcd v3.3.25+incompatible
)

In my Go source code:

package main

import (
"fmt"
"go.etcd.io/etcd"
"strings"
"os"
)

$ go build

go: finding module for package github.com/coreos/etcd/etcdmain
go: found github.com/coreos/etcd/etcdmain in github.com/coreos/etcd v3.3.25+incompatible
.....
go: found github.com/dgrijalva/jwt-go in github.com/dgrijalva/jwt-go v3.2.0+incompatible
go: found github.com/google/btree in github.com/google/btree v1.0.0
go: found github.com/coreos/bbolt in github.com/coreos/bbolt v1.3.5
go: found github.com/golang/groupcache/lru in github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e
go: github.com/ws/ccsmgr imports
go.etcd.io/etcd imports
github.com/coreos/etcd/etcdmain imports
github.com/coreos/etcd/etcdserver imports
github.com/coreos/etcd/mvcc/backend imports
github.com/coreos/bbolt: github.com/coreos/bbolt@v1.3.5: parsing go.mod:
module declares its path as: go.etcd.io/bbolt

@ptabor
Copy link
Contributor

ptabor commented Oct 21, 2020 via email

@ptabor ptabor closed this as completed Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants