-
Notifications
You must be signed in to change notification settings - Fork 10
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
Running into problems when trying to preserve C files #18
Comments
@VoR0220 Are these files inside a package that has been kept by glide-vc or inside a dir not kept by glide-vc? Currently --keep will only keep files inside needed go packages. Can you describe your use case? |
it is inside a needed go package, but it's a C Go extension. Basically I'm trying to port in a crypto library whereby there is C GO extensions added in but I can't seem to figure out how to make that happen. |
it's a directory that's referenced by the package... |
I get the feeling I'm not going to like the answer I'm about to get... |
glide-vc by default keeps cpp and hpp file inside the needed packages since this is how cgo works (https://golang.org/cmd/cgo/) I'm not sure how you make cgo work if you put cpp/hpp files in a directory outside the using package and why this is inside the vendor dir (is it a program vendoring your cgo based go library?). Can you provide some details on your program and what you are trying to do since it's not completely clear to me (or just a github repo with the whole project)? |
I think I've come to the conclusion that it's not VC that's the problem, it's the way I'm structuring my dockerfile. If I run into any more problems though, I will be certain to contact you. Thanks for your help. I hope the day comes when this is implemented into the main glide. |
Okay I can reproduce the issue now. Basically it's this directory right here: https://github.com/ethereum/go-ethereum/tree/master/crypto/secp256k1 Basically the problem is that I try to keep libsecp256k1 directory intact, and I can't seem to get it to keep it. I've tried many variations of this below example:
|
I should clarify, I manage to get crypto and secpk256k1, just not the subsequent c libs. |
@VoR0220 Thanks for the additional information. https://github.com/ethereum/go-ethereum/tree/master/crypto/secp256k1 is using cgo in a strange way. It bundles libsecp256k1 source code and builds the cgo required functions using relative includes to some of its There's no way (without code analysis) for glide-vc to infer the additional cgo required files inside other dirs like this case. So I can think of two solutions:
|
tried this:
glide vc --keep 'Makefile' '**/*.h' '**/*.cpp*'
but it still appears to be deleting my necessary cpp and such files...any hints?
The text was updated successfully, but these errors were encountered: