Skip to content
This repository has been archived by the owner on Jun 4, 2022. It is now read-only.

Lumo crashes when requireing packages with .node binary #163

Closed
hlolli opened this issue May 15, 2017 · 16 comments
Closed

Lumo crashes when requireing packages with .node binary #163

hlolli opened this issue May 15, 2017 · 16 comments

Comments

@hlolli
Copy link
Collaborator

hlolli commented May 15, 2017

After updating to lumo 1.5, packages that are running with .node binaries won't work, more specifically gyp built modules. In my case I'm using csound-api which requires csound and boost to be installed, but another reproduce-able example can be created if require-ing "netlinkwrapper": "1.0.0".
$ lumo
cljs.user=> (js/require "netlinkwrapper")
crash

These modules can be required with node 7.10.0 without crash.

@anmonteiro
Copy link
Owner

@hlolli Sorry, this regression was introduced in this commit, and should be a very simple fix.

Do you want to put a PR together fixing it?

@hlolli
Copy link
Collaborator Author

hlolli commented May 15, 2017

Yup, I will look into this. Just getting used to setting up the dev env, been waiting 2 hours for boot dev after deleting the binary. So in next few days, thanks for the hint.

@anmonteiro
Copy link
Owner

@hlolli boot dev doesn't produce a binary. If you want a binary, run boot release

@hlolli
Copy link
Collaborator Author

hlolli commented May 15, 2017

lol, so I've been waiting for nothing. ehm.. how do you start lumo without creating a binary :/ ?

@anmonteiro
Copy link
Owner

yarn dev will start the DEV mode Lumo: https://github.com/anmonteiro/lumo/blob/master/package.json#L21.

But this will run under an actual Node.js. To debug this particular problem you'll need to create a binary. Thankfully the fix for this issue is simple: literally revert the change I linked above.

hlolli added a commit to hlolli/lumo that referenced this issue May 15, 2017
hlolli added a commit to hlolli/lumo that referenced this issue May 15, 2017
hlolli added a commit to hlolli/lumo that referenced this issue May 15, 2017
anmonteiro added a commit that referenced this issue May 16, 2017
@anmonteiro
Copy link
Owner

fixed 7ea440a

@kanaka
Copy link

kanaka commented May 18, 2017

Any chance we could get a release for this?

@anmonteiro
Copy link
Owner

I can make a release, but would a link to a nightly build suffice for your immediate needs?

@kanaka
Copy link

kanaka commented May 18, 2017

Yeah, that would be fine.

@anmonteiro
Copy link
Owner

@kanaka #65 (comment)

@hlolli
Copy link
Collaborator Author

hlolli commented Jun 1, 2017

This is still a problem for me from the latest Lumo nightly

Lumo 1.5.0
ClojureScript 1.9.562
Node.js v8.0.0

getting segfaults from (js/require "pacage-using-gyp-or-.node")

@hlolli
Copy link
Collaborator Author

hlolli commented Jun 2, 2017

Does not happen when I run lumo like this
node target/bundle.js -k lumo-cache -c target
Need to solve the heap size problem so that I can compile lumo and see if it comes back.

@anmonteiro
Copy link
Owner

@hlolli this seems odd but I'll reopen. Can you provide the name of a package that fails to execute?

@anmonteiro anmonteiro reopened this Jun 2, 2017
@hlolli
Copy link
Collaborator Author

hlolli commented Jun 2, 2017

My importance is with csound-api for my live-coding environment, but that requires csound to be installed. You can try requireing "netlinkwrapper": "1.0.0" via lumo, I get exactly the same bug.

I built lumo and the binary fails, it differentiates from the nightly build, which gives me segfault, my build just causes the terminal to freeze.

@anmonteiro
Copy link
Owner

I can repro this on Ubuntu. I think the problem might be related to Lumo being statically linked, while the native packages are compiled with a different libc version.

@anmonteiro
Copy link
Owner

fixed in #176

anmonteiro added a commit that referenced this issue Jun 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants