h2non / bimg

Go package for fast high-level image processing powered by libvips C library
https://pkg.go.dev/github.com/h2non/bimg?tab=doc
MIT License
2.68k stars 337 forks source link

Failed `go get` with go 1.16.4, works-ish with 1.16.3 #371

Open RcrdBrt opened 3 years ago

RcrdBrt commented 3 years ago

Here's a problem I encountered when importing bimg. I tried with 2 different go versions, 2 tries each:

go version: 1.16.3

Command: go get github.com/h2non/bimg Result: OK

Command: go get github.com/h2non/bimg@master Result: go build github.com/h2non/bimg: invalid flag in pkg-config --cflags: -I@/usr@/include

go version: 1.16.4

Command: go get github.com/h2non/bimg Result: go build github.com/h2non/bimg: invalid flag in pkg-config --cflags: -I@/usr@/include

Command: go get github.com/h2non/bimg@master Result: go build github.com/h2non/bimg: invalid flag in pkg-config --cflags: -I@/usr@/include

OS info

ArchLinux Go versions: I tried 1.16.3 and 1.16.4

wind0r commented 3 years ago

I had the same issue when updating from go 1.15 to 1.16 Looks like something with the allowed cflags changed. As a workaround I did the following:

CGO_CFLAGS_ALLOW="-I@/usr@/include" go get github.com/h2non/bimg