Description
Attempting to follow the GrapheneOS build instructions on a "AMD Opteron(tm) Processor 6176 SE" system, one step (adevtool generate-all -d PIXEL_CODENAME
) involves, through a whole chain of dependencies, using @node-rs/crc32
.
This processor family does not have SSSE3 or any of the AVXen, and so when napi_register_module_v1
tries to use pshufb
, things go south quite rapidly. gdb
sayeth:
Thread 1 "node" received signal SIGILL, Illegal instruction.
0x00007f60580a8cb6 in napi_register_module_v1 () from /mnt/grapheneos-15-qpr2/vendor/adevtool/node_modules/@node-rs/crc32-linux-x64-gnu/crc32.linux-x64-gnu.node
(gdb) bt
#0 0x00007f60580a8cb6 in napi_register_module_v1 () from /mnt/grapheneos-15-qpr2/vendor/adevtool/node_modules/@node-rs/crc32-linux-x64-gnu/crc32.linux-x64-gnu.node
#1 0x00007f605c4deb3b in napi_module_register_by_symbol(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>, napi_value__* (*)(napi_env__*, napi_value__*), int) () from /lib/x86_64-linux-gnu/libnode.so.108
#2 0x00007f605c4e5a83 in ?? () from /lib/x86_64-linux-gnu/libnode.so.108
#3 0x00007f605c49a3f7 in node::Environment::TryLoadAddon(char const*, int, std::function<bool (node::binding::DLib*)> const&) () from /lib/x86_64-linux-gnu/libnode.so.108
#4 0x00007f605c4e4ef4 in node::binding::DLOpen(v8::FunctionCallbackInfo<v8::Value> const&) () from /lib/x86_64-linux-gnu/libnode.so.108
#5 0x00007f605c948e02 in v8::internal::FunctionCallbackArguments::Call(v8::internal::CallHandlerInfo) () from /lib/x86_64-linux-gnu/libnode.so.108
#6 0x00007f605c9493e4 in ?? () from /lib/x86_64-linux-gnu/libnode.so.108
#7 0x00007f605c949ca7 in v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) () from /lib/x86_64-linux-gnu/libnode.so.108
#8 0x00007f605c7faf79 in ?? () from /lib/x86_64-linux-gnu/libnode.so.108
I have already ensured that /mnt/grapheneos-15-qpr2/vendor/adevtool/node_modules/@node-rs/crc32-linux-x64-gnu/crc32.linux-x64-gnu.node
is the latest version in case it had gotten fixed in the interim (the Android tree uses version 1.7.2 by default):
$ head ./vendor/adevtool/node_modules/@node-rs/crc32-linux-x64-gnu/package.json
{
"name": "@node-rs/crc32-linux-x64-gnu",
"version": "1.10.6",
"cpu": [
"x64"
],
"main": "crc32.linux-x64-gnu.node",
I have absolutely no idea how I would go about building and then using a different version of the library with different CPU architecture flags, so I'll be at someone else's mercy to make this work. :(