chai2010 / webp

WebP decoder and encoder for Go (Zero Dependencies).
http://godoc.org/github.com/chai2010/webp
BSD 3-Clause "New" or "Revised" License
512 stars 89 forks source link

Linux go mod vendor 后,编译出错 #38

Open cppcoffee opened 3 years ago

cppcoffee commented 3 years ago

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.
cppcoffee commented 3 years ago
ls vendor/github.com/chai2010/webp/

目录找不到 testdata / internal / fuzz / bench 文件夹

cppcoffee commented 3 years ago

手动拷贝 testdata / internal / fuzz / bench 文件夹到 vendor 里面才编译通过

tanvir-retailai commented 2 years ago

Any fix to this issue? How to use this library in recent go 1.16 module ?

chai2010 commented 2 years ago

go1.16: add missing files to Go:embed, keep the missing files in the vendor. any PR are welcomed

Benau commented 2 years ago

chai you can use something like this in your repo https://github.com/sizeofint/webpanimation/issues/1#issuecomment-894585471

jjkoh95 commented 2 years ago

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