Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cppcoffee opened this issue Mar 5, 2021 · 6 comments
Open

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

cppcoffee opened this issue Mar 5, 2021 · 6 comments

Comments

@cppcoffee
Copy link

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
Copy link
Author

ls vendor/github.com/chai2010/webp/

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

@cppcoffee cppcoffee reopened this Mar 28, 2021
@cppcoffee
Copy link
Author

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

@tanvir-retailai
Copy link

tanvir-retailai commented Jul 24, 2021

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

@chai2010
Copy link
Owner

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

@Benau
Copy link

Benau commented Aug 8, 2021

chai you can use something like this in your repo
sizeofint/webpanimation#1 (comment)

@jjkoh95
Copy link
Contributor

jjkoh95 commented Sep 26, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants