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

Linux arm64 deb points to x86_64 pty.node #159

Closed
thatguyatgithub opened this issue Jun 8, 2023 · 15 comments · Fixed by #160
Closed

Linux arm64 deb points to x86_64 pty.node #159

thatguyatgithub opened this issue Jun 8, 2023 · 15 comments · Fixed by #160

Comments

@thatguyatgithub
Copy link

Fresh install is not working with version 6.5.2-309-309

> open-lens   
innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /opt/OpenLens/resources/app.asar/node_modules/node-pty/lib/unixTerminal.js
- /opt/OpenLens/resources/app.asar/node_modules/node-pty/lib/index.js
- /opt/OpenLens/resources/app.asar/node_modules/@k8slens/core/static/build/library/main.js
- /opt/OpenLens/resources/app.asar/static/build/main.js
- 
    at Module._resolveFilename (node:internal/modules/cjs/loader:963:15)
    at n._resolveFilename (node:electron/js2c/browser_init:2:109751)
    at Module._load (node:internal/modules/cjs/loader:811:27)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1035:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/opt/OpenLens/resources/app.asar/node_modules/node-pty/lib/unixTerminal.js:30:15)
    at Module._compile (node:internal/modules/cjs/loader:1141:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1196:10)
    at Module.load (node:internal/modules/cjs/loader:1011:32) {
  code: 'MODULE_NOT_FOUND',
  requireStack: [
    '/opt/OpenLens/resources/app.asar/node_modules/node-pty/lib/unixTerminal.js',
    '/opt/OpenLens/resources/app.asar/node_modules/node-pty/lib/index.js',
    '/opt/OpenLens/resources/app.asar/node_modules/@k8slens/core/static/build/library/main.js',
    '/opt/OpenLens/resources/app.asar/static/build/main.js',
    undefined
  ]
}
A JavaScript error occurred in the main process
Uncaught Exception:
Error: /opt/OpenLens/resources/app.asar.unpacked/node_modules/node-pty/build/Release/pty.node: cannot open shared object file: No such file or directory
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:2:1822)
    at Module._extensions..node (node:internal/modules/cjs/loader:1226:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:2:2049)
    at Module.load (node:internal/modules/cjs/loader:1011:32)
    at Module._load (node:internal/modules/cjs/loader:846:12)
    at f._load (node:electron/js2c/asar_bundle:2:13330)
    at Module.require (node:internal/modules/cjs/loader:1035:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/opt/OpenLens/resources/app.asar/node_modules/node-pty/lib/unixTerminal.js:26:11)
    at Module._compile (node:internal/modules/cjs/loader:1141:14)
[193532:0607/233710.223407:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.223555:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.223647:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.223677:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.223697:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.223717:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.223735:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.224444:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.224464:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.224483:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.224503:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.224523:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.224541:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)
[193532:0607/233710.224560:ERROR:gbm_wrapper.cc(255)] Failed to export buffer to dma_buf: No such file or directory (2)

File is present but it's built against x86_64 instead of target arch, Linux arm64 in this case:

        not a dynamic executable

─> file /opt/OpenLens/resources/app.asar.unpacked/node_modules/node-pty/build/Release/pty.node    
/opt/OpenLens/resources/app.asar.unpacked/node_modules/node-pty/build/Release/pty.node: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=eeb4c2c5dd10b9aaf3d07790fe81f90565ba2a34, not stripped
@jkroepke
Copy link
Collaborator

At the moment, it feels like an issue in the builder framework which is not in our control

> electron-builder --publish onTag --arm64
  • electron-builder  version=23.6.0 os=5.15.0-1038-azure
  • publishing will be skipped  reason=current build is a part of pull request solution=set env PUBLISH_FOR_PULL_REQUEST to true to force code signing
There are serious security concerns with PUBLISH_FOR_PULL_REQUEST=true (see the  CircleCI documentation (https://circleci.com/docs/1.0/fork-pr-builds/) for details)
If you have SSH keys, sensitive env vars or AWS credentials stored in your project settings and untrusted forks can make pull requests against your repo, then this option isn't for you.
  • loaded configuration  file=package.json ("build" field)
  • rebuilding native dependencies  dependencies=node-pty@0.10.1 platform=linux arch=arm64
  • packaging       platform=linux arch=arm64 electron=22.3.3 appOutDir=dist/linux-arm64-unpacked
  • downloading     url=https://github.com/electron/electron/releases/download/v22.3.3/electron-v22.3.3-linux-arm64.zip size=94 MB parts=4
  • downloaded      url=https://github.com/electron/electron/releases/download/v22.3.3/electron-v22.3.3-linux-arm64.zip duration=1.174s
  • building        target=AppImage arch=arm64 file=dist/OpenLens-6.5.2-314.arm64.AppImage
  • building        target=deb arch=arm64 file=dist/OpenLens-6.5.2-314.arm64.deb
  • building        target=rpm arch=arm64 file=dist/OpenLens-6.5.2-314.aarch64.rpm

 

 >  NX   Successfully ran target build:app for project open-lens and 36 tasks it depends on

   Nx read the output from the cache instead of running the command for 36 out of 37 tasks.

./open-lens/dist/linux-arm64-unpacked/resources/app.asar.unpacked/node_modules/node-pty/build/Release/pty.node:          ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=eeb4c2c5dd10b9aaf3d07790fe81f90565ba2a34, not stripped
./open-lens/dist/linux-arm64-unpacked/resources/app.asar.unpacked/node_modules/node-pty/bin/linux-x64-110/node-pty.node: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, BuildID[sha1]=eeb4c2c5dd10b9aaf3d07790fe81f90565ba2a34, not stripped

@thatguyatgithub
Copy link
Author

Should I file this issue on https://github.com/lensapp/lens ? What do you suggest me doing?

@jkroepke
Copy link
Collaborator

jkroepke commented Jun 10, 2023

You can try this, however not sure if they interest into cross-compile issues.


And the issue might be not in lens, except they are using outdated version. The root cause maybe in the tool electron-builder, which should handle the re-compile.

@thatguyatgithub
Copy link
Author

And the issue might be not in lens, except they are using outdated version. The root cause maybe in the tool electron-builder, which should handle the re-compile.

Okey, makes tons of sense, do you have any clue what could I do to workaround this? I'm really really needing to make it work and it seems I'm so close that I want to cry.

@jkroepke
Copy link
Collaborator

Build lens on your local system could help

@Grinch321
Copy link

Hello @jkroepke Did you able to built it on your local computer?

@jkroepke
Copy link
Collaborator

Yes. I able to build it on my mac machine

@jkroepke
Copy link
Collaborator

About the issue, I looked a bit deeper into it and I could figure out that just running "npm rebuild" wont work too. The error is somewhere outside electron-builder and lens... I can not identity the issue, why cross-compile works on Mac, but not on Linux

@jkroepke
Copy link
Collaborator

jkroepke commented Jun 15, 2023

@thatguyatgithub @Grinch321

I created a possible solution in #160 .

Are you able to validate, if the arm64 binary build are working?

You can find the binary in https://github.com/MuhammedKalkan/OpenLens/actions/runs/5283410533 -> OpenLens-ubuntu-20.04

@thatguyatgithub
Copy link
Author

Woohoo! You are a god! It workkks!

@jkroepke
Copy link
Collaborator

thanks for the confirmation

@thatguyatgithub
Copy link
Author

Are you kidding, thanks to you for your awesome magic! <3 Thanks a bunch!

@Grinch321
Copy link

it's working on my Chromebook , finally I will have lens on it. Many thanks to you)

@Robing
Copy link

Robing commented Aug 15, 2023

@jkroepke I have the same issue,you builded the binary is Expired,do you have any url to download the binary? thx

@jkroepke
Copy link
Collaborator

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 a pull request may close this issue.

4 participants