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

Support linux arm64 #352

Closed
odlg opened this issue Dec 30, 2023 · 24 comments
Closed

Support linux arm64 #352

odlg opened this issue Dec 30, 2023 · 24 comments
Labels
enhancement New feature or request

Comments

@odlg
Copy link

odlg commented Dec 30, 2023

I now have a MacBook Pro M2 running Asahi Linux and I would like to run FreeShow on it. I tried to build it by running:
npm install
npm run build
npm run release
The last command fails with:
image

At that point the appimage is built. But running it fails with:
./FreeShow-1.1.0-arm64.AppImage: error while loading shared libraries: libz.so: cannot open shared object file: No such file or directory
In dist/linux-arm64-unpacked the freeshow command works and invokes FreeShow.

@vassbo vassbo added the bug Something isn't working label Dec 30, 2023
@vassbo
Copy link
Collaborator

vassbo commented Dec 30, 2023

The .AppImage and .deb version from the web should work.

I have pushed a small change to the dev branch now, try if that works.
If you just need it for testing you can use the "npm start" command. (You might need to increase the app start timeout in "index.ts", if the building takes longer)

@odlg
Copy link
Author

odlg commented Dec 30, 2023

The .AppImage and .deb files from the web are x86_64. Recent MacBooks use 64-bit arm processors. Attempting to execute it gives an error:

$ ./FreeShow-1.1.0.AppImage 
bash: ./FreeShow-1.1.0.AppImage: cannot execute binary file: Exec format error
$

The changes you committed does not make the produced FreeShow-1.1.0-arm64.AppImage work.

@vassbo
Copy link
Collaborator

vassbo commented Dec 30, 2023

Okay. Try using "npm run release --arm64". Does that work?

@odlg
Copy link
Author

odlg commented Dec 30, 2023

Still exact same error as screenshot above running npm run release --arm64
Attempting to run the AppImage gets:

$ ./dist/FreeShow-1.1.0-arm64.AppImage 
./dist/FreeShow-1.1.0-arm64.AppImage: error while loading shared libraries: libz.so: cannot open shared object file: No such file or directory
$

@odlg
Copy link
Author

odlg commented Dec 30, 2023

Looks like an upstream issue: electron-userland/electron-builder#7835

@vassbo
Copy link
Collaborator

vassbo commented Dec 30, 2023

Hmm... I also found this: AppImage/AppImageKit#1092 (comment)
Does that work?

@odlg
Copy link
Author

odlg commented Dec 30, 2023

Yes, now the AppImage works.

@vassbo
Copy link
Collaborator

vassbo commented Dec 30, 2023

Awesome! Now it's just the case of creating releases that also works..

@odlg
Copy link
Author

odlg commented Dec 30, 2023

When starting the AppImage, there are troubles checking for new versions, I guess. But that is not surprising as it is not supported yet. :-)

Checking for update
Error: Error: Cannot find latest-linux-arm64.yml in the latest release artifacts (https://github.com/ChurchApps/FreeShow/releases/download/v1.1.0/latest-linux-arm64.yml): HttpError: 404 
"method: GET url: https://github.com/ChurchApps/FreeShow/releases/download/v1.1.0/latest-linux-arm64.yml\n\nPlease double check that your authentication token is correct. Due to security reasons, actual status maybe not reported, but 404.\n"
Headers: {
  "server": "GitHub.com",
  "date": "Sat, 30 Dec 2023 20:21:24 GMT",
  "content-type": "text/plain; charset=utf-8",
  "vary": "X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, Accept-Encoding, Accept, X-Requested-With",
  "cache-control": "no-cache",
  "strict-transport-security": "max-age=31536000; includeSubdomains; preload",
  "x-frame-options": "deny",
  "x-content-type-options": "nosniff",
  "x-xss-protection": "0",
  "referrer-policy": "no-referrer-when-downgrade",
  "content-security-policy": "default-src 'none'; base-uri 'self'; connect-src 'self'; form-action 'self'; img-src 'self' data:; script-src 'self'; style-src 'unsafe-inline'",
  "content-encoding": "gzip",
  "content-length": "29",
  "x-github-request-id": "AB9E:48C76:CCDB5EC:D003655:65907BC4"
}
    at createHttpError (/tmp/.mount_FreeSh6mpdYn/resources/app.asar/node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js:14:12)
    at ElectronHttpExecutor.handleResponse (/tmp/.mount_FreeSh6mpdYn/resources/app.asar/node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js:116:20)
    at ClientRequest.<anonymous> (/tmp/.mount_FreeSh6mpdYn/resources/app.asar/node_modules/electron-updater/node_modules/builder-util-runtime/out/httpExecutor.js:82:26)
    at ClientRequest.emit (node:events:527:28)
    at SimpleURLLoaderWrapper.<anonymous> (node:electron/js2c/browser_init:101:6915)
    at SimpleURLLoaderWrapper.emit (node:events:527:28)
    at Object.newError (/tmp/.mount_FreeSh6mpdYn/resources/app.asar/node_modules/electron-updater/node_modules/builder-util-runtime/out/index.js:47:19)
    at GitHubProvider.getLatestVersion (/tmp/.mount_FreeSh6mpdYn/resources/app.asar/node_modules/electron-updater/out/providers/GitHubProvider.js:75:46)
    at async AppImageUpdater.getUpdateInfoAndProvider (/tmp/.mount_FreeSh6mpdYn/resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:298:19)
    at async AppImageUpdater.doCheckForUpdates (/tmp/.mount_FreeSh6mpdYn/resources/app.asar/node_modules/electron-updater/out/AppUpdater.js:312:24)
(node:243405) UnhandledPromiseRejectionWarning: Error: Cannot find latest-linux-arm64.yml in the latest release artifacts (https://github.com/ChurchApps/FreeShow/releases/download/v1.1.0/latest-linux-arm64.yml): HttpError: 404 
"method: GET url: https://github.com/ChurchApps/FreeShow/releases/download/v1.1.0/latest-linux-arm64.yml\n\nPlease double check that your authentication token is correct. Due to security reasons, actual status maybe not reported, but 404.\n"

@vassbo
Copy link
Collaborator

vassbo commented Dec 30, 2023

@vassbo vassbo added enhancement New feature or request and removed bug Something isn't working labels Dec 30, 2023
@vassbo
Copy link
Collaborator

vassbo commented Dec 30, 2023

@odlg
Copy link
Author

odlg commented Dec 30, 2023

The link in #352 (comment) seems to relate to running the original OSX on the arm mac. I am running linux on it.
Universal binaries is a Apple OSX thing.

@vassbo
Copy link
Collaborator

vassbo commented Dec 31, 2023

Yes, but I need the same config for the electron builder packaging on Linux.

@vassbo
Copy link
Collaborator

vassbo commented Jan 1, 2024

I looked into it a bit more, and managed to make it work with this configuration:

"target": [
    {
        "target": "AppImage",
        "arch": ["x64", "arm64"]
    },
    {
        "target": "deb"
    }
]

@vassbo
Copy link
Collaborator

vassbo commented Jan 1, 2024

Please check out the arm64 version on the website: https://freeshow.app/downloads
And let me know if it works or not. 😉

@odlg
Copy link
Author

odlg commented Jan 1, 2024

It works just fine.

@vassbo
Copy link
Collaborator

vassbo commented Jan 1, 2024

Awesome! 😁

@vassbo vassbo closed this as completed Jan 1, 2024
@yanguoyu
Copy link

yanguoyu commented Jan 4, 2024

It works just fine.

Hi, does the arm64 work well with your arm64 computer? Could you tell me if you downloaded the AppImage or Deb?

@odlg
Copy link
Author

odlg commented Jan 4, 2024

@yanguoyu I use the AppImage. You need to make it executable first, see https://appimage.org/ for how to run an AppImage

@yanguoyu
Copy link

yanguoyu commented Jan 4, 2024

@yanguoyu I use the AppImage. You need to make it executable first, see https://appimage.org/ for how to run an AppImage

Hi, I have made it executable. My Linux version is Ubuntu 24.04.6 and is Arm64. And after I execute the AppImage, there's nothing happened.

image

@odlg
Copy link
Author

odlg commented Jan 4, 2024

If you start it in a terminal, do you get any output?
I get:

Starting FreeShow...
libva error on Linux can be ignored
Loading main window content
REMOTE on: 5510
STAGE on: 5511
[97544:0104/092029.063932:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[97544:0104/092029.070607:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[97544:0104/092029.076130:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
Capture - starting: default
Checking for update

@yanguoyu
Copy link

yanguoyu commented Jan 4, 2024

If you start it in a terminal, do you get any output? I get:

Starting FreeShow...
libva error on Linux can be ignored
Loading main window content
REMOTE on: 5510
STAGE on: 5511
[97544:0104/092029.063932:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 1 times!
[97544:0104/092029.070607:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 2 times!
[97544:0104/092029.076130:ERROR:gl_surface_presentation_helper.cc(260)] GetVSyncParametersIfAvailable() failed for 3 times!
Capture - starting: default
Checking for update

It will throw exception like this

image

@odlg
Copy link
Author

odlg commented Jan 4, 2024

Aarh, yes, you need the workaround mentioned in #352 (comment)

@yanguoyu
Copy link

yanguoyu commented Jan 4, 2024

Hmm... I also found this: AppImage/AppImageKit#1092 (comment) Does that work?

Thanks, I mistakenly thought that the action was executed on the package machine. It was needed to execute on my computer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants