webp
webp copied to clipboard
Linux go mod vendor 后,编译出错
go mod vendor 后,编译出错,提示无法找到 webp.h 文件
# cat /etc/redhat-release
CentOS Linux release 7.9.2009 (Core)
# go version
go version go1.15.5 linux/amd64
# go build
# github.com/chai2010/webp
vendor/github.com/chai2010/webp/capi.go:24:18: fatal error: webp.h: No such file or directory
#include "webp.h"
^
compilation terminated.
ls vendor/github.com/chai2010/webp/
目录找不到 testdata / internal / fuzz / bench 文件夹
手动拷贝 testdata / internal / fuzz / bench 文件夹到 vendor 里面才编译通过
Any fix to this issue? How to use this library in recent go 1.16 module ?
go1.16: add missing files to Go:embed
, keep the missing files in the vendor.
any PR are welcomed
chai you can use something like this in your repo https://github.com/sizeofint/webpanimation/issues/1#issuecomment-894585471
https://github.com/ethereum/go-ethereum/blob/master/crypto/secp256k1/dummy.go
I notice this work around to include missing C files in vendor, happy to pick this up if it's ok