-
Notifications
You must be signed in to change notification settings - Fork 20.5k
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
Vendoring fails on projects using the native Golang bindings #2738
Comments
Still an issue. |
Still have same issue. |
me too! any solutions?? |
anyone find a solution to this ? |
A temporary solution is to just manually copy the files into vendor:
|
@lmars you ... I can't even... wow... thanks! For any newbz out there like myself who have been privileged enough to grow up on
before running the above. |
I think the issue is more along the lines of dep, see this issue: golang/dep#1847 |
Same thing with govendor. |
Had this error using |
This brought about many changes: 1. Switched from glide to dep for managing dependencies (https://golang.github.io/dep/). I was having issues with glide in that it wouldn't resolve the subpackages of go-ethereum (accounts, common). 2. Added .dockerignore file 3. Modified docker/Dockerfile to also build microcosm binary and put it into /usr/local/bin of final image. 4. Updated vendor/ subdirectory after `dep` did its magic. 5. Had to manually add libsecp256k1 into vendored go-ethereum as per @lmars solution here: ethereum/go-ethereum#2738
Is there a plan to fix this? |
@ezynda3 it is more likey golang bug. or dep. or whatever, i encountered the same problems with ledger-related golang code. |
According to this comment a simple way of fixing this would be to add a dummy go file in |
if you are using govendor , try "govendor fetch -tree github.com/ethereum/go-ethereum/crypto/secp256k1" |
Hey, so this is a limitation of the Go vendoring ecosystem. The suggested workaround by @zglzglak47 is the correct solution unfortunately. Maybe go 1.11 modules could eventually help, but for now this is an unfortunate limit of Go. |
it works! |
System information
Expected behaviour
I am using the Golang native contract bindings in a project. The project builds fine. I want to use vendoring to add all dependencies into the repository and have it build in an isolated fashion. Using
godep save
should add all required dependencies to the vendor folder.Actual behaviour
godep save
misses some cgo dependencies that are located in their own folder. This causes the build to fail with:The problem is described in the following issue on the Godep repository: tools/godep#422
The sqlite library in Go solved the issue by putting the cgo dependencies into the same package as the files that depend on it.
Steps to reproduce the behaviour
godep save
to save the dependencies in the vendor foldergo build
on Golang version 1.6 or laterThe text was updated successfully, but these errors were encountered: