cbc5691ab2
Node modules available on the npm registry, may contain prebuild binaries for various targets and/or ABIs; for example., there might be ARM. AArch64, x86_64 binaries for glibc or musl, for Linux or Darwin. Needless to say, those binaries will most often not match the current target architecture; as such, check-bin-arch will whine loudly as reported in #15823: ERROR: architecture for "/usr/lib/node_modules/node-red-node-serialport/node_modules/@serialport/bindings-cpp/prebuilds/linux-arm/node.napi.armv6.node" is "ARM", should be "AArch64" ERROR: architecture for "/usr/lib/node_modules/node-red-node-serialport/node_modules/@serialport/bindings-cpp/prebuilds/android-arm/node.napi.armv7.node" is "ARM", should be "AArch64" ERROR: architecture for "/usr/lib/node_modules/node-red-node-serialport/node_modules/@serialport/bindings-cpp/prebuilds/linux-arm/node.napi.armv7.node" is "ARM", should be "AArch64" ERROR: architecture for "/usr/lib/node_modules/node-red-node-serialport/node_modules/@serialport/bindings-cpp/prebuilds/linux-x64/node.napi.glibc.node" is "Advanced Micro Devices X86-64", should be "AArch64" ERROR: architecture for "/usr/lib/node_modules/node-red-node-serialport/node_modules/@serialport/bindings-cpp/prebuilds/linux-x64/node.napi.musl.node" is "Advanced Micro Devices X86-64", should be "AArch64" The proper solution would be to remove all those prebuilt binaries, and request npm to forcefully rebuild the proper binary for the current architecture; alas, there is no option to tell npm to do so. Doing it manually would not be easy either, as such modules might be retrieved as part of the "vendoring" for another module that the user has requested, and be pretty deep in the dependency chain; trying to fix this properly would be a nightmare: it would require that we manually inspect the depednency chain, and install dependent modules one by one, recursively, re-implementing the same logic npm has when multiple verions of the same module are installed as part of different branches of the depenency tree, all while detecting prebuilds and removing them before installing the mpdule (hence decorrelating download and install, which is not trivial to do with npm alone). We also can't simply remove all the prebuilds, because it is not known whether the location ("<module>/prebuilds/") is standardised, or a convention with the path noted somewhere in the package metadata, and how deep they would be in the tree, and whether that could conflict with arbitrary files... Instead, we will consider that npm has a sane heuristic to detect whether it should indeed rebuilt the modules, and that node has a sane heuristic to know which binary to load at runtime, and we will leave the prebuilt binaries in place and just exclude them from being checked. Fixes: https://bugs.busybox.net/show_bug.cgi?id=15823 Signed-off-by: Giulio Benetti <giulio.benetti@benettiengineering.com> Reviewed-by: Yegor Yefremov <yegorslists@googlemail.com> Tested-by: Marcus Hoffmann <marcus.hoffmann@othermo.de> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> |
||
---|---|---|
arch | ||
board | ||
boot | ||
configs | ||
docs | ||
fs | ||
linux | ||
package | ||
support | ||
system | ||
toolchain | ||
utils | ||
.checkpackageignore | ||
.clang-format | ||
.defconfig | ||
.editorconfig | ||
.flake8 | ||
.gitignore | ||
.gitlab-ci.yml | ||
.shellcheckrc | ||
CHANGES | ||
Config.in | ||
Config.in.legacy | ||
COPYING | ||
DEVELOPERS | ||
Makefile | ||
Makefile.legacy | ||
README |
Buildroot is a simple, efficient and easy-to-use tool to generate embedded Linux systems through cross-compilation. The documentation can be found in docs/manual. You can generate a text document with 'make manual-text' and read output/docs/manual/manual.text. Online documentation can be found at http://buildroot.org/docs.html To build and use the buildroot stuff, do the following: 1) run 'make menuconfig' 2) select the target architecture and the packages you wish to compile 3) run 'make' 4) wait while it compiles 5) find the kernel, bootloader, root filesystem, etc. in output/images You do not need to be root to build or run buildroot. Have fun! Buildroot comes with a basic configuration for a number of boards. Run 'make list-defconfigs' to view the list of provided configurations. Please feed suggestions, bug reports, insults, and bribes back to the buildroot mailing list: buildroot@buildroot.org You can also find us on #buildroot on OFTC IRC. If you would like to contribute patches, please read https://buildroot.org/manual.html#submitting-patches