ledger-live-desktop icon indicating copy to clipboard operation
ledger-live-desktop copied to clipboard

Please create a Ledger Live AppImage supporting ARM/Raspberry PI

Open StayCoolDK opened this issue 7 years ago • 32 comments
trafficstars

Since the current linux AppImage is x86/64 the following error occurs:

pi@raspberrypi:~ $ ./ledger-live-desktop-1.0.2-linux-x86_64.AppImage bash: ./ledger-live-desktop-1.0.2-linux-x86_64.AppImage: cannot execute binary file: Exec format error

Do you have any plans of creating an AppImage for ARM?

StayCoolDK avatar Jul 14 '18 10:07 StayCoolDK

I guess we could have this platform supported yes. We probably first will look at automating our current build because today workflow requires 3 machines already. If we have this automated, it will get way easier to add more platforms

gre avatar Jul 14 '18 13:07 gre

Alright that makes sense. Thanks gre! Fantastic work so far.

StayCoolDK avatar Jul 14 '18 16:07 StayCoolDK

Hey again gre, i know you're busy working on the mobile apps for the Q4 release but i wanted to ask you if there was an ETA on this feature? How far are you with automating your build proces?

StayCoolDK avatar Aug 31 '18 09:08 StayCoolDK

Interested as well, because I want to use it on the future Librem 5 phone, which is an ARM device.

1989gironimo avatar Apr 15 '19 13:04 1989gironimo

Hi,

I have a raspberry Pi as backup of my laptop which is not working for last 1 month. I can't access my coins now till I get my laptop repaired. Please provide appimage for ARM too. Access to coins is crucial.

flogger007 avatar Apr 27 '19 10:04 flogger007

we have recently started a commandline version of ledger-live (for test purpose at the moment) but that use the same low level libraries. You can install it with npm i -g ledger-live with Node 8, can you try if it works?

That would be the first step for us to know if the basic stack works. typically you can check if ledger-live version works, and then you can try to plug a device, open an app (like Bitcoin app), and see if ledger-live sync find your accounts. (only Bitcoin and altcoins are supported. not yet XRP nor ETH)

gre avatar Apr 27 '19 11:04 gre

+1, I have an ARM laptop.

npm i -g ledger-live gives

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.
npm WARN deprecated [email protected]: core-js@<3 is no longer maintained and not recommended for usage due to the number of issues. Please, upgrade your dependencies to the actual version of core-js@3.

> @ledgerhq/[email protected] preinstall /usr/lib/node_modules/ledger-live/node_modules/@ledgerhq/ledger-core
> node preinstall.js

fs.js:114
    throw err;
    ^

Error: EACCES: permission denied, mkdir 'lib'
    at Object.mkdirSync (fs.js:757:3)
    at Object.<anonymous> (/usr/lib/node_modules/ledger-live/node_modules/@ledgerhq/ledger-core/preinstall.js:38:6)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
    at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)
npm WARN [email protected] requires a peer of @ledgerhq/[email protected] but none is installed. You must install peer dependencies yourself.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! @ledgerhq/[email protected] preinstall: `node preinstall.js`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the @ledgerhq/[email protected] preinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /root/.npm/_logs/2020-02-27T20_38_46_631Z-debug.log

louisabraham avatar Feb 27 '20 20:02 louisabraham

this seems like a folder permission, how did you install node?

gre avatar Feb 28 '20 06:02 gre

As a root:

curl -sL https://deb.nodesource.com/setup_10.x | bash -
apt-get install -y nodejs

I got these instructions from the nodejs website for Debian.

louisabraham avatar Feb 28 '20 08:02 louisabraham

  • I would recommend to use Node 12 (LTS)
  • if you install it as root, you also need to npm i -g as root. an alternative is to use nvm or any other way to install node locally.

gre avatar Feb 28 '20 09:02 gre

Thank you for your answer @gre. I launched it as root and had the exact same error message.

louisabraham avatar Feb 28 '20 20:02 louisabraham

Lately I've been playing around with using a ledger on a Raspberry pi. I understand that maintaining an app image for this arch is a large support burden, but I haven't been able to build from source either.

Installation of the command-line ledger-live package from NPM fails for the same reason the ledger-live-desktop cannot build: ledger-core does not seem to successfully build for this architecture. When building the dependencies of ledger-live-desktop, I encounter a load of warnings about bad casts (perhaps some deeply-based pointer-width assumptions). Although the build succeeded, the generated ledger-core.so seemed to have been generated with an unlinkable format that the node bindings did not accept.

Unfortunately, none of the browser-based apps for ledger (MyCrypto, MyEtherWallet) seem to function with the ledger either, possibly due to outdated firmware or bad U2F implementations.

@gre I'd be very interested to hear any information on what prevents ledger-core from compiling for an arm32 target, as it seems this is currently done already for the Android and perhaps iOS targets. I do understand that the Ledger organization may not want to commit to supporting releases for this target, although I (with only outside knowledge) would not expect that being able to build from source will need many changes, given a functioning libusb-1.0.0-dev.

rphmeier avatar May 22 '20 20:05 rphmeier

Just to try it, I was not able to successfully build https://github.com/LedgerHQ/lib-ledger-core repository on raspberry pi.

I configured with this invocation:

cmake -DBUILD_TESTS=OFF ../lib-ledger-core

I did not want to install qt5 or run tests so I disabled them.

All relevant make targets failed at the install step for secp256k1, although the error is very opaque and I have not been able to figure out the cause. The referenced log file also does not exist.

robert@bumblebee:~/ledger-src/lib-ledger-core-build$ make
[  0%] Performing install step for 'secp256k1'
CMake Error at secp256k1-install-Release.cmake:16 (message):
  Command failed: 2

   'make' 'install'

  See also

    /home/robert/ledger-src/lib-ledger-core-build/core/lib/secp256k1/secp256k1-install-*.log


make[2]: *** [core/lib/CMakeFiles/secp256k1.dir/build.make:74: core/lib/secp256k1/secp256k1-install] Error 1
make[1]: *** [CMakeFiles/Makefile2:159: core/lib/CMakeFiles/secp256k1.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

rphmeier avatar May 22 '20 21:05 rphmeier

@gre I tried to install ledger-live on winonarm with this command: npm i -g ledger-live --nodedir --force

But I got this error while installing:

if not defined npm_config_node_gyp (node "C:\Program Files\nodejs\node_modules\npm\node_modules\npm-lifecycle\node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild )  else (node "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" rebuild )
gyp: C:\Users\proel\AppData\Roaming\npm\node_modules\ledger-live\node_modules\keccak\true\common.gypi not found (cwd: C:\Users\proel\AppData\Roaming\npm\node_modules\ledger-live\node_modules\keccak) while reading includes of binding.gyp while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:276:12)
gyp ERR! System Windows_NT 10.0.19645
gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\proel\AppData\Roaming\npm\node_modules\ledger-live\node_modules\keccak
gyp ERR! node -v v15.0.0-pre
gyp ERR! node-gyp -v v5.1.0
gyp ERR! not ok

matze19999 avatar Jun 11 '20 17:06 matze19999

I would like to have this feature. Just ordered Ledger and want to be able to use on my rasp pi that is my eth node.

lfritts avatar Sep 08 '20 00:09 lfritts

For about the past year I have been using the recent Raspberry Pi 4 and 8 GB models (both with dual monitors), and I am so impressed with the performance that I am no longer using nor maintaining my x86 or IOS devices.

When I bought my ledger X and S I remember checking to see that Linux is supported but missed the no ARM support. I'm now having to consider scrapping all Ledger products and going another route due to lack of support on the Raspberry Pi.

I don't understand what the issue is as Android IS supported and many Android devices are using ARM processors. (?????)

I just wanted it to be known that there is growing interest in getting Ledger support on the Raspberry Pi and in the future lack of support for the Pi may start to cause a loss of sales as more people grow tired of x86 and IOS devices.

dish-eme-sdr avatar Nov 28 '20 15:11 dish-eme-sdr

probably would be good to make ledger live supporting ARM, since MacOS is now on ARM.

huglester avatar Jan 11 '21 19:01 huglester

Brought my ledger nano x and realized it does not support ARM, the only option are sell it for half of the price and buy a trezor

jackgoh avatar Jan 22 '21 15:01 jackgoh

Brought my ledger nano x and realized it does not support ARM, the only option are sell it for half of the price and buy a trezor

Nobody will buy a used ledger and why didn't check the arm support first?

matze19999 avatar Jan 22 '21 15:01 matze19999

probably would be good to make ledger live supporting ARM, since MacOS is now on ARM.

I was thinking the same. I just bought my first Raspberry and I plan on moving to Apple's M1 later this year. The hype is real! 😅

zvictor avatar Jan 25 '21 09:01 zvictor

Installed Ledger Live on M1. works

huglester avatar Jan 25 '21 09:01 huglester

Installed Ledger Live on M1. works

That's due to Rosetta 2, not because ARM would be deliberately supported by Ledger Live. Also, fyi, apple is not the same fruit as raspberry, which this issue is about.

antichris avatar Apr 27 '21 08:04 antichris

I would also be interested in an ARM build. Wanted to move all my crypto stuff to a Pinebook Pro (ARM), but was sad to see Ledger Live doesn't run there. As I understood it it's mostly a matter of creating a new build pipeline, so I'm hoping this will be considered in the near future.

rroels avatar May 04 '21 08:05 rroels

Whew. Took a while, but https://github.com/antichris/ledobe is ready. :tada:

Feedback much appreciated.

antichris avatar May 12 '21 06:05 antichris

@antichris that's amazing!

I just gave it try, and it works perfectly on my Pinebook Pro (arm64). I just followed the instructions, everything went smoothly, and at the end I got a working app-image for Ledger Live Desktop.

To get it to recognise my device I had to sudo chmod 666 /dev/hidraw2 as mentioned here, but that's unrelated to LeDoBe.

Thanks a lot for your hard work, this is really useful for me!

rroels avatar May 22 '21 18:05 rroels

@rroels I am really glad to hear it worked for you! And thanks for the tip on USB connectivity workaround, I'll look into I integrating that knowledge into my project.

antichris avatar May 22 '21 19:05 antichris

Any update on this build? @gre

nixorokish avatar Jun 21 '21 01:06 nixorokish

Whew. Took a while, but https://github.com/antichris/ledobe is ready. tada

Feedback much appreciated.

Thanks a lot for your efforts. I do however get errors after running bin/build:

E: Version '202101190.04.1' for 'ca-certificates' was not found The command '/bin/sh -c set -x && apt-get update && apt-get install -y --no-install-suggests --no-install-recommends ca-certificates=2021011920.04.1 wget=1.20.3-1ubuntu1' returned a non-zero code: 100

Afterwards when I try to run bin/run make I get the following error:

Unable to find image 'ledobe:latest' locally docker: Error response from daemon: pull access denied for ledobe, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.

I'm running Ubuntu 21.04 on RPI 4.

Thanks!

dominicdp avatar Oct 18 '21 15:10 dominicdp

@dominicdp A security update was released for ca-certificates last month, that's why. I just pushed a fix for this and another potential build failure: please, try building the latest master now, If successful, do let me know, and I'll make a new release.

In the future, though, do not hesitate to take the discussion to the ledobe repo, since this current issue here we're having this discussion at right now is something for the LedgerHQ guys to resolve and not about that project of mine.

antichris avatar Oct 18 '21 19:10 antichris

@antichris Sorry, you're right..I'm new to this but will take the discussion where it belongs in the future. For what it's worth: I was able to build successfully, I think... but how do I run it now?

dominicdp avatar Oct 19 '21 16:10 dominicdp