nicohman / wyvern

A simple CLI client for installing and maintaining linux GOG games
GNU General Public License v3.0
86 stars 5 forks source link

Host raspberry pi binaries? #3

Closed sigboe closed 5 years ago

sigboe commented 5 years ago

Hey when I try to install from binary it on a raspberry pi it starts compiling dependencies.

I imagine you don't host binaries for arm architectures?

I would like to get this working on raspberry pi so I can possibly look into a converter for for example retropie, so I can download dosbox based games from gog, and convert the settings files, or image files to be run from dosbox on linux, and be put into launcher entries in EmulationStation.

nicohman commented 5 years ago

I don't think it's really feasible to try to host binaries for ARM. I did try to install wyvern onto my pi zero using cargo, and it does appear to work, so long as you've installed cargo via rustup instead of apt-get. Unless someone else is able to figure out how to finagle ARM builds on builds.sr.ht, I think that'll have to do. Sorry for that.

nicohman commented 5 years ago

Actually, going to leave this open just in case it does become practical to pre-compile ARM binaries/in case there's an easier way to do this that I don't know about.

sigboe commented 5 years ago

It works, and I can download on the Pi! It took a long time to compile the huge list of dependencies on the Pi2. Is all that necicary, or just included in the boilerplate code? I havent touched rust before.

nicohman commented 5 years ago

All of the dependencies are used by wyvern in some way, but some of them could be excluded without actually affecting the functionality --like the progress bar UI, or the logging crates. Overall, they aren't the crates that affect compile time by much, so it wouldn't even speed it up too much if they were removed. If you really want to reduce compile time though, you could try cloning and manually compiling wyvern in debug mode instead of cargo install's default release mode. This significantly decreases compile time, but makes the resulting binary slower.

sigboe commented 5 years ago

Its okay, I just think I had to compile all the dependencies too. If they are used, then I have no objection to them :+1:

sigboe commented 5 years ago

@nicohman Do you think you could host binaries in the releases tab?

I am making headway on my app that depends on yours, and it is people whom would find it difficult to compile programs that would find it most useful.

nicohman commented 5 years ago

I might be willing to just manually compile an ARM binary for major version updates and host it on my server if that would work for you. It should also be possible to set up a script that would automatically install rustup and wyvern.

sigboe commented 5 years ago

that would be great, I couldn't ask for more.

Yes installing rustup and wyvern via script is possible, but it can be prone to lots of problem, just today I have this issue on the Pie, but not in fedora on my laptop.

   Compiling walkdir v2.2.7
error: Could not compile `regex-syntax`.

Caused by:
  process didn't exit successfully: `rustc --crate-name regex_syntax /home/pi/.cargo/registry/src/github.com-1ecc6299db9ec823/regex-syntax-0.6.5/src/lib.rs --color always --crate-type lib --emit=dep-info,link -C opt-level=3 -C metadata=3a8d2bdbb3d198e3 -C extra-filename=-3a8d2bdbb3d198e3 --out-dir /home/pi/wyvern/target/release/deps -L dependency=/home/pi/wyvern/target/release/deps --extern ucd_util=/home/pi/wyvern/target/release/deps/libucd_util-6028f4dcc4bfa403.rlib --cap-lints allow` (signal: 11, SIGSEGV: invalid memory reference)
warning: build failed, waiting for other jobs to finish...
error: failed to compile `wyvern v1.2.1 (/home/pi/wyvern)`, intermediate artifacts can be found at `/home/pi/wyvern/target`

Caused by:
  build failed
nicohman commented 5 years ago

Okay, I've now got a binary built on my pi zero available here. It may or may not work on other pis depending on your CPU architecture. I'll see about figuring how to emulate the Pi2/3 to build an armv8 binary.

sigboe commented 5 years ago

I can definitely verify that he build works on Pi2/3

Thanks a bunch!! I think the packaging support for RetroPie supports letting the user build from source, and I will try to write in that too, but since you host x86 and arm now, I think that covers everyone.

Are you going to keep hosting this 1.3 version? So I can link to that in the installer script? Example wyvern-1.3.0-armv7 wyvern-latest-armv7 wyvern-1.3.0-x86 wyvern-latest-x86

Does the build bot in source shack support arm?

nicohman commented 5 years ago

Yes, I’ll keep hosting wyvern-1.3.0-armv7, as well as the autobuilt wyvern-nightly. They’ll both stay accessible at their current URLs. As far as sr.ht supporting ARM: according to the builds.sr.ht docs, ARM should be available for debian/unstable, but it doesn’t currently appear to be working.

nicohman commented 5 years ago

The new snap should also be able to be installed on ARM systems, so that's another way to get wyvern on an rpi.

sigboe commented 5 years ago

@nicohman yeah thats great, but not everyone has the snaps package manager installed, so its not a catch all solution :smile_cat:

sigboe commented 5 years ago

btw fyi https://demenses.net/wyvern-1.3.0-armv7 is still version 1.2.1

nicohman commented 5 years ago

Thanks for letting me know; I'll rebuild it later.