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 aarch64 rpm won't install #103

Closed
griffint61 opened this issue Jan 13, 2023 · 13 comments
Closed

Linux aarch64 rpm won't install #103

griffint61 opened this issue Jan 13, 2023 · 13 comments

Comments

@griffint61
Copy link

Trying to install the aarch64 rpm on AlmaLinux 9.1 (arm edition) gives this error:

Error: 
 Problem: conflicting requests
  - package open-lens-6.3.0-1.arm64 does not have a compatible architecture
(try to add '--skip-broken' to skip uninstallable packages or '--nobest' to use not only best candidate packages)

I tried the three most recent builds, include 6.4.0-alpha.2

@MuhammedKalkan
Copy link
Owner

can you try with beta.9

@griffint61
Copy link
Author

I tried beta.12. The error is:

Error: 
 Problem: conflicting requests
  - package open-lens-6.4.0_beta.12-1.arm64 does not have a compatible architecture

@MuhammedKalkan
Copy link
Owner

try 6.4.0 release

@griffint61
Copy link
Author

griffint61 commented Mar 3, 2023

Same error as before.

I was able to repair the rpm using the rpmrebuild utility as follows:

  • Command: rpmrebuild -enp OpenLens-6.4.0.aarch64.rpm
  • I changed these two lines to replace "arm64" with "aarch64".
#ARCH:         arm64
BuildArch:     arm64
  • Saved and exited.
  • Answered 'y' to the question for continuing.
  • Waited for the rebuild to complete. Result was saved as ~/rpmbuild/RPMS/aarch64/open-lens-6.4.0-1.aarch64.rpm
  • I was able to install that rpm without errors.

This was on done with AlmaLinux 9.1 system running on arm64.

@griffint61
Copy link
Author

The "repaired" RPM doesn't actually work. During startup the error is:

innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:
- /opt/OpenLens/resources/app.asar/node_modules/@k8slens/core/node_modules/node-pty/lib/unixTerminal.js
- /opt/OpenLens/resources/app.asar/node_modules/@k8slens/core/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
- 

I think what it really wants is ../build/Release/pty.node, which does actually exist.

@jkroepke
Copy link
Collaborator

jkroepke commented Mar 6, 2023

If ../build/Release/pty.node is there, what about ldd ../build/Release/pty.node

Normaly, node-pty will look for Release first and on error, it tries to load Debug.

https://github.com/microsoft/node-pty/blob/aa26f321395e09913fd1829adff068bd647740a1/src/unixTerminal.ts#L15-L27

@griffint61
Copy link
Author

File pty.node exists under the Release directory.

ldd says it is "not a dynamic executable".

file says it is an "ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked"

So it looks to be the wrong architecture. It should be ARM 64. That would explain it.

I found the Release error later in the output. The way the try/catch is structured in UnixTerminal.ts, it reports out the Debug error (innerError) before reporting the Release error (outerError). Anyway the Release error is:

Error: /opt/OpenLens/resources/app.asar.unpacked/node_modules/@k8slens/core/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:5:1812)
    at Module._extensions..node (node:internal/modules/cjs/loader:1203:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2039)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/opt/OpenLens/resources/app.asar/node_modules/@k8slens/core/node_modules/node-pty/lib/unixTerminal.js:26:11)
    at Module._compile (node:internal/modules/cjs/loader:1118:14)

@jkroepke
Copy link
Collaborator

jkroepke commented Mar 7, 2023

Hi,

i guess there are multiple errors here...

Maybe the arm64 vs aarch64 mismatch, it seems like an upstream error. Lens is using electron-builder to build rpm.

Here is a condition for if rpm, then aarch64: https://github.com/electron-userland/electron-builder/blob/f6944a3c123f0cee050cbd481cb0916ea46de46f/packages/builder-util/src/arch.ts#L79-L81

but some line above, an additional check for rpm is missing:

https://github.com/electron-userland/electron-builder/blob/f6944a3c123f0cee050cbd481cb0916ea46de46f/packages/builder-util/src/arch.ts#L19-L20

Maybe also is result into additional error. But this is an error, that we can not fix and even the Lens upstream project is not able to resolve the issue. It needs to be reported here: https://github.com/electron-userland/electron-builder

Similar error reported: #52


I may expect something similar with the second error, e.g. that the pty.node is an x86 binary. It seems like there are issues on cross compile, see also: electron-userland/electron-builder#7465

Since GitHub is not proving any arm based runner, we are not able to solve that error. So local builds are the only rescue here.

Not sure, if only rpm is affected here or deb, too......


@MuhammedKalkan maybe its an good idea to disable linux arm build, since they are not usable.

@jkroepke
Copy link
Collaborator

@griffint61 The bug seems fixed upstream now. I guess it needs to released first in electron-builder and the new release needs to be included in Lens.

Thats everything what we can provide here.

@dhaluza
Copy link

dhaluza commented May 8, 2023

A similar error is present in the arm64.deb package. please fix it.
`open-lens
innerError Error: Cannot find module '../build/Debug/pty.node'
Require stack:

  • /opt/OpenLens/resources/app.asar/node_modules/@k8slens/core/node_modules/node-pty/lib/unixTerminal.js
  • /opt/OpenLens/resources/app.asar/node_modules/@k8slens/core/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:940:15)
    at n._resolveFilename (node:electron/js2c/browser_init:245:1105)
    at Module._load (node:internal/modules/cjs/loader:785:27)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (/opt/OpenLens/resources/app.asar/node_modules/@k8slens/core/node_modules/node-pty/lib/unixTerminal.js:30:15)
    at Module._compile (node:internal/modules/cjs/loader:1118:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1173:10)
    at Module.load (node:internal/modules/cjs/loader:988:32) {
    code: 'MODULE_NOT_FOUND',
    requireStack: [
    '/opt/OpenLens/resources/app.asar/node_modules/@k8slens/core/node_modules/node-pty/lib/unixTerminal.js',
    '/opt/OpenLens/resources/app.asar/node_modules/@k8slens/core/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/@k8slens/core/node_modules/node-pty/build/Release/pty.node: невозможно оÑкÑÑÑÑ ÑазделÑемÑй обÑекÑнÑй Ñ
    айл: Ð Ñакого Ñ
    айла или каÑалога
    at process.func [as dlopen] (node:electron/js2c/asar_bundle:5:1812)
    at Module._extensions..node (node:internal/modules/cjs/loader:1203:18)
    at Object.func [as .node] (node:electron/js2c/asar_bundle:5:2039)
    at Module.load (node:internal/modules/cjs/loader:988:32)
    at Module._load (node:internal/modules/cjs/loader:829:12)
    at c._load (node:electron/js2c/asar_bundle:5:13343)
    at Module.require (node:internal/modules/cjs/loader:1012:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object. (/opt/OpenLens/resources/app.asar/node_modules/@k8slens/core/node_modules/node-pty/lib/unixTerminal.js:26:11)
    at Module._compile (node:internal/modules/cjs/loader:1118:14)

ds@debian:/opt/OpenLens$ ls -la
итого 195432
drwxr-xr-x 4 root root 4096 мая 8 18:03 .
drwxr-xr-x 5 root root 4096 мая 8 14:46 ..
-rw-r--r-- 1 root root 128901 апр 13 04:45 chrome_100_percent.pak
-rw-r--r-- 1 root root 180555 апр 13 04:45 chrome_200_percent.pak
-rwxr-xr-x 1 root root 1092488 апр 13 04:45 chrome_crashpad_handler
-rwsr-xr-x 1 root root 53200 апр 13 04:45 chrome-sandbox
-rw-r--r-- 1 root root 10404784 апр 13 04:45 icudtl.dat
-rwxr-xr-x 1 root root 242472 апр 13 04:45 libEGL.so
-rwxr-xr-x 1 root root 2548480 апр 13 04:45 libffmpeg.so
-rwxr-xr-x 1 root root 6158832 апр 13 04:45 libGLESv2.so
-rwxr-xr-x 1 root root 17360552 апр 13 04:45 libvk_swiftshader.so
-rwxr-xr-x 1 root root 5900816 апр 13 04:45 libvulkan.so.1
-rw-r--r-- 1 root root 1096 апр 13 04:45 LICENSE.electron.txt
-rw-r--r-- 1 root root 5368255 апр 13 04:45 LICENSES.chromium.html
drwxr-xr-x 2 root root 4096 мая 8 18:03 locales
-rwxr-xr-x 1 root root 144481480 апр 13 04:45 open-lens
drwxr-xr-x 5 root root 4096 мая 8 18:03 resources
-rw-r--r-- 1 root root 5137800 апр 13 04:45 resources.pak
-rw-r--r-- 1 root root 341936 апр 13 04:45 snapshot_blob.bin
-rw-r--r-- 1 root root 665184 апр 13 04:45 v8_context_snapshot.bin
-rw-r--r-- 1 root root 107 апр 13 04:45 vk_swiftshader_icd.json
ds@debian:/opt/OpenLens$ cd resources
ds@debian:/opt/OpenLens/resources$ ls -la
итого 267064
drwxr-xr-x 5 root root 4096 мая 8 18:03 .
drwxr-xr-x 4 root root 4096 мая 8 18:03 ..
-rw-r--r-- 1 root root 273444966 апр 13 04:45 app.asar
drwxr-xr-x 3 root root 4096 мая 8 18:03 app.asar.unpacked
drwxr-xr-x 2 root root 4096 мая 8 18:03 arm64
drwxr-xr-x 3 root root 4096 мая 8 18:03 templates

`

@jkroepke
Copy link
Collaborator

jkroepke commented May 8, 2023

@dhaluza thanks for sharing this, we not able to fix this.

@jkroepke
Copy link
Collaborator

Checkout the new 9.5 version, maybe its fixed.

@DmarshalTU
Copy link

same in 6.5:

sudo dnf install OpenLens-6.5.2-366.aarch64.rpm              
Last metadata expiration check: 0:12:51 ago on Sun 04 Feb 2024 04:15:08 PM PST.
allow_vendor_change is disabled. This option is currently not supported for downgrade and distro-sync commands
Error: 
 Problem: conflicting requests
  - package open-lens-6.5.2_366-1.arm64 from @commandline does not have a compatible architecture

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

No branches or pull requests

5 participants