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

First install globally on armhf installs x86_64 binary #35

Open
danwdart opened this issue Jun 11, 2018 · 5 comments
Open

First install globally on armhf installs x86_64 binary #35

danwdart opened this issue Jun 11, 2018 · 5 comments

Comments

@danwdart
Copy link

When I first do a npm -g install @dadi/cli I get a binary from the wrong architecture plonked in my bin directory. Shouldn't this either be a script or match the source arch?

Reproducing the issue, just install @dadi/cli on a Pi and notice that you get a 64-bit PC version of the dadi binary appearing.

@danwdart
Copy link
Author

Sounds like this is the work of https://github.com/zeit/pkg
I don't think this is needed when a "bin" can just be specified in a package.json - being a js script - then it would work cross-arch and not have to include a whole other node.

@danwdart
Copy link
Author

Oh, apparently pkg can target to armv6/armv7 too - still not sure about armv8 (pi3 with 64 bit OS)

@eduardoboucas
Copy link
Contributor

eduardoboucas commented Jun 11, 2018

We use pkg because it allows us to have automatic updates in place. When you install @dadi/cli, the JS file downloads the binary that is appropriate for your architecture. Every time you run dadi, it's able to determine whether there is a newer version of CLI available and, if so, download the new binary and replace the existing one.

It does introduce some complexity and we might decide that it's not a tradeoff worth having. Building for ARM was not a strong requirement when we started the project, so if we come to the conclusion it's not possible with pkg, we can get rid of it.

@danwdart
Copy link
Author

It turns out it certainly is possible - just would need enabling.

@danwdart
Copy link
Author

(For now I'm just aliasing to the index.js in a clone)

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

2 participants