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

LibJS on macOS 10.13.6 #45

Open
dotnetCarpenter opened this issue Jan 2, 2023 · 2 comments
Open

LibJS on macOS 10.13.6 #45

dotnetCarpenter opened this issue Jan 2, 2023 · 2 comments

Comments

@dotnetCarpenter
Copy link

When trying to install LibJS I get an error about not loading liblagom-js.0.dylib: load command 0x80000034 is unknown

node src/bin.js --engines libjs
esvu ❯ version 1.2.11
LibJS ❯ Checking version...
LibJS ❯ Installing version 10147417221/495677505
LibJS ❯ Downloading https://nightly.link/serenityos/serenity/suites/10147417221/artifacts/495677505
LibJS ❯ Extracting /var/folders/70/mdncxjgs3tx0lrvr03_7gd_w0000gn/T/esvu-74bf6cc27e73fb2f518098bc7eeac740
LibJS ❯ Installing /var/folders/70/mdncxjgs3tx0lrvr03_7gd_w0000gn/T/esvu-74bf6cc27e73fb2f518098bc7eeac740-extracted
LibJS ❯ Testing...
esvu ✖ Fatal error installing LibJS Error: Command failed with exit code 134: /Volumes/mystuff/dotnet/.local/share/.esvu/bin/serenity-js -c console.log("42")
dyld: Library not loaded: @rpath/liblagom-js.0.dylib
  Referenced from: /Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/js
  Reason: no suitable image found.  Did find:
	/Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/../lib/liblagom-js.0.dylib: cannot load 'liblagom-js.0.dylib' (load command 0x80000034 is unknown)
	/Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/../lib/liblagom-js.0.dylib: stat() failed with errno=1
/Volumes/mystuff/dotnet/.local/share/.esvu/bin/serenity-js: line 2: 40255 Abort trap: 6           "/Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/js" "$@"
    at makeError (/Volumes/mystuff/dotnet/projects/opensource/esvu/node_modules/execa/lib/error.js:59:11)
    at handlePromise (/Volumes/mystuff/dotnet/projects/opensource/esvu/node_modules/execa/index.js:114:26)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at async LibJSInstaller.test (/Volumes/mystuff/dotnet/projects/opensource/esvu/src/engines/libjs.js:75:8)
    at async Function.install (/Volumes/mystuff/dotnet/projects/opensource/esvu/src/installer.js:110:5)
    at async installEngine (/Volumes/mystuff/dotnet/projects/opensource/esvu/src/bin.js:121:3)
    at async i (/Volumes/mystuff/dotnet/projects/opensource/esvu/src/bin.js:149:7)
    at async updateAll (/Volumes/mystuff/dotnet/projects/opensource/esvu/src/bin.js:160:7)
    at async main (/Volumes/mystuff/dotnet/projects/opensource/esvu/src/bin.js:177:7) {
  shortMessage: 'Command failed with exit code 134: /Volumes/mystuff/dotnet/.local/share/.esvu/bin/serenity-js -c console.log("42")',
  command: '/Volumes/mystuff/dotnet/.local/share/.esvu/bin/serenity-js -c console.log("42")',
  exitCode: 134,
  signal: undefined,
  signalDescription: undefined,
  stdout: '',
  stderr: 'dyld: Library not loaded: @rpath/liblagom-js.0.dylib\n' +
    '  Referenced from: /Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/js\n' +
    '  Reason: no suitable image found.  Did find:\n' +
    "\t/Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/../lib/liblagom-js.0.dylib: cannot load 'liblagom-js.0.dylib' (load command 0x80000034 is unknown)\n" +
    '\t/Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/../lib/liblagom-js.0.dylib: stat() failed with errno=1\n' +
    '/Volumes/mystuff/dotnet/.local/share/.esvu/bin/serenity-js: line 2: 40255 Abort trap: 6           "/Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/js" "$@"',
  failed: true,
  timedOut: false,
  isCanceled: false,
  killed: false
}
esvu ✖ Some engines were not installed.
~/.local/share/.esvu/bin ./serenity-js --version
dyld: Library not loaded: @rpath/liblagom-js.0.dylib
  Referenced from: /Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/js
  Reason: no suitable image found.  Did find:
	/Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/../lib/liblagom-js.0.dylib: cannot load 'liblagom-js.0.dylib' (load command 0x80000034 is unknown)
	/Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/../lib/liblagom-js.0.dylib: stat() failed with errno=1
./serenity-js: line 2: 43471 Abort trap: 6           "/Volumes/mystuff/dotnet/.local/share/.esvu/engines/libjs/bin/js" "$@"

@ADKaster is it because my OS is too old or are my paths messed up?

My ~/.local/share/.esvu/engines/libjs folder contains the following files:

.
├── bin
│   └── js
└── lib
    ├── liblagom-core.0.0.0.dylib
    ├── liblagom-core.0.dylib
    ├── liblagom-core.dylib
    ├── liblagom-crypto.0.0.0.dylib
    ├── liblagom-crypto.0.dylib
    ├── liblagom-crypto.dylib
    ├── liblagom-js.0.0.0.dylib
    ├── liblagom-js.0.dylib
    ├── liblagom-js.dylib
    ├── liblagom-line.0.0.0.dylib
    ├── liblagom-line.0.dylib
    ├── liblagom-line.dylib
    ├── liblagom-locale.0.0.0.dylib
    ├── liblagom-locale.0.dylib
    ├── liblagom-locale.dylib
    ├── liblagom-regex.0.0.0.dylib
    ├── liblagom-regex.0.dylib
    ├── liblagom-regex.dylib
    ├── liblagom-syntax.0.0.0.dylib
    ├── liblagom-syntax.0.dylib
    ├── liblagom-syntax.dylib
    ├── liblagom-textcodec.0.0.0.dylib
    ├── liblagom-textcodec.0.dylib
    ├── liblagom-textcodec.dylib
    ├── liblagom-unicode.0.0.0.dylib
    ├── liblagom-unicode.0.dylib
    └── liblagom-unicode.dylib

2 directories, 28 files

PS. Great video you made for the SerenityOS December update: https://youtu.be/Q3PyN2Ctrpg?t=2384

@ADKaster
Copy link
Contributor

I randomly checked this repo and saw this, sorry about the delay! The CI for serenity used macOS 12(?) At the end of January. I believe it's been upgraded to macOS 13 at this point.

I tested the configuration on an M2 MacBook air running Ventura, so like you suggested I think the issue would be that the CI job is targeting a "too new" base macOS version. The correct fix to get it running on older hosts out of the box is probably to edit the CI job in serenity itself, which lives in the .github/actions folder. I'm not super familiar with how to set the "target os version" in CMake though.

@dotnetCarpenter
Copy link
Author

It might be doable to check how libjs is build on GitHub and then mimic that on my own “too old” machine and see if it builds.
This is just curiosity project for me so it won’t be my first priority but I will write back here when I have tried it out. Eventually

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

2 participants