optiopay / klar

Integration of Clair and Docker Registry
MIT License
506 stars 140 forks source link

Build broken #159

Closed faust64 closed 4 years ago

faust64 commented 4 years ago

Trying to re-build some Docker image of mine, I'm just noticing klar no longer builds.

+ go get github.com/optiopay/klar
package github.com/quay/clair/v3/pkg/commonerr: cannot find package "github.com/quay/clair/v3/pkg/commonerr" in any of:
    /usr/local/go/src/github.com/quay/clair/v3/pkg/commonerr (from $GOROOT)
    /go/src/github.com/quay/clair/v3/pkg/commonerr (from $GOPATH)
package github.com/quay/clair/v3/pkg/pagination: cannot find package "github.com/quay/clair/v3/pkg/pagination" in any of:
    /usr/local/go/src/github.com/quay/clair/v3/pkg/pagination (from $GOROOT)
    /go/src/github.com/quay/clair/v3/pkg/pagination (from $GOPATH)
package math/bits: unrecognized import path "math/bits" (import path does not begin with hostname)

Though I suspect something's broken in clair right now, I can't even go get it, ... not enough familiar with go to really understand what's going on. Who's including that math/bits?

Maybe you'll figure it out?

annieweng commented 4 years ago

had same problem, update your go version. you need at least go >= 1.9 (which introduced math/bits)

faust64 commented 4 years ago

Indeed, I was still using some golang:1.8. Switching to 1.9 does fix. Thanks!