github / smimesign

An S/MIME signing utility for use with Git
MIT License
587 stars 133 forks source link

Build failure when upgrade to `v0.0.13` #57

Closed chenrui333 closed 5 years ago

chenrui333 commented 5 years ago

relates to https://github.com/Homebrew/homebrew-core/pull/39770

failure log

==> go build -o /usr/local/Cellar/smimesign/0.0.13/bin/smimesign -ldflags -X main.versionString=0.0.13
command_verify.go:11:2: cannot find package "github.com/certifi/gocertifi" in any of:
    /usr/local/Cellar/go/1.12.5/libexec/src/github.com/certifi/gocertifi (from $GOROOT)
    /private/tmp/smimesign-20190513-77950-ig2itw/smimesign-0.0.13/src/github.com/certifi/gocertifi (from $GOPATH)
command_sign.go:12:2: cannot find package "github.com/mastahyeti/certstore" in any of:
    /usr/local/Cellar/go/1.12.5/libexec/src/github.com/mastahyeti/certstore (from $GOROOT)
    /private/tmp/smimesign-20190513-77950-ig2itw/smimesign-0.0.13/src/github.com/mastahyeti/certstore (from $GOPATH)
command_sign.go:13:2: cannot find package "github.com/mastahyeti/cms" in any of:
    /usr/local/Cellar/go/1.12.5/libexec/src/github.com/mastahyeti/cms (from $GOROOT)
    /private/tmp/smimesign-20190513-77950-ig2itw/smimesign-0.0.13/src/github.com/mastahyeti/cms (from $GOPATH)
main.go:11:2: cannot find package "github.com/pborman/getopt/v2" in any of:
    /usr/local/Cellar/go/1.12.5/libexec/src/github.com/pborman/getopt/v2 (from $GOROOT)
    /private/tmp/smimesign-20190513-77950-ig2itw/smimesign-0.0.13/src/github.com/pborman/getopt/v2 (from $GOPATH)
command_sign.go:14:2: cannot find package "github.com/pkg/errors" in any of:
    /usr/local/Cellar/go/1.12.5/libexec/src/github.com/pkg/errors (from $GOROOT)
    /private/tmp/smimesign-20190513-77950-ig2itw/smimesign-0.0.13/src/github.com/pkg/errors (from $GOPATH)
status.go:11:2: cannot find package "golang.org/x/crypto/openpgp/packet" in any of:
    /usr/local/Cellar/go/1.12.5/libexec/src/golang.org/x/crypto/openpgp/packet (from $GOROOT)
    /private/tmp/smimesign-20190513-77950-ig2itw/smimesign-0.0.13/src/golang.org/x/crypto/openpgp/packet (from $GOPATH)
status.go:12:2: cannot find package "golang.org/x/crypto/openpgp/s2k" in any of:
    /usr/local/Cellar/go/1.12.5/libexec/src/golang.org/x/crypto/openpgp/s2k (from $GOROOT)
    /private/tmp/smimesign-20190513-77950-ig2itw/smimesign-0.0.13/src/golang.org/x/crypto/openpgp/s2k (from $GOPATH)

failed build, https://jenkins.brew.sh/job/Homebrew%20Core%20Pull%20Requests/41860/version=mojave/console

btoews commented 5 years ago

What version of Go?

chenrui333 commented 5 years ago

Which version does it require? I did not see the version in the console log.

chenrui333 commented 5 years ago

I think it used go-1.12.5 as I did test locally.

btoews commented 5 years ago

Try with the GO111MODULE=on environment variable set.

chenrui333 commented 5 years ago

you are absolutely right, that is the root cause! 😄

Thanks for the help!