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

Add support for Linux armhf i.e; armv7l #6370

Closed
wants to merge 1 commit into from
Closed

Add support for Linux armhf i.e; armv7l #6370

wants to merge 1 commit into from

Conversation

Jai-JAP
Copy link

@Jai-JAP Jai-JAP commented Mar 8, 2022

electron builder can build armv7l on x64 so this commit adds support for linux armhf devices such as raspberrypi
Closes #2820

@Jai-JAP Jai-JAP mentioned this pull request Mar 8, 2022
@LabhanshAgrawal
Copy link
Collaborator

Did you test it out with some armhf device? r pi or anything.
I do know that electron builder provides this option, but the builds failed to launch when I had tried earlier with qemu, linux on android etc (don't have rpi etc).

@Jai-JAP
Copy link
Author

Jai-JAP commented Mar 9, 2022

Yes it successfully compiled on a rpi4
Here are the built binaries https://github.com/jai-jap/hyper-armhf-builds/releases

Also I am using it on my Pi

@LabhanshAgrawal
Copy link
Collaborator

So you built and tested on rpi itself, right?
Can you test the build that will be generated from our ci?
A comment with the link to that will be posted soon.

@github-actions
Copy link

github-actions bot commented Mar 9, 2022

Hi there,
Thank you for contributing to Hyper!
You can get the build artifacts from here.
Here are screenshots of Hyper built from this pr.
Imgur Images

@Jai-JAP
Copy link
Author

Jai-JAP commented Mar 9, 2022

So you built and tested on rpi itself, right? Can you test the build that will be generated from our ci? A comment with the link to that will be posted soon.

I will test it tomorrow

@Jai-JAP
Copy link
Author

Jai-JAP commented Mar 10, 2022

this build errors out giving

    at Module._resolveFilename (node:internal/modules/cjs/loader:940:15)
    at Function.n._resolveFilename (node:electron/js2c/browser_init:249:1105)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
    at Function._load (/tmp/.mount_Hyper-rUBHOP/resources/app.asar/plugins.js:99:37)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/tmp/.mount_Hyper-rUBHOP/resources/app.asar/node_modules/node-pty/lib/unixTerminal.js:30:15)
    at Module._compile (node:internal/modules/cjs/loader:1116:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/tmp/.mount_Hyper-rUBHOP/resources/app.asar/node_modules/node-pty/lib/unixTerminal.js',
    '/tmp/.mount_Hyper-rUBHOP/resources/app.asar/node_modules/node-pty/lib/index.js',
    '/tmp/.mount_Hyper-rUBHOP/resources/app.asar/session.js',
    '/tmp/.mount_Hyper-rUBHOP/resources/app.asar/ui/window.js',
    '/tmp/.mount_Hyper-rUBHOP/resources/app.asar/index.js',
    undefined
  ]
}
A JavaScript error occurred in the main process
Uncaught Exception:
Error: `node-pty` failed to load. Typically this means that it was built incorrectly. Please check the `readme.md` to more info.
    at createNodePtyError (/tmp/.mount_Hyper-rUBHOP/resources/app.asar/session.js:35:34)
    at Object.<anonymous> (/tmp/.mount_Hyper-rUBHOP/resources/app.asar/session.js:42:11)
    at Module._compile (node:internal/modules/cjs/loader:1116:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at Function.c._load (node:electron/js2c/asar_bundle:5:13331)
    at Function._load (/tmp/.mount_Hyper-rUBHOP/resources/app.asar/plugins.js:99:37)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)

@Jai-JAP
Copy link
Author

Jai-JAP commented Mar 10, 2022

I have to modify the workflow for cross build
gonna post fix soon

@Jai-JAP
Copy link
Author

Jai-JAP commented Mar 10, 2022

This issue also appears with linux arm64 builds giving same error. And theoretically with every arm64 builds as they are improperly cross compiled leaving node-pty compiled for x86_64 even in arm builds

@Jai-JAP
Copy link
Author

Jai-JAP commented Mar 10, 2022

node-pty.node: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=5e9f50a0d8eb59de2c535c68623728922193c815, not stripped

This is the output of file app.asar/node_modules/node-pty/bin/node-pty-node from arm64 deb from the above artifacts app.asar is the folder where app.asar ( grabbed from opt/Hyper/resources ) is extracted using npx asar extract app.asar destfolder npx asar extract opt/Hyper/resources/app.asar app.asar
The output should actually be something like ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, BuildID[sha1]=xxxxxxx....., not stripped
i.e; it should state ARM aarch64 instead of x86_64

@Jai-JAP
Copy link
Author

Jai-JAP commented Mar 10, 2022

Also a similar issue is discussed here to add arm support with cross compiling as required by workflows

@Jai-JAP
Copy link
Author

Jai-JAP commented Mar 14, 2022

Closing this issue for now as cross-comipling isn't easy for node-pty also I would suggest you to remove all arm64 if untested builds as also they are having x86_64 version of node-pty compiled which would not work

@Jai-JAP Jai-JAP closed this Mar 14, 2022
@Jai-JAP
Copy link
Author

Jai-JAP commented Mar 14, 2022

I will reopen this if i find a workaround

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

Successfully merging this pull request may close these issues.

armhf version of hyper for raspberry pi
2 participants