solus-project / solbuild

The Solus package build system

Home Page:https://solus-project.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Building from source

ericp1337 opened this issue · comments

Is there something I'm missing when building from source? Because I've tried building both from master branch and using the tarball from the releases page. But, I still cannot get it to build the project.

Here is the output I am getting when running make from the release tarball:

GOPATH=/mnt/DATA/solbuild-1.3.3 go install -v solbuild
src/builder/users.go:20:2: cannot find package "bufio" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/bufio (vendor tree)
	/home/eric/go/src/bufio (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/bufio (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/entry.go:4:2: cannot find package "bytes" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/bytes (vendor tree)
	/home/eric/go/src/bytes (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/bytes (from $GOPATH)
src/builder/source/simple.go:20:2: cannot find package "crypto/sha1" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/crypto/sha1 (vendor tree)
	/home/eric/go/src/crypto/sha1 (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/crypto/sha1 (from $GOPATH)
src/builder/source/simple.go:21:2: cannot find package "crypto/sha256" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/crypto/sha256 (vendor tree)
	/home/eric/go/src/crypto/sha256 (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/crypto/sha256 (from $GOPATH)
src/vendor/github.com/libgit2/git2go/remote.go:12:2: cannot find package "crypto/x509" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/github.com/libgit2/git2go/vendor/crypto/x509 (vendor tree)
	/mnt/DATA/solbuild-1.3.3/src/vendor/crypto/x509
	/home/eric/go/src/crypto/x509 (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/crypto/x509 (from $GOPATH)
src/vendor/github.com/BurntSushi/toml/encoding_types.go:10:2: cannot find package "encoding" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/encoding (vendor tree)
	/home/eric/go/src/encoding (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/encoding (from $GOPATH)
src/vendor/github.com/go-yaml/yaml/decode.go:5:2: cannot find package "encoding/base64" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/encoding/base64 (vendor tree)
	/home/eric/go/src/encoding/base64 (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/encoding/base64 (from $GOPATH)
src/vendor/github.com/spf13/pflag/string_slice.go:5:2: cannot find package "encoding/csv" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/encoding/csv (vendor tree)
	/home/eric/go/src/encoding/csv (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/encoding/csv (from $GOPATH)
src/builder/source/simple.go:22:2: cannot find package "encoding/hex" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/encoding/hex (vendor tree)
	/home/eric/go/src/encoding/hex (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/encoding/hex (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/json_formatter.go:4:2: cannot find package "encoding/json" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/encoding/json (vendor tree)
	/home/eric/go/src/encoding/json (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/encoding/json (from $GOPATH)
src/builder/history.go:20:2: cannot find package "encoding/xml" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/encoding/xml (vendor tree)
	/home/eric/go/src/encoding/xml (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/encoding/xml (from $GOPATH)
src/builder/source/git.go:20:2: cannot find package "errors" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/errors (vendor tree)
	/home/eric/go/src/errors (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/errors (from $GOPATH)
src/vendor/github.com/spf13/pflag/golangflag.go:8:2: cannot find package "flag" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/flag (vendor tree)
	/home/eric/go/src/flag (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/flag (from $GOPATH)
src/builder/source/git.go:21:2: cannot find package "fmt" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/fmt (vendor tree)
	/home/eric/go/src/fmt (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/fmt (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/exported.go:4:2: cannot find package "io" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/io (vendor tree)
	/home/eric/go/src/io (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/io (from $GOPATH)
src/builder/source/simple.go:27:2: cannot find package "io/ioutil" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/io/ioutil (vendor tree)
	/home/eric/go/src/io/ioutil (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/io/ioutil (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/logrus.go:5:2: cannot find package "log" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/log (vendor tree)
	/home/eric/go/src/log (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/log (from $GOPATH)
src/vendor/github.com/cheggaaa/pb/pb.go:7:2: cannot find package "math" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/math (vendor tree)
	/home/eric/go/src/math (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/math (from $GOPATH)
src/vendor/github.com/andelf/go-curl/easy.go:67:2: cannot find package "mime" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/mime (vendor tree)
	/home/eric/go/src/mime (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/mime (from $GOPATH)
src/vendor/github.com/spf13/pflag/ip.go:5:2: cannot find package "net" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/net (vendor tree)
	/home/eric/go/src/net (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/net (from $GOPATH)
src/builder/source/git.go:25:2: cannot find package "net/url" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/net/url (vendor tree)
	/home/eric/go/src/net/url (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/net/url (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/alt_exit.go:27:2: cannot find package "os" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/os (vendor tree)
	/home/eric/go/src/os (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/os (from $GOPATH)
src/vendor/github.com/solus-project/libosdev/commands/main.go:24:2: cannot find package "os/exec" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/os/exec (vendor tree)
	/home/eric/go/src/os/exec (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/os/exec (from $GOPATH)
src/vendor/github.com/cheggaaa/pb/pb_x.go:10:2: cannot find package "os/signal" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/os/signal (vendor tree)
	/home/eric/go/src/os/signal (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/os/signal (from $GOPATH)
src/builder/userinfo.go:24:2: cannot find package "os/user" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/os/user (vendor tree)
	/home/eric/go/src/os/user (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/os/user (from $GOPATH)
src/vendor/github.com/andelf/go-curl/easy.go:68:2: cannot find package "path" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/path (vendor tree)
	/home/eric/go/src/path (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/path (from $GOPATH)
src/builder/source/git.go:27:2: cannot find package "path/filepath" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/path/filepath (vendor tree)
	/home/eric/go/src/path/filepath (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/path/filepath (from $GOPATH)
src/vendor/github.com/libgit2/git2go/blob.go:13:2: cannot find package "reflect" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/github.com/libgit2/git2go/vendor/reflect (vendor tree)
	/mnt/DATA/solbuild-1.3.3/src/vendor/reflect
	/home/eric/go/src/reflect (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/reflect (from $GOPATH)
src/vendor/github.com/mattn/go-runewidth/runewidth_posix.go:7:2: cannot find package "regexp" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/regexp (vendor tree)
	/home/eric/go/src/regexp (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/regexp (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/writer.go:6:2: cannot find package "runtime" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/runtime (vendor tree)
	/home/eric/go/src/runtime (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/runtime (from $GOPATH)
package solbuild
	imports builder
	imports builder/source
	imports github.com/andelf/go-curl
	imports runtime/cgo: cannot find package "runtime/cgo" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/runtime/cgo (vendor tree)
	/home/eric/go/src/runtime/cgo (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/runtime/cgo (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/text_formatter.go:6:2: cannot find package "sort" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/sort (vendor tree)
	/home/eric/go/src/sort (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/sort (from $GOPATH)
src/vendor/github.com/BurntSushi/toml/encode.go:10:2: cannot find package "strconv" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/strconv (vendor tree)
	/home/eric/go/src/strconv (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/strconv (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/logrus.go:6:2: cannot find package "strings" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/strings (vendor tree)
	/home/eric/go/src/strings (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/strings (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/entry.go:7:2: cannot find package "sync" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/sync (vendor tree)
	/home/eric/go/src/sync (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/sync (from $GOPATH)
src/vendor/github.com/cheggaaa/pb/pb.go:10:2: cannot find package "sync/atomic" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/sync/atomic (vendor tree)
	/home/eric/go/src/sync/atomic (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/sync/atomic (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/terminal_linux.go:10:8: cannot find package "syscall" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/syscall (vendor tree)
	/home/eric/go/src/syscall (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/syscall (from $GOPATH)
src/vendor/github.com/spf13/cobra/cobra.go:25:2: cannot find package "text/template" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/text/template (vendor tree)
	/home/eric/go/src/text/template (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/text/template (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/entry.go:8:2: cannot find package "time" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/time (vendor tree)
	/home/eric/go/src/time (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/time (from $GOPATH)
src/vendor/github.com/BurntSushi/toml/lex.go:6:2: cannot find package "unicode" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/unicode (vendor tree)
	/home/eric/go/src/unicode (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/unicode (from $GOPATH)
src/vendor/github.com/cheggaaa/pb/pb.go:12:2: cannot find package "unicode/utf8" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/unicode/utf8 (vendor tree)
	/home/eric/go/src/unicode/utf8 (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/unicode/utf8 (from $GOPATH)
src/vendor/github.com/Sirupsen/logrus/terminal_notwindows.go:15:2: cannot find package "unsafe" in any of:
	/mnt/DATA/solbuild-1.3.3/src/vendor/unsafe (vendor tree)
	/home/eric/go/src/unsafe (from $GOROOT)
	/mnt/DATA/solbuild-1.3.3/src/unsafe (from $GOPATH)
make: *** [Makefile.gobuild:5: solbuild.statbin] Error 1

Setting GOROOT seems to fix the dependency errors.

Currently trying to compile under Ubuntu but not having much luck.

eric@web:~/solbuild-1.3.3$ make
GOPATH=/home/eric/solbuild-1.3.3 go install -v solbuild
vendor/github.com/libgit2/git2go
# vendor/github.com/libgit2/git2go
could not determine kind of name for C.git_blob_create_fromstream
could not determine kind of name for C.git_blob_create_fromstream_commit
Makefile.gobuild:5: recipe for target 'solbuild.statbin' failed
make: *** [solbuild.statbin] Error 2

Closing this since I figured out my root problem and upon further research this appears to be an issue with the upstream git2go library.

Actually looks more like you didn't use the release tarball but instead used the autogenerated tarball, initially. As for the git2go version, the vendored library matches the host version of libgit2

i.e. nuking our vendored git2go and using one matching your host should be sufficient to build on other systems