Coder Social home page Coder Social logo

Comments (8)

trusktr avatar trusktr commented on June 15, 2024

Update. Yep, I was able to install before! I've pinned my dependencies,

		"glfw-raub": "4.6.0",
		"webgl-raub": "2.2.4",

without the ^ and now I'm back in business. The newer releases are missing the binary.

from webgl-raub.

trusktr avatar trusktr commented on June 15, 2024

Ah, I'm not back in business. The npm install now works with the pinned versions, but this at least allows me to npm install locally in my super repo, and then the rest (f.e. tests) I can run on Linux CI.

Locally on M2 I get:

[Error] There was a problem loading [/Users/trusktr/src/lume+lume/packages/glas/as-pect.config.cjs].
Error: dlopen(/Users/trusktr/src/lume+lume/packages/glas/node_modules/segfault-raub/bin-osx/segfault.node, 0x0001):
tried: '/Users/trusktr/src/lume+lume/packages/glas/node_modules/segfault-raub/bin-osx/segfault.node'
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')),
'/System/Volumes/Preboot/Cryptexes/OS/Users/trusktr/src/lume+lume/packages/glas/node_modules/segfault-raub/bin-osx/segfault.node' (no such file),
'/Users/trusktr/src/lume+lume/packages/glas/node_modules/segfault-raub/bin-osx/segfault.node'
(mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64'))
    at Module._extensions..node (node:internal/modules/cjs/loader:1243:18)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/Users/trusktr/src/lume+lume/packages/glas/node_modules/segfault-raub/index.js:12:15)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
    at Module.load (node:internal/modules/cjs/loader:1037:32)
    at Module._load (node:internal/modules/cjs/loader:878:12)
    at Module.require (node:internal/modules/cjs/loader:1061:19)
    at require (node:internal/modules/cjs/helpers:103:18)
    at Object.<anonymous> (/Users/trusktr/src/lume+lume/packages/glas/node_modules/webgl-raub/core.js:3:1)
    at Module._compile (node:internal/modules/cjs/loader:1159:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1213:10) {
  code: 'ERR_DLOPEN_FAILED'
}
Failed with exit code: 1

So it looks like the new version tries to fetch the actually-correct binary, which doesn't exist yet.

Can I help get this binary published for you, if you don't have this architecture to compile on? If so, I need some guidance on the steps. Open to a video call to make this easier?

from webgl-raub.

raub avatar raub commented on June 15, 2024

Hello. The older versions make no distinction between processor architectures, this is why you've been able to download the binaries, but those are the wrong binaries. I've started expanding the list of supported platforms recently, and that is why the latest version "knows" you need an ARM64 binary.

I'm currently working on segfault-raub package to try and put together a fully automated build action, along with Linux ARM64 support and the improved features. I was able to use a free Linux ARM64 machine from Oracle Cloud to host a GitHub Action runner. I wonder if there is a similar opportunity to host an OSX ARM runner, but Oracle Cloud seems to only have x86_64 (as GitHub also does). That would greatly help in establishing a robust multiplatform environment for future builds and other CI stuff.

Other than that, we may try to build the libraries on M2 manually for now. To do so, we'll also need to build some other third-party binaries (such as glew) and build other dependency modules (such as segfault-raub). Please let me know which module you want to fully build and use, so that I can infer all the dependencies and come up with a build plan. For example, if you only need webgl-raub, we will ignore image-raub and glfw-raub related binaries.

Then we can actually try to build the binaries in a video call. My local time is GMT+4, I think we could use Google Meet or Zoom, but I'm open to other suggestions.

from webgl-raub.

trusktr avatar trusktr commented on June 15, 2024

Hey, Google Meet should work fine. It would be sweet if GitHub Actions had ARM. So far I need only webgl-raub and glfw-raub, doing Document.setWebgl(webgl) then a few small custom polyfills/mocks as needed. I'm using it here for example:

https://github.com/lume/glas/blob/acde4d6b9d11a06f51aa358f1de762a7653685e7/as-pect.config.cjs#L11-L24

from webgl-raub.

trusktr avatar trusktr commented on June 15, 2024

Maybe this can help: https://github.com/uraimo/run-on-arch-action

from webgl-raub.

raub avatar raub commented on June 15, 2024

The run-on-arch-action is interesting but doesn't seem to provide any macOS images.

I think the hardest part is going to be building the M2 binaries here: https://github.com/node-3d/deps-opengl-raub. I'm going to also research the cross-compilation options, unsure if they exist on OSX. I'll follow up on cross-compilation research results.

from webgl-raub.

trusktr avatar trusktr commented on June 15, 2024

Hello Luis! Sounds good. Keep us posted. :) The project is on pause for now, because focused on a new TS-to-Wasm compile process, but will circle back once that's in good enough shape to resume running Wasm WebGL in Node.js.

from webgl-raub.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.