uhop / node-re2

node.js bindings for RE2: fast, safe alternative to backtracking regular expression engines.
Other
495 stars 53 forks source link

with snap node on aarch64 it doesnt build #154

Closed ledlamp closed 1 month ago

ledlamp commented 1 year ago

it seems if you're on aarch64 (oracle free for example) and you use the snap node (cause it's convenient ya know), it installs without error when it actually has no build and then errors with Cannot find module './build/Release/re2'. even with build tools and node-gyp installed it doesnt install the build.

once you install real nodejs (i.e. nodesource) it works fine.

on amd64 it works with snap.

so i think it fails because of snap containerizing or something and there's no node-gyp in there, and the problem is the install script fails silently

uhop commented 1 year ago

No idea how to test this specific case and how to make failing more prominent. Contributions are welcome.

0pt1m1z3r commented 12 months ago

I got the same problem. The last version works for me is 1.18.0.

viceice commented 7 months ago

this will probably fixed automatically when #193 is released

ildardevico commented 7 months ago

I faced the same issue using old eol node version v14.15.1 if it helps someone. Downgrading to 1.18.0 worked even with old node js version

brettz9 commented 3 months ago

Not sure if this is the same issue... On eslint-plugin-jsdoc, re2 is part of our tooling chain and failing during install as per https://github.com/gajus/eslint-plugin-jsdoc/actions/runs/9865922189/job/27243770093?pr=1257 (with Node 22 only, not earlier versions)

uhop commented 3 months ago

Not sure if this is the same issue...

This is an actionable info. Thank you.

I see some compiler errors in nan.h and include/node/*.h files. The former file comes with the nan dependency, which cannot support newer versions of Node if it had breaking changes. The latter ones come from Node that you use.

TL;DR: I suggest to upgrade to the latest re2 version (1.21.3) and try again. Unfortunately the newer versions of Node require recompiling the C++ code with newer nan.

Please let me know if it worked for you.

brettz9 commented 3 months ago

Thank you... May be a while as I wait on a PR to be merged, but plan to let you know how it goes.

brettz9 commented 3 months ago

With an updated version in use, it is passing now--thanks very much for your help!