danlamanna / rivet

a tiny cli for syncing a directory with a girder instance
Apache License 2.0
6 stars 1 forks source link

build fails with `undefined: os.UserHomeDir` #10

Closed yarikoptic closed 4 years ago

yarikoptic commented 4 years ago

succesfully built on my laptop, but when try to build on another box (debian buster) - fails :-/

(git)smaug:~/proj/dandi/3rd-party/rivet[master]
$> make build
building rivet 0.0.4
GOPATH=/home/yoh/gocode
mkdir -p bin
GOOS=darwin GOARCH=amd64 go build \
                -ldflags "-X github.com/danlamanna/rivet/version.GitCommit=1dcda68028d5d42a2b146bcd630bf7d3714ebe14 -X github.com/danlamanna/rivet/version.BuildDate=2020-02-21-16:30:45" \
          -gcflags "all=-trimpath=/home/yoh/gocode" \
    -o bin/rivet-darwin
go: finding github.com/hashicorp/go-retryablehttp v0.6.0
go: finding github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4
go: finding github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
go: finding github.com/burntsushi/toml v0.3.1
go: finding github.com/hashicorp/go-version v1.2.0
go: finding github.com/sirupsen/logrus v1.4.2
go: finding github.com/hashicorp/go-cleanhttp v0.5.0
go: finding github.com/hashicorp/go-hclog v0.9.2
go: finding github.com/pmezard/go-difflib v1.0.0
go: finding github.com/stretchr/objx v0.1.1
go: finding github.com/davecgh/go-spew v1.1.1
go: finding github.com/konsorten/go-windows-terminal-sequences v1.0.1
go: finding github.com/stretchr/testify v1.2.2
go: finding gopkg.in/alecthomas/kingpin.v2 v2.2.6
go: finding golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: downloading github.com/sirupsen/logrus v1.4.2
go: downloading gopkg.in/alecthomas/kingpin.v2 v2.2.6
go: downloading github.com/burntsushi/toml v0.3.1
go: downloading github.com/hashicorp/go-version v1.2.0
go: downloading github.com/hashicorp/go-retryablehttp v0.6.0
go: downloading github.com/hashicorp/go-hclog v0.9.2
go: downloading github.com/hashicorp/go-cleanhttp v0.5.0
go: downloading github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751
go: downloading github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4
go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
# github.com/danlamanna/rivet/config
config/config.go:27:18: undefined: os.UserHomeDir
config/config.go:56:18: undefined: os.UserHomeDir
note: module requires Go 1.12make: *** [Makefile:25: build] Error 2
make build  28.66s user 3.25s system 253% cpu 12.601 total 

any advice would be welcome ;)

danlamanna commented 4 years ago

note: module requires Go 1.12

os.UserHomeDir was added in Go 1.12 (https://golang.org/doc/go1.12#os) and you're trying to build against an older version of Go.

Is there a reason you're trying to compile it manually? You should be able to download the binaries from the releases tab.

yarikoptic commented 4 years ago

Thank you! Why: habit/practice/gives reasons to get in touch ;-)