dendrite icon indicating copy to clipboard operation
dendrite copied to clipboard

bzr is needed as a dependency to build Dendrite with build.sh but it is not documented

Open nicobao opened this issue 3 years ago • 7 comments
trafficstars

Background information

  • Dendrite version or git SHA: 16035b97
  • Monolith or Polylith?: building
  • SQLite3 or Postgres?: N/A
  • Running in Docker?: N/A
  • go version: 1.16.13

Description

On running ./build.sh, I get the error:

get "launchpad.net/gocheck": found meta tag vcs.metaImport{Prefix:"launchpad.net/gocheck", VCS:"bzr", RepoRoot:"https://launchpad.net/~niemeyer/gocheck/trunk"} at //launchpad.net/gocheck?go-get=1
get "launchpad.net/xmlpath": found meta tag vcs.metaImport{Prefix:"launchpad.net/xmlpath", VCS:"bzr", RepoRoot:"https://launchpad.net/~niemeyer/xmlpath/trunk"} at //launchpad.net/xmlpath?go-get=1
go: github.com/juju/[email protected] requires
	github.com/juju/utils/[email protected] requires
	launchpad.net/[email protected]: unrecognized import path "launchpad.net/gocheck": GOVCS disallows using bzr for public launchpad.net/gocheck; see 'go help vcs'

It happens because this juju dependency relies on the bzr VCS tool: http://wiki.bazaar.canonical.com and I didn't have bzr installed on my computer.

Steps to reproduce

  • clone the repository
  • install go
  • do not have bzr installed, just git
  • run ./build.sh

I'd have expected either that the README mention this bzr dependency, which isn't an usual VCS tool to have installed on one's computer OR that the build.sh script downloads it for me.

I suggest that we keep it simple and add a mention of this dependency on the README file. I am not familiar much with the go ecosystem so it took me some time to figure it out, which I suppose would happen for other newcomers.

nicobao avatar Jan 16 '22 21:01 nicobao

weird, on my debian-based box, I use build.sh all the time and I don't have bzr installed for sure.

spaetz avatar Jan 17 '22 10:01 spaetz

Does it install github.com/juju/testing as well? If yes, does it use bzr? I use Fedora 34 (no virtual machine).

nicobao avatar Jan 17 '22 20:01 nicobao

@nicobao please can you tell me the output to go env. I'm particularly interested in GOVCS.

kegsay avatar Jan 19 '22 10:01 kegsay

get "gopkg.in/resty.v1": found meta tag vcs.metaImport{Prefix:"gopkg.in/resty.v1", VCS:"git", RepoRoot:"https://gopkg.in/resty.v1"} at //gopkg.in/resty.v1?go-get=1
go: github.com/juju/[email protected] requires
	github.com/juju/utils/[email protected] requires
	launchpad.net/[email protected]: unrecognized import path "launchpad.net/gocheck": GOVCS disallows using bzr for public launchpad.net/gocheck; see 'go help vcs'
nicolas@localhost:~/nicobao/dendrite$ go env | grep GOVCS
GOVCS=""
nicolas@localhost:~/nicobao/dendrite$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/nicolas/.cache/go-build"
GOENV="/home/nicolas/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GOMODCACHE="/home/nicolas/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/nicolas/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/usr/lib/golang"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_amd64"
GOVCS=""
GOVERSION="go1.16.13"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/nicolas/nicobao/dendrite/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build2435192556=/tmp/go-build -gno-record-gcc-switches"

nicobao avatar Jan 21 '22 19:01 nicobao

For info I had installed golang on Fedora using dnf. I suspect my error was because of that installation because I had problems with another project that was fixed when uninstalling the golang package, and installing golang again using the normal curl method. I will try again with the fresh installation and let you know.

nicobao avatar Feb 17 '22 13:02 nicobao

on fedora, i had to install the breezy package (fork of bazaar), then run GOVCS='*:all' ./build.sh

RayyanAnsari avatar Feb 20 '22 13:02 RayyanAnsari

If you are using a GOPROXY then the actual VCS tools are often not needed since the proxy will take care of it for us. That said, we do have a really messy dependency graph right now (in part due to the P2P demos and the upgrade tests) so we should do something about that.

neilalexander avatar Apr 08 '22 10:04 neilalexander

Closing as won't fix effectively, this is a weird Go quirk with the OPs distro.

kegsay avatar Dec 06 '22 12:12 kegsay