peco / peco

Simplistic interactive filtering tool
MIT License
7.64k stars 230 forks source link

Linux build error/is Linux supported? #468

Open adamryczkowski opened 5 years ago

adamryczkowski commented 5 years ago

It is never mentioned in the README, that Linux is supported by peco. If it is not, then please add that information explicitly in the README and ignore the rest of the issue.

On Ubuntu 16.04 I downloaded the current state of the repo (c93f2e424e5b from Thu Oct 25 23:28:48: "Merge pull request #465 from peco/topic/issue-462"), entered there and typed make build. I have go version 1.6.2.

make build
Installing dependencies...
[WARN]  The name listed in the config file (github.com/peco/peco) does not match the current location (.)
[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Found desired version locally github.com/davecgh/go-spew d8f796af33cc11cb798c1aaeb27a4ebc5099927d!
[INFO]  --> Found desired version locally github.com/google/btree 4030bb1f1f0c35b30ca7009e9ebd06849dd45306!
[INFO]  --> Found desired version locally github.com/jessevdk/go-flags 9c49a3351d49777ccd40148b5cdf6f2998f51087!
[INFO]  --> Found desired version locally github.com/lestrrat-go/pdebug 39f9a71bcabe9432cbdfe4d3d33f41988acd2ce6!
[INFO]  --> Found desired version locally github.com/mattn/go-runewidth b20a3daf6a39840c202fd42cc23d53607162b045!
[INFO]  --> Found desired version locally github.com/nsf/termbox-go b66b20ab708e289ff1eb3e218478302e6aec28ce!
[INFO]  --> Found desired version locally github.com/pkg/errors 059132a15dd08d6704c67711dae0cf35ab991756!
[INFO]  --> Found desired version locally github.com/pmezard/go-difflib 792786c7400a136282c1664665ae0a8db921c6c2!
[INFO]  --> Found desired version locally github.com/stretchr/testify 04af85275a5c7ac09d16bb3b9b2e751ed45154e5!
[INFO]  Setting references.
[INFO]  --> Setting version for github.com/jessevdk/go-flags to 9c49a3351d49777ccd40148b5cdf6f2998f51087.
[INFO]  --> Setting version for github.com/lestrrat-go/pdebug to 39f9a71bcabe9432cbdfe4d3d33f41988acd2ce6.
[INFO]  --> Setting version for github.com/pkg/errors to 059132a15dd08d6704c67711dae0cf35ab991756.
[INFO]  --> Setting version for github.com/mattn/go-runewidth to b20a3daf6a39840c202fd42cc23d53607162b045.
[INFO]  --> Setting version for github.com/pmezard/go-difflib to 792786c7400a136282c1664665ae0a8db921c6c2.
[INFO]  --> Setting version for github.com/stretchr/testify to 04af85275a5c7ac09d16bb3b9b2e751ed45154e5.
[INFO]  --> Setting version for github.com/nsf/termbox-go to b66b20ab708e289ff1eb3e218478302e6aec28ce.
[INFO]  --> Setting version for github.com/davecgh/go-spew to d8f796af33cc11cb798c1aaeb27a4ebc5099927d.
[INFO]  --> Setting version for github.com/google/btree to 4030bb1f1f0c35b30ca7009e9ebd06849dd45306.
[INFO]  Exporting resolved dependencies...
[INFO]  --> Exporting github.com/lestrrat-go/pdebug
[INFO]  --> Exporting github.com/google/btree
[INFO]  --> Exporting github.com/davecgh/go-spew
[INFO]  --> Exporting github.com/jessevdk/go-flags
[INFO]  --> Exporting github.com/stretchr/testify
[INFO]  --> Exporting github.com/nsf/termbox-go
[INFO]  --> Exporting github.com/pkg/errors
[INFO]  --> Exporting github.com/mattn/go-runewidth
[INFO]  --> Exporting github.com/pmezard/go-difflib
[INFO]  Replacing existing vendor dependencies
go build -o releases/peco_linux_amd64/peco cmd/peco/peco.go
cmd/peco/peco.go:8:2: cannot find package "context" in any of:
    /usr/lib/go-1.6/src/context (from $GOROOT)
    /home/adam/go/src/context (from $GOPATH)
cmd/peco/peco.go:10:2: cannot find package "github.com/lestrrat-go/pdebug" in any of:
    /usr/lib/go-1.6/src/github.com/lestrrat-go/pdebug (from $GOROOT)
    /home/adam/go/src/github.com/lestrrat-go/pdebug (from $GOPATH)
cmd/peco/peco.go:11:2: cannot find package "github.com/peco/peco" in any of:
    /usr/lib/go-1.6/src/github.com/peco/peco (from $GOROOT)
    /home/adam/go/src/github.com/peco/peco (from $GOPATH)
cmd/peco/peco.go:12:2: cannot find package "github.com/peco/peco/internal/util" in any of:
    /usr/lib/go-1.6/src/github.com/peco/peco/internal/util (from $GOROOT)
    /home/adam/go/src/github.com/peco/peco/internal/util (from $GOPATH)
Makefile:84: recipe for target 'releases/peco_linux_amd64/peco' failed
make: *** [releases/peco_linux_amd64/peco] Error 1

Does anyone knows a solution to this error?

I need peco as a dependency of another project in Julia. I do not know go.

lestrrat commented 5 years ago

From the build log I can tell that you're using go1.6 which doesn't have context package. Use a newer version (current version is go1.11.2)

lestrrat commented 5 years ago

BTW, I don't recommend you build peco by yourself. This is meant to be used as a binary, and it's much safer to use the pre-built versions found in the releases or in homebrew or other sources.