-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
CGO / Ledger: Fix build issues #1581
Comments
EDIT: The previous message from another person was deleted. |
Interesting choice of words. I just run into the following use-case:
So in my case, getting ledger-related errors in a completely unrelated application is frustrating. Can the ledger code be a separate library that I pull in if I need but doesn't get built if I'm not using it? This is more than just a |
Can |
Maybe. Based on my current knowledge, I would keep ledger integration as a separate library and make cosmos-sdk apply an interface (in the Java term, I'm not sure if Go does it the same way) so you can plug it in as a separate modul. We'll need to do more research on this. |
The Voyager team isn't able to build the SDK (v0.20.0) for macOS or Windows:
|
While we should add a build flag, we definitely want Ledger support on Mac OS and Windows - I'm not sure what flags the upstream library may need for that though - https://github.com/brejski/hid. |
Note: |
@faboweb, correct, the |
Actually, I built this fine from within a docker container. Seems to be an issue when invoked from a mac. Looking into it further. |
Our problem is that we build on Linux using cross compilation. It looks like cross compilation is no longer supported. |
Reopening, since not all items are finished. |
@ValarDragon / @NodeGuy what exactly do we want to do here? I don't recommend cross compiling when you have dynamic libraries linked (libs) (hence ledger disabled). Cross compiling with CGO is extremely cumbersome from my experience, also of which I do not have much of. Might need someones help on this. |
@greg-szabo We started building our own binaries of the SDK when there weren't any for the new version and you were on vacation. Are you still building binaries for all three platforms? Is your process always current with new SDK releases? |
I'm not. The ledger integration threw off cross-compiling enough that I wanted to wait until things settle and we decide how we want to move forward. Right now, if I want to use the SDK as an SDK (where I don't need Ledger), I add the following things:
This allows me to build a static binary with no Ledger support. Any cross-compilation efforts with Ledger enabled were met with error messages, so I use docker to cross-compile to linux on my Mac or I compile it directly on Mac for Mac binary. |
What @greg-szabo outlined is pretty much the set process right now. Cross-compiling with Ledger support is a huge pain -- I'm not even sure it can be done? |
Would someone please talk to the Ledger people about this? |
We've brought it up - but it's a lower priority than a Ledger app for validators. @greg-szabo What error messages did cross-compile attempts result in? |
Linking #2157 Any updates? |
Native Golang Ledger isn't presently slated for pre-launch - is it a substantial issue Voyager-side or is cross-compilation workable? |
We would need cross-compilation (which isn't working right now) to make it work in Voyager. We already agreed that this is not a pre-launch necessity. I was exploring this again as it was a feature @zmanian was pushing for. I will drop research on it, until this issue is resolved. |
@cwgoes I don't think this is actually game of steaks needed. I mistook it for an actual SDK build issue. Thoughts? |
It's not even prelaunch I think, see @faboweb's last comment. |
Going to close this and track progress here with the SRE team. |
Currently the ledger requires CGO as a dependency. This isn't installed in all machines and should not be the default for the SDK. We need to make this an opt-in build flag, with associated make command.
The text was updated successfully, but these errors were encountered: