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

Cross Compile linux armhf/arm64 artifacts #8613

Merged
merged 47 commits into from Jun 26, 2023
Merged

Conversation

Jai-JAP
Copy link
Contributor

@Jai-JAP Jai-JAP commented Jun 24, 2023

@Eugeny
This (finally!!) implements a better way to compile tabby for arm linux platforms than docker, quite complex than before but faster.
Completes in ~25-35 mins as compared to ~2 hours with docker based compilation method used previously.

EDIT: Also added AppImage target for linux

Previous approach is still left commented in place.
TESTED working on both arm64 and armhf

Also updated dependency from @tabby-gang/node-pty to note-pty as it has a new beta release in March. (Feel free to discard this.)

Add better cross-compilation support to scripts/vars.mjs

Prefer squash merge on this PR due to its dirty commit history.

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Jun 25, 2023

Also tabby doesn't show proper icon in taskbar for RPiOS
Screenshot

@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Jun 25, 2023

This PR is now Ready to Merge

@Eugeny
Copy link
Owner

Eugeny commented Jun 26, 2023

WOW amazing work @Jai-JAP !

@Eugeny Eugeny merged commit a7ca0fb into Eugeny:master Jun 26, 2023
10 checks passed
@Jai-JAP
Copy link
Contributor Author

Jai-JAP commented Jun 26, 2023

@Eugeny have you seen any error as below. I incurred this when trying to get builds with node18 with an even better alternative method.

Error log
error /home/runner/work/tabby/tabby/app/node_modules/keytar: Command failed.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
Exit code: 1
Command: prebuild-install || npm run build
Arguments: 
Directory: /home/runner/work/tabby/tabby/app/node_modules/keytar
Output:
prebuild-install WARN install No prebuilt binaries found (target=3 runtime=napi arch=arm libc= platform=linux)
npm WARN lifecycle The node binary used for scripts is /tmp/yarn--1687687137895-0.09696465319662795/node but npm is using /opt/hostedtoolcache/node/18.16.1/x64/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> keytar@7.9.0 build /home/runner/work/tabby/tabby/app/node_modules/keytar
> node-gyp rebuild

(node:25573) [DEP0150] DeprecationWarning: Setting process.config is deprecated. In the future the property will be read-only.
(Use `node --trace-deprecation ...` to show where the warning was created)
Traceback (most recent call last):
  File "/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py", line 16, in <module>
    sys.exit(gyp.script_main())
  File "/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 545, in script_main
    return main(sys.argv[1:])
  File "/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 538, in main
    return gyp_main(args)
  File "/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 514, in gyp_main
    options.duplicate_basename_check)
  File "/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/__init__.py", line 130, in Load
    params['parallel'], params['root_targets'])
  File "/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 2778, in Load
    variables, includes, depth, check, True)
  File "/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 394, in LoadTargetBuildFile
    includes, True, check)
  File "/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 266, in LoadOneBuildFile
    aux_data, includes, check)
  File "/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 303, in LoadBuildFileIncludesIntoDict
    LoadOneBuildFile(include, data, aux_data, None, False, check),
  File "/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/input.py", line 246, in LoadOneBuildFile
    None)
  File "/home/runner/.node-gyp/18.16.1/include/node/common.gypi", line 1
    e_data_file_flag%': 1
                        ^
SyntaxError: EOL while scanning string literal
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/lib/configure.js:336:16)
gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.15.0-1040-azure
gyp ERR! command "/opt/hostedtoolcache/node/18.16.1/x64/bin/node" "/home/runner/work/tabby/tabby/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/runner/work/tabby/tabby/app/node_modules/keytar
gyp ERR! node -v v18.16.1
gyp ERR! node-gyp -v v3.6.2
gyp ERR! not ok 
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! keytar@7.9.0 build: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the keytar@7.9.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /home/runner/.npm/_logs/2023-06-25T09_59_06_738Z-debug.log

And do you have discord or any other social media where I can DM you to discuss these and keep these threads clean.

@Eugeny
Copy link
Owner

Eugeny commented Jun 26, 2023

No, haven't seen this before. Can you maybe check if there's a newer keytar version available?

@Eugeny
Copy link
Owner

Eugeny commented Jun 26, 2023

btw I'm only on twitter (in my profile) but IMO Github is better for this :)

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.

None yet

2 participants