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 arm platforms #5907

Merged
merged 37 commits into from
Mar 26, 2022
Merged

Add support for arm platforms #5907

merged 37 commits into from
Mar 26, 2022

Conversation

Jai-JAP
Copy link
Contributor

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

Add support for

  • Linux armv7l, arm64
  • Windows arm64

Closes #3947, #2694, #1492

@Jai-JAP Jai-JAP marked this pull request as draft March 8, 2022 17:49
@Eugeny
Copy link
Owner

Eugeny commented Mar 8, 2022

Looking great, can't wait to test 👍

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Mar 9, 2022

Quick Status update:
Got Linux armv7l, arm64 builds working

@Issues-translate-bot
Copy link
Collaborator

The translator bot has detected that this issue body's language is not English, and has translated it automatically.


Quick Status update:
Got Linux arm64 builds working

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Mar 9, 2022

Quick Status update:
Got Windows arm64 builds working

@Jai-JAP Jai-JAP marked this pull request as ready for review March 9, 2022 06:13
@Issues-translate-bot
Copy link
Collaborator

The translator bot has detected that this issue body's language is not English, and has translated it automatically.


Quick Status update:
For Windows arm64 builds working

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Mar 9, 2022

Here are the build artifacts
https://github.com/Jai-JAP/tabby/actions/runs/1955581847

GitHub
A terminal for a more modern age. Contribute to Jai-JAP/tabby development by creating an account on GitHub.

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Mar 9, 2022

@Eugeny
running Linux armv7l or arm64 build gives the below log and hangs
any ideas ..?

innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /opt/Tabby/resources/app.asar/node_modules/@tabby-gang/node-pty/lib/unixTerminal.js
- /opt/Tabby/resources/app.asar/node_modules/@tabby-gang/node-pty/lib/index.js
- /opt/Tabby/resources/app.asar/dist/main.js
- 
    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 Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (/opt/Tabby/resources/app.asar/node_modules/v8-compile-cache/v8-compile-cache.js:159:20)
    at Object.<anonymous> (/opt/Tabby/resources/app.asar/node_modules/@tabby-gang/node-pty/lib/unixTerminal.js:33:15)
    at Module._compile (/opt/Tabby/resources/app.asar/node_modules/v8-compile-cache/v8-compile-cache.js:192:30)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1169:10)
    at Module.load (node:internal/modules/cjs/loader:988:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/opt/Tabby/resources/app.asar/node_modules/@tabby-gang/node-pty/lib/unixTerminal.js',
    '/opt/Tabby/resources/app.asar/node_modules/@tabby-gang/node-pty/lib/index.js',
    '/opt/Tabby/resources/app.asar/dist/main.js',
    undefined
  ]
}
[28747:0309/123501.087413:ERROR:nss_util.cc(286)] After loading Root Certs, loaded==false: NSS error code: -8018

@Jai-JAP Jai-JAP marked this pull request as draft March 9, 2022 07:09
@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Mar 9, 2022

Windows arm64 is untested

@Eugeny
Copy link
Owner

Eugeny commented Mar 9, 2022

That means that Node couldn't load the app/node_modules/@tabby-gang/node-pty/build/Release/pty.node native module, likely because it didn't get compiled for the correct arch. You can get the exact error by creating a 1.js file in the repo root with the following content

require('./app/node_modules/@tabby-gang/node-pty/build/Release/pty.node')

and running it as yarn electron 1.js

P.S. the module is built by electron-rebuild via ./scripts/build-native.js

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Mar 9, 2022

The output of yarn electron 1.js

yarn run v1.19.1
$ /home/runner/work/tabby/tabby/node_modules/.bin/electron 1.js
/home/runner/work/tabby/tabby/node_modules/electron/dist/electron exited with signal SIGTRAP
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@Jai-JAP Jai-JAP marked this pull request as ready for review March 25, 2022 11:31
@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Mar 25, 2022

Windows arm64 builds are confirmed working

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Mar 25, 2022

Linux arm builds compiled by me on a RPi4 are located at https://github.com/jai-jap/tabby-arm-builds/releases
Confirmed working

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Mar 25, 2022

Build artifacts for the latest commit can be found here

Windows arm64 portable is known working but the installer should also work as building arm64 is supported natively on Windows and Mac OS by electron

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Mar 25, 2022

This is now ready to merge in my view
@Eugeny have a look

@Eugeny
Copy link
Owner

Eugeny commented Mar 25, 2022

Fantastic 👍

Is the electron==17.0.0 downgrade still necessary on Linux?

@theofficialgman
Copy link

theofficialgman commented Mar 25, 2022

I don't see why the Jai-JAP says the electron downgrade is necessary.
When I look at the electron releases on the github https://github.com/electron/electron/releases/tag/v17.2.0, prebuilts for ia32 (x86), x64 (x86_64), armv7l, and arm64 linux are all there

GitHub
Release Notes for v17.2.0 Features

Added ses.setCodeCachePath() API for setting code cache directory. #33285 (Also in 18)

Fixes

Fire 'show' event when a BrowserWindow is shown via maximize(). #3...

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Mar 26, 2022

Fantastic 👍

Is the electron==17.0.0 downgrade still necessary on Linux?

Yes since for electron >= 17.0.1 compiling v8 engine results in error same as in this comment

@Eugeny
Copy link
Owner

Eugeny commented Mar 26, 2022

Got it - fantastic work!

@allcontributors
Copy link
Contributor

@Eugeny

I couldn't determine any contributions to add, did you specify any contributions?
Please make sure to use valid contribution names.

@Eugeny Eugeny merged commit 40e0bcc into Eugeny:master Mar 26, 2022
@Eugeny
Copy link
Owner

Eugeny commented Mar 26, 2022

@allcontributors please add @Jai-JAP for platform

@allcontributors
Copy link
Contributor

@Eugeny

I've put up a pull request to add @Jai-JAP! 🎉

@Eugeny
Copy link
Owner

Eugeny commented Apr 5, 2022

@Jai-JAP the PR accidentally broke x86_64 Windows builds - I've fixed it in 95ae4b8 but could you please double-check that the arm64 build is still working after this?

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Apr 5, 2022

I will check this later as i am busy with exams. Maybe it will take 1 or 2 days

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Apr 6, 2022

@Jai-JAP the PR accidentally broke x86_64 Windows builds - I've fixed it in 95ae4b8 but could you please double-check that the arm64 build is still working after this?

No they don't as Windows arm64 build artifacts are the x64 builds with other name and not arm64 ones

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Apr 6, 2022

process.env.ARCH = process.env.ARCH ?? (process.arch === 'arm' ? 'armv7l' : process.arch)

the ?? in this line seems to be the issue. I think it should be ||
Also the brackets may be the issue too

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Apr 6, 2022

Probably fixed in #6106

@mirogl
Copy link

mirogl commented Apr 21, 2022

Hi,
I tested release 1.0.176 Windows arm64 portable. Just unpacked it and created an empty data dir in the new directory.
When i start Tabby.exe from cmd i get 👍

C:\Users\miros\Downloads\tabby>
reset user data to C:\Users\miros\Downloads\tabby\data
[27940:0421/101508.583:ERROR:gpu_init.cc(446)] Passthrough is not supported, GL is disabled, ANGLE is

But i don't get any Window.

I habe a Surface Pro X with SQ2 Arm64 processor and Windows 11 Version 10.0.22000 Build 22000

Thanks
Miro

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Apr 21, 2022

@mirogl Can you try adding --disable-gpu to i.e., args run the command Tabby.exe --disable-gpu

Also let's continue this in a new issue if this doesn't work

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Apr 21, 2022

Also if it doesn't work delete all tabby folders in %APPDATA% and also in downloads and try again

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Apr 21, 2022

@Eugeny this is not related to tabby and is likely an issue with electron/chromium itself. See electron/electron#32317

@mirogl
Copy link

mirogl commented Apr 21, 2022

Also if it doesn't work delete all tabby folders in %APPDATA% and also in downloads and try again

Hi,thanks - i deleted %APPDATTA%\tabby and the existing Folder under Downloads. After a Reboot i unpacked tabby-1.0.176-portable-arm64.zip and created a emoty data direcoty in the extracted dir.

Still hangs at:

C:\Users\miros\Downloads\tabby-1.0.176-portable-arm64>
reset user data to C:\Users\miros\Downloads\tabby-1.0.176-portable-arm64\data

Cheers
Miro

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Apr 22, 2022

@mirogl can you open a new issue with all details

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.

Support Linux ARM
6 participants