bimg: vendor/github.com/h2non/bimg/image.go:15: undefined: Options

Hi, I have a problème with go build

go v1.8 macOS 10.12.4

vendor/github.com/h2non/bimg/image.go:15: undefined: Options
vendor/github.com/h2non/bimg/image.go:25: undefined: Options
vendor/github.com/h2non/bimg/image.go:82: undefined: Gravity
vendor/github.com/h2non/bimg/image.go:122: undefined: Watermark
vendor/github.com/h2non/bimg/image.go:135: undefined: Angle
vendor/github.com/h2non/bimg/image.go:159: undefined: Interpretation
vendor/github.com/h2non/bimg/image.go:167: undefined: Options
vendor/github.com/h2non/bimg/image.go:177: undefined: ImageMetadata
vendor/github.com/h2non/bimg/image.go:183: undefined: Interpretation
vendor/github.com/h2non/bimg/image.go:199: undefined: ImageSize
vendor/github.com/h2non/bimg/image.go:25: too many errors

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 10
  • Comments: 16 (2 by maintainers)

Most upvoted comments

Apologies @bpsizemore I disable cgo when I build most of my binaries. Mostly because the rest services I develop don’t use any cgo bindings. This obviously will not work if I pass CGO_ENABLED=0 while doing a go build.

Just want to see what the state of this issue is. I am getting the same errors on OS X 10.12.6 and Go version 1.9.1.

../../vendor/gopkg.in/h2non/bimg.v1/image.go:93:49: undefined: Gravity
../../vendor/gopkg.in/h2non/bimg.v1/image.go:133:29: undefined: Watermark
../../vendor/gopkg.in/h2non/bimg.v1/image.go:139:34: undefined: WatermarkImage
../../vendor/gopkg.in/h2non/bimg.v1/image.go:152:26: undefined: Angle
../../vendor/gopkg.in/h2non/bimg.v1/image.go:176:31: undefined: Interpretation
../../vendor/gopkg.in/h2non/bimg.v1/image.go:191:27: undefined: Options
../../vendor/gopkg.in/h2non/bimg.v1/image.go:201:29: undefined: ImageMetadata
../../vendor/gopkg.in/h2non/bimg.v1/image.go:207:35: undefined: Interpretation
../../vendor/gopkg.in/h2non/bimg.v1/image.go:223:25: undefined: ImageSize
../../vendor/gopkg.in/h2non/bimg.v1/resize_legacy.go:8:27: undefined: Options
../../vendor/gopkg.in/h2non/bimg.v1/resize_legacy.go:8:27: too many errors
  • libvips version
vips --vips-version
libvips 8.5.9-Fri Oct 27 10:53:06 EDT 2017

Edit: got this working now. It had to do with my build scripts disabling cgo. Apologies!