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

Allow Linux script to install on Arm64 #11434

Open
GregJohnStewart opened this issue Nov 23, 2024 · 6 comments
Open

Allow Linux script to install on Arm64 #11434

GregJohnStewart opened this issue Nov 23, 2024 · 6 comments
Labels
bug It's a bug

Comments

@GregJohnStewart
Copy link

Operating system

Linux

Joplin version

Desktop version info

Desktop app, more specifically the installation script

Current behaviour

  1. You run wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash on an arm-based linux pc
  2. It blocks you saying to goto discourse to get more info on arm systems not being fully supported

Expected behaviour

I want the script to just install Joplin. Cursory searching seems to indicate it should be workable, but the script blocks the installation anyways.

Logs

wget -O - https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh | bash
--2024-11-22 21:35:35--  https://raw.githubusercontent.com/laurent22/joplin/dev/Joplin_install_and_update.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 11962 (12K) [text/plain]
Saving to: ‘STDOUT’

-                                                              100%[===================================================================================================================================================>]  11.68K  --.-KB/s    in 0.003s  

2024-11-22 21:35:36 (3.56 MB/s) - written to stdout [11962/11962]


     _             _ _       
    | | ___  _ __ | (_)_ __  
 _  | |/ _ \| '_ \| | | '_ \ 
| |_| | (_) | |_) | | | | | |
 \___/ \___/| .__/|_|_|_| |_|
            |_|

Linux Installer and Updater

Checking architecture...

     _             _ _       
    | | ___  _ __ | (_)_ __  
 _  | |/ _ \| '_ \| | | '_ \ 
| |_| | (_) | |_) | | | | | |
 \___/ \___/| .__/|_|_|_| |_|
            |_|

Linux Installer and Updater

Available Arguments:
	 --help 	 Show this help information 

	 --allow-root 	 Allow the install to be run as root
	 --changelog 	 Show the changelog after installation
	 --force 	 Always download the latest version
	 --silent 	 Don't print any output
	 --prerelease 	 Check for new Versions including Pre-Releases
	 --install-dir 	 Set installation directory; default: "/home/user/.joplin"

 ERROR:  Arm systems are not officially supported by Joplin, please search the forum (https://discourse.joplinapp.org/) for more information  
@GregJohnStewart GregJohnStewart added the bug It's a bug label Nov 23, 2024
@laurent22
Copy link
Owner

Did you try removing the line that blocks the installation and see if it works?

@GregJohnStewart
Copy link
Author

GregJohnStewart commented Nov 23, 2024

Looks like it doesn't work, get the expected exec format error. Wondering then if something needs tweaked on the appimage delivery side, since I saw reports it works in other installation methods like flatpak?

It would be great to run Joplin on say a raspberry pi and similar arm-based devices...

@JGCarroll
Copy link

JGCarroll commented Nov 24, 2024

The AppImage is for X86_64, it can't just be run on other platforms without CPU emulation, something like QEMU or less full-fat Box64 (but I believe this doesn't work for Joplin).

The reason the Flatpak works is because they build two versions of Joplin and your computer picks the right one. Before the script needs patching, the build system would need to produce ARM64 AppImages. Github Actions will soon provide ARM64 Linux runners for free so it'd be possible in the future but I think for now every practical attempt involves either money for custom infrastructure to build on; or involves using QEMU to emulate other platforms, there are Github actions to help with that already but any time I've ever attempted to use QEMU for this kind of usecase personally, it never goes well.

Ultimately the blocker here is the gratis ARM64 Github action runners; because on a native ARM64 system Joplin will basically build without any modifications needed. Ignoring the potential for e.g., hardcoded folder paths that might change slightly, it'd be much more future proofed to wait a bit longer and do it properly.

@GregJohnStewart
Copy link
Author

That's reasonable, and unsurprising it's another group making the flatpaks. Unfortunately it doesn't seem flatpak is an option on this particular setup I have.

Looking into it, yeah the arm runners should be here soon if that timeline still holds. Up to you then, could just keep this ticket or close it if you have a better related one. Maybe point users in the error text to a more specific discourse outlining the blockers if you are already editing the script too.

Anyways, thanks for the discourse. Joplin's pretty great to use :)

@JGCarroll
Copy link

JGCarroll commented Nov 24, 2024

I'm wondering if the Flatpak issue is a technical one or just a general aversion to the technology? You'd need root access to set them up, but the process should be pretty transparent for both, I think the store pages on both Flathub and Snapcraft for the Raspberry Pi specifically (at least in the default Raspbian setups, but frankly there's not much different between distributions for either of the two).

Both the Flatpak and Snap should work on Raspberry Pi just fine. They're native packages for ARM64. The sandbox both use might be seen as a limitation by some ( or blessing by others ), but performance wise both platforms only really incur a minor cold-start penalty, once the app is up and showing your notes, runtime performance is equal to what the AppImage would be, and infact the AppImage has the same cold boot performance problems because it acts a lot similar to snap in the delivery format (snapd mounts a squashfs file onto the filesystem directory, AppImage extracts into /tmp and executes from there).

The caveat is, they're unofficial. But ultimately, there are no official solutions to your problem, they're at least highly respected individually ( caveat, I would say that, I produce the snap ).

I'd defer to someone like Laurent on long term plans, I hang around and talk from time to time but I'm not really involved in the project. What I would say with the snap is that only 0.5 percent of users are on the ARM64 version, and Linux itself is already generally a niche platform ( although for Joplin, I think Linux might actually be more popular than MacOS and not too far off Windows, relatively speaking ).

But from what personal experience I do have of the ARM64 of the Snap, someone from Canonicals hardware team requested it and promised to act as a canary for any issues. A year later, nothings been reported as ARM64 specific ever, which might help influence the decision.

@GregJohnStewart
Copy link
Author

Yeah sadly for me the specific distro/usecase I have doesn't come with flatpak so not a great option to have to install the whole flatpak stack on a fairly small device. If curious, it's the Pine64 Note.

Again, willing to wait for the 'best case' path, with Github runners being available (as it sounds like it really should be soon...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug It's a bug
Projects
None yet
Development

No branches or pull requests

3 participants