- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 2.9k
 
Open
Description
- I have searched open and closed issues for duplicates
 - I am using Signal-Desktop as provided by the Signal team, not a 3rd-party package.
 
Bug Description
Trying to build from source on aarch64 fails:
yarn install v1.22.19
[1/5] Resolving packages...
[2/5] Fetching packages...
[3/5] Linking dependencies...
warning " > [email protected]" has unmet peer dependency "prop-types@^15.7.2".
warning " > [email protected]" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.1".
warning " > [email protected]" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.1".
warning " > [email protected]" has unmet peer dependency "prop-types@^15.0.0".
warning " > [email protected]" has unmet peer dependency "prop-types@^15.5.7".
warning " > [email protected]" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning " > [email protected]" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
warning " > @storybook/[email protected]" has unmet peer dependency "@storybook/api@^6.4.0".
warning " > @storybook/[email protected]" has unmet peer dependency "@storybook/components@^6.4.0".
warning " > @storybook/[email protected]" has unmet peer dependency "@storybook/core-events@^6.4.0".
warning " > @storybook/[email protected]" has unmet peer dependency "@storybook/theming@^6.4.0".
warning " > @storybook/[email protected]" has unmet peer dependency "require-from-string@^2.0.2".
warning " > [email protected]" has incorrect peer dependency "webpack@^4.0.0".
warning " > [email protected]" has incorrect peer dependency "webpack@^4.0.0".
warning " > [email protected]" has incorrect peer dependency "webpack@^4.0.0".
[4/5] Building fresh packages...
error /build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/better-sqlite3: Command failed.
Exit code: 1
Command: npm run build-release
Arguments: 
Directory: /build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/better-sqlite3
Output:
> [email protected] build-release
> node-gyp rebuild --release
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | arm64
gyp info find Python using Python version 3.10.5 found at "/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v16.16.0/node-v16.16.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v16.16.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v16.16.0/SHASUMS256.txt
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/better-sqlite3/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/build/.cache/node-gyp/16.16.0/include/node/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/build/.cache/node-gyp/16.16.0',
gyp info spawn args   '-Dnode_gyp_dir=/build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/build/.cache/node-gyp/16.16.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/better-sqlite3',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/better-sqlite3/build'
  TOUCH b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
  ACTION deps_sqlite3_gyp_locate_sqlite3_target_extract_sqlite3 b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
  TOUCH Release/obj.target/deps/locate_sqlite3.stamp
  TOUCH Release/obj.target/deps/copy_dll.stamp
  CC(target) Release/obj.target/sqlite3/gen/sqlite3/sqlite3.o
  AR(target) Release/obj.target/deps/sqlite3.a
  COPY Release/sqlite3.a
  CXX(target) Release/obj.target/better_sqlite3/src/better_sqlite3.o
In file included from ./src/better_sqlite3.lzz:11,
                 from ../src/better_sqlite3.cpp:4:
/build/.cache/node-gyp/16.16.0/include/node/node.h:867:7: warning: cast between incompatible function types from 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>)' to 'node::addon_context_register_func' {aka 'void (*)(v8::Local<v8::Object>, v8::Local<v8::Value>, v8::Local<v8::Context>, void*)'} [-Wcast-function-type]
  867 |       (node::addon_context_register_func) (regfunc),                  \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/.cache/node-gyp/16.16.0/include/node/node.h:885:3: note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE_X'
  885 |   NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/.cache/node-gyp/16.16.0/include/node/node.h:916:3: note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE'
  916 |   NODE_MODULE_CONTEXT_AWARE(NODE_GYP_MODULE_NAME,                     \
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~
./src/better_sqlite3.lzz:67:1: note: in expansion of macro 'NODE_MODULE_INIT'
./src/objects/database.lzz: In static member function 'static void Database::JS_new(const v8::FunctionCallbackInfo<v8::Value>&)':
./src/objects/database.lzz:180:21: warning: variable 'status' set but not used [-Wunused-but-set-variable]
./src/util/binder.lzz: In static member function 'static bool Binder::IsPlainObject(v8::Isolate*, v8::Local<v8::Object>)':
./src/util/binder.lzz:37:66: warning: 'v8::Local<v8::Context> v8::Object::CreationContext()' is deprecated: Use MaybeLocal<Context> GetCreationContext() [-Wdeprecated-declarations]
In file included from /build/.cache/node-gyp/16.16.0/include/node/node.h:63:
/build/.cache/node-gyp/16.16.0/include/node/v8.h:4316:18: note: declared here
 4316 |   Local<Context> CreationContext();
      |                  ^~~~~~~~~~~~~~~
./src/util/data.lzz: In function 'v8::Local<v8::Value> Data::GetValueJS(v8::Isolate*, sqlite3_stmt*, int, bool)':
./src/util/data.lzz:73:92: warning: this statement may fall through [-Wimplicit-fallthrough=]
./src/util/data.lzz:73:197: note: here
./src/util/data.lzz: In function 'v8::Local<v8::Value> Data::GetValueJS(v8::Isolate*, sqlite3_value*, bool)':
./src/util/data.lzz:77:81: warning: this statement may fall through [-Wimplicit-fallthrough=]
./src/util/data.lzz:77:175: note: here
  SOLINK_MODULE(target) Release/obj.target/better_sqlite3.node
/usr/bin/ld: cannot find ./Release/obj/gen/sqlite3/OpenSSL-linux-arm64/libcrypto.a: No such file or directory
collect2: error: ld returned 1 exit status
make: *** [better_sqlite3.target.mk:152: Release/obj.target/better_sqlite3.node] Error 1
rm b857c92884e9598d609f6be182a2595df7a8e00f.intermediate
make: Leaving directory '/build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/better-sqlite3/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/node-gyp/lib/build.js:194:23)
gyp ERR! stack     at ChildProcess.emit (node:events:527:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
gyp ERR! System Linux 5.19.0-asahi-1-1-ARCH
gyp ERR! command "/usr/bin/node" "/build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/.bin/node-gyp" "rebuild" "--release"
gyp ERR! cwd /build/signal-desktop/src/Signal-Desktop-5.53.0/node_modules/better-sqlite3
gyp ERR! node -v v16.16.0
gyp ERR! node-gyp -v v9.0.0
gyp ERR! not ok
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
An identical setup on amd64 works fine.
Steps to Reproduce
Essentially following build steps
Actual Result:
Build fails on aarch64, but work on an equivalent amd64 setup (e.g.: same packages, same versions, but everything built for that architecture).
Expected Result:
Should build fine?
Screenshots
n/a
Platform Info
Signal Version: 5.53.0
Operating System: Linux 5.19.0-asahi-1-1-ARCH aarch64 GNU/Linux
Linked Device Version: n/a
Link to Debug Log
n/a
Related issues:
- https://community.signalusers.org/t/signal-desktop-on-arm64-aarch64/9001 Is a feature requires for binaries for phones/Debian.
 - https://community.signalusers.org/t/apple-silicon-support/19659/25 Seems to be more focused on discussing unofficial builds, and not official sources.
 - ARM (aarch64) build for Linux #5841 Is a feature request for binaries, not a bug report for a crash.
 
There's a few other issues, but more of them discuss unofficial binaries, or requesting shipped binaries. They're not about an actual crash when building.
olof-nord, rxhfcy, ez-pzz, huyz, shashanknimje and 1 more