Optware / Optware-ng

279 stars 52 forks source link

node v6.3.1 package - npm returns "Illegal instruction" on ASUS RT-AC68U #167

Closed kun1he2 closed 7 years ago

kun1he2 commented 7 years ago

Been trying to install homebridge via various methods on my ASUS RT-AC68U without much success.

Realized that Optware-NG package listing includes node v6.3.1, so went ahead and renamed the default asusware.arm folder and followed the Optware-NG installation instructions at: https://www.hqt.ro/how-to-install-new-generation-optware/

After successful "ipkg install node", doing a "node -v" returns "v6.3.1"... hurray! However, doing a "npm -v" returns the dreaded "Illegal instruction" error... sigh!

Looks like an incompatible binary was included in the node package?

alllexx88 commented 7 years ago

Issue confirmed. After some investigation, looks like SIGILL is thrown on some floating point operations, like static_cast<double>() or reinterpret_cast<const double*>(). I patched node to build without any FPU instructions (at least, seemingly), however, this doesn't help. For now, marking package as broken for softfloat arm targets

alllexx88 commented 7 years ago

After some investigation, it appears that current node lists vfpv2 as a minimum floating point instructions set supported, which means that ARMv7 without an FPU can't run node. As appears from this page, the newest node version that works on ARM without an FPU is 0.10.X series. I've added node010 package that works on FPUless ARMv7, but don't expect much: unfortunately, it's missing quite a few modern node features, e.g., don't attempt to upgrade npm...

alllexx88 commented 7 years ago

Closing for now