Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on aarch64 (M1 Macbook) #6063

Open
2 tasks done
WhyNotHugo opened this issue Aug 9, 2022 · 29 comments · May be fixed by #6936
Open
2 tasks done

Build failure on aarch64 (M1 Macbook) #6063

WhyNotHugo opened this issue Aug 9, 2022 · 29 comments · May be fixed by #6936

Comments

@WhyNotHugo
Copy link
Contributor

  • 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 " > focus-trap-react@8.8.1" has unmet peer dependency "prop-types@^15.7.2".
warning " > react-contextmenu@2.11.0" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.1".
warning " > react-contextmenu@2.11.0" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.1".
warning " > react-contextmenu@2.11.0" has unmet peer dependency "prop-types@^15.0.0".
warning " > react-sortable-hoc@2.0.0" has unmet peer dependency "prop-types@^15.5.7".
warning " > react-virtualized@9.22.3" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning " > react-virtualized@9.22.3" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
warning " > @storybook/addon-knobs@6.4.0" has unmet peer dependency "@storybook/api@^6.4.0".
warning " > @storybook/addon-knobs@6.4.0" has unmet peer dependency "@storybook/components@^6.4.0".
warning " > @storybook/addon-knobs@6.4.0" has unmet peer dependency "@storybook/core-events@^6.4.0".
warning " > @storybook/addon-knobs@6.4.0" has unmet peer dependency "@storybook/theming@^6.4.0".
warning " > @storybook/react@6.5.6" has unmet peer dependency "require-from-string@^2.0.2".
warning " > css-loader@3.2.0" has incorrect peer dependency "webpack@^4.0.0".
warning " > file-loader@4.2.0" has incorrect peer dependency "webpack@^4.0.0".
warning " > style-loader@1.0.0" 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:
> better-sqlite3@7.5.0 build-release
> node-gyp rebuild --release

gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@16.16.0 | 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:

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.

@indutny-signal
Copy link
Contributor

Sorry about that. Could you try installing node 16.13.2 and giving it another go, please?

@mkurz
Copy link

mkurz commented Aug 10, 2022

It would be so awesome if there would be an offical Signal distribution for aarch64 (M1)....

@awaitlink
Copy link
Contributor

@mkurz

It would be so awesome if there would be an offical Signal distribution for aarch64 (M1)....

For macOS there is, the version at https://signal.org/download/ is universal. If you're already using Signal Desktop on an Apple silicon device, I think the auto-updater should've updated you to the native version already.

For official support of aarch64 on Windows and Linux, there's a feature request on the community forum.

@WhyNotHugo
Copy link
Contributor Author

Sorry about that. Could you try installing node 16.13.2 and giving it another go, please?

I've given that a try, also failed:

yarn install v1.22.19
[1/5] Resolving packages...
[2/5] Fetching packages...
[3/5] Linking dependencies...
warning " > focus-trap-react@8.8.1" has unmet peer dependency "prop-types@^15.7.2".
warning " > react-contextmenu@2.11.0" has incorrect peer dependency "react@^0.14.0 || ^15.0.0 || ^16.0.1".
warning " > react-contextmenu@2.11.0" has incorrect peer dependency "react-dom@^0.14.0 || ^15.0.0 || ^16.0.1".
warning " > react-contextmenu@2.11.0" has unmet peer dependency "prop-types@^15.0.0".
warning " > react-sortable-hoc@2.0.0" has unmet peer dependency "prop-types@^15.5.7".
warning " > react-virtualized@9.22.3" has incorrect peer dependency "react@^15.3.0 || ^16.0.0-alpha".
warning " > react-virtualized@9.22.3" has incorrect peer dependency "react-dom@^15.3.0 || ^16.0.0-alpha".
warning " > @storybook/addon-knobs@6.4.0" has unmet peer dependency "@storybook/api@^6.4.0".
warning " > @storybook/addon-knobs@6.4.0" has unmet peer dependency "@storybook/components@^6.4.0".
warning " > @storybook/addon-knobs@6.4.0" has unmet peer dependency "@storybook/core-events@^6.4.0".
warning " > @storybook/addon-knobs@6.4.0" has unmet peer dependency "@storybook/theming@^6.4.0".
warning " > @storybook/react@6.5.6" has unmet peer dependency "require-from-string@^2.0.2".
warning " > css-loader@3.2.0" has incorrect peer dependency "webpack@^4.0.0".
warning " > file-loader@4.2.0" has incorrect peer dependency "webpack@^4.0.0".
warning " > style-loader@1.0.0" 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:
> better-sqlite3@7.5.0 build-release
> node-gyp rebuild --release

gyp info it worked if it ends with ok
gyp info using node-gyp@9.0.0
gyp info using node@16.13.2 | 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.13.2/node-v16.13.2-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v16.13.2/node-v16.13.2-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v16.13.2/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v16.13.2/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.13.2/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.13.2',
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.13.2/<(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.13.2/include/node/node.h:841: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]
  841 |       (node::addon_context_register_func) (regfunc),                  \
      |       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/.cache/node-gyp/16.13.2/include/node/node.h:859:3: note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE_X'
  859 |   NODE_MODULE_CONTEXT_AWARE_X(modname, regfunc, NULL, 0)
      |   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/.cache/node-gyp/16.13.2/include/node/node.h:890:3: note: in expansion of macro 'NODE_MODULE_CONTEXT_AWARE'
  890 |   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.13.2/include/node/node.h:63:
/build/.cache/node-gyp/16.13.2/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:390:28)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:290: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.13.2
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.

@indutny-signal
Copy link
Contributor

@WhyNotHugo ah, I see now! Did you install git lfs as per CONTRIBUTING.md ?

@WhyNotHugo
Copy link
Contributor Author

Yes, git lfs was set up and initialised properly. Previous bit of log output:

Git LFS initialized.
yarn install v1.22.19
[1/5] Resolving packages...
[2/5] Fetching packages...
<...>

@scottnonnenberg-signal
Copy link
Contributor

@WhyNotHugo If you tried a yarn install before you had Git LFS initialized, you may need to clear your node_modules directory and/or yarn cache (yarn cache clean).

@WhyNotHugo
Copy link
Contributor Author

I didn't, but I'm doing each subsequent run from scratch anyway to avoid any issues like that.

@mkurz
Copy link

mkurz commented Sep 2, 2022

I was able to successfully build, install and run Signal on Asahi Linux, using the Arch Linux AUR package signal-desktop-beta (https://aur.archlinux.org/packages/signal-desktop-beta) 🥳
There is just a small patch that needs to be applied, see this comment: https://aur.archlinux.org/packages/signal-desktop-beta#comment-880073 Hopefully this patch will make it into the AUR package, then we can just install Signal on Asahi by just running yay -S signal-desktop-beta.

If someone is new to Arch Linux / Asahi and needs help to apply the fix and build and install the package, let me know.

@WhyNotHugo
Copy link
Contributor Author

@mkurz Thanks for digging into this!

I see that the main difference with this patch is that you build using the system fpm. Which one is used otherwise? I don't see any reference to fpm on this repo.

I'm asking here mostly because if an old version is pinned somewhere, it would be great to investigate where, so it can be fixed upstream too.

@mkurz
Copy link

mkurz commented Sep 2, 2022

@WhyNotHugo to be honest: I have no idea where yarn gets fpm. Also I am short on time, so I am just happy it's working now. However, please go ahead, would be good to fix that too.

@cor
Copy link

cor commented Oct 15, 2022

Hope we can get this patch in nixpkgs as well.

@mkurz
Copy link

mkurz commented Nov 8, 2022

I digged a bit deeper and think I know how this fpm problem can be fixed. Step by step:

So what needs to be done is:

I am not going to do that, so if someone wants to take over from here, feel welcome to do so.

BTW: About runtime.GOARCH, you can read more details here: https://pkg.go.dev/runtime

The GOARCH, GOOS, GOPATH, and GOROOT environment variables complete the set of Go environment variables. They influence the building of Go programs (see https://golang.org/cmd/go and https://golang.org/pkg/go/build). GOARCH, GOOS, and GOROOT are recorded at compile time and made available by constants or functions in this package, but they do not influence the execution of the run-time system.
...
GOARCH is the running program's architecture target: one of 386, amd64, arm, s390x, and so on.

@mmaietta
Copy link

mmaietta commented Nov 8, 2022

Quick note, app-builder-bin dependency can't be upgraded in Electron-builder until this issue is resolved: develar/app-builder#83

@WhyNotHugo
Copy link
Contributor Author

WhyNotHugo commented Nov 10, 2022

@mkurz Thanks for digging through this and figuring out all the lose ends, that's quite some detailed research!

@mkurz
Copy link

mkurz commented Nov 10, 2022

@WhyNotHugo Happy to help. However I don't have more time to fix that. I hope someone picks up from here. I think it's pretty clear and straight forward what needs to be done.

@WhyNotHugo
Copy link
Contributor Author

Perhaps a saner approach would be to rely on system packages or building from source, rather than pull binaries from various online sources and executing them. Pulling binaries from upstream will continuously have new issues on different architectures, and upstream can't be expected to build for all of them.

Plus, pulling binaries from a bunch of different sources definitely can't be a secure thing to do.

@stale
Copy link

stale bot commented Feb 15, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Feb 15, 2023
@mkurz
Copy link

mkurz commented Feb 15, 2023

bump

@stale
Copy link

stale bot commented May 16, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label May 16, 2023
@WhyNotHugo
Copy link
Contributor Author

asadfads

@stale stale bot removed the stale label May 19, 2023
@stale
Copy link

stale bot commented Aug 18, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Aug 18, 2023
@t3chguy
Copy link

t3chguy commented Aug 18, 2023

Ah yes, my periodic email reminder of why automatic stale bots are awful for the world of open source... (Bump, not stale as far as I can tell)

@stale stale bot removed the stale label Aug 18, 2023
@WhyNotHugo
Copy link
Contributor Author

WhyNotHugo commented Aug 18, 2023 via email

@msimic
Copy link

msimic commented Oct 16, 2023

any news on this?

@Raphencoder
Copy link

Still not working for me..

@eslerm
Copy link

eslerm commented Jan 28, 2024

I've never attempted myself, but aarch64 appears to be building fine for the signal-desktop snap and it installs on a M2 for me https://github.com/snapcrafters/signal-desktop/blob/candidate/snap/snapcraft.yaml

@jakob11git
Copy link

How can we build the Signal beta on Fedora Asahi?

@RMcNeely
Copy link

RMcNeely commented Mar 6, 2024

It looks like perhaps the instructions on CONTRIBUTING.md have changed since this post was originally opened. I did a fresh clone of the repo, checked out release v7.0.0, made sure I had gcc g++, python3 and make and still was met with some errors attempting to install from a frozen file lock with yarn.

These days it looks like there's 3 packages that do not work correctly with ARM causing errors, electron-builder, canvas, and fs-attr. It looks like fs-attr is an optional dependency so it might work without that? electron-builder though has a name like it might be important to an electron app 🙂

Output of yarn debug log:

# Script name: postinstall

patch-package 8.0.0
Applying patches...
@formatjs/intl@2.6.7 ✔
@storybook/manager-api@7.4.5 ✔
@storybook/router@7.4.5 ✔
@types/backbone@1.4.16 ✔
@types/blueimp-load-image@5.14.1 ✔
@types/express@4.17.18 ✔
@types/fabric@4.5.3 ✔
@types/jest@28.1.3 ✔
@types/node@18.15.11 ✔
@types/node-fetch@2.6.2 ✔
app-builder-lib@24.6.3 ✔
backbone@1.4.0 ✔
casual@1.6.2 ✔
electron-util@0.13.1 ✔
fabric@4.6.0 ✔
got@11.8.5 ✔
mac-screen-capture-permissions@2.0.0 ✔
node-fetch@2.6.7 ✔
protobufjs@7.2.4 ✔
protobufjs-cli@1.1.1 ✔
proxy-agent@6.3.0 ✔
qrcode-generator@1.4.4 ✔
quill@1.3.7 ✔
react-aria-components@1.0.0-alpha.3 ✔
react-blurhash@0.1.2 ✔
react-contextmenu@2.11.0 ✔
react-textarea-autosize@8.3.4 ✔
socks-proxy-agent@8.0.1 ✔
websocket@1.0.34 ✔
  • electron-builder  version=24.6.3
  • loaded configuration  file=package.json ("build" field)
  • rebuilding native dependencies  dependencies=@nodert-win10-rs4/windows.data.xml.dom@0.4.4, @nodert-win10-rs4/windows.ui.notifications@0.4.4, @signalapp/better-sqlite3@8.6.0, @signalapp/windows-dummy-keystroke@1.0.0, bufferutil@4.0.7, canvas@1.0.0, contextify@0.1.15, fs-xattr@0.3.0, mac-screen-capture-permissions@2.0.0, utf-8-validate@5.0.10
                                    platform=linux
                                    arch=arm64
  • install prebuilt binary  name=mac-screen-capture-permissions version=2.0.0 platform=linux arch=arm64 napi=
  • build native dependency from sources  name=mac-screen-capture-permissions
                                          version=2.0.0
                                          platform=linux
                                          arch=arm64
                                          napi=
                                          reason=prebuild-install failed with error (run with env DEBUG=electron-builder to get more information)
                                          error=/home/ryan/Code/Signal/Signal-Desktop/node_modules/node-abi/index.js:30
      throw new Error('Could not detect abi for version ' + target + ' and runtime ' + runtime + '.  Updating "node-abi" might help solve this issue if it is a new release of ' + runtime)
      ^
    
    Error: Could not detect abi for version 28.2.0 and runtime electron.  Updating "node-abi" might help solve this issue if it is a new release of electron
        at getAbi (/home/ryan/Code/Signal/Signal-Desktop/node_modules/node-abi/index.js:30:9)
        at module.exports (/home/ryan/Code/Signal/Signal-Desktop/node_modules/prebuild-install/rc.js:53:57)
        at Object.<anonymous> (/home/ryan/Code/Signal/Signal-Desktop/node_modules/prebuild-install/bin.js:8:25)
        at Module._compile (node:internal/modules/cjs/loader:1356:14)
        at Module._extensions..js (node:internal/modules/cjs/loader:1414:10)
        at Module.load (node:internal/modules/cjs/loader:1197:32)
        at Module._load (node:internal/modules/cjs/loader:1013:12)
        at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:128:12)
        at node:internal/main/run_main_module:28:49
    
    Node.js v18.19.1
    
  • rebuilding native dependency  name=@nodert-win10-rs4/windows.ui.notifications version=0.4.4
  • rebuilding native dependency  name=@nodert-win10-rs4/windows.data.xml.dom version=0.4.4
  • rebuilding native dependency  name=@signalapp/better-sqlite3 version=8.6.0
  • rebuilding native dependency  name=@signalapp/windows-dummy-keystroke version=1.0.0
  • rebuilding native dependency  name=canvas version=1.0.0
  • rebuilding native dependency  name=bufferutil version=4.0.7
  • cannot build optional native dependency  name=canvas
                                             version=1.0.0
                                             cause=exit status 1
                                             out=Usage Error: Couldn't find a script named "install".
    
    $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
    
                                             command=/tmp/xfs-91d44c42/yarn run install
                                             workingDir=/home/ryan/Code/Signal/Signal-Desktop/node_modules/canvas
  • rebuilding native dependency  name=contextify version=0.1.15
  • rebuilding native dependency  name=mac-screen-capture-permissions version=2.0.0
  • rebuilding native dependency  name=fs-xattr version=0.3.0
  • rebuilding native dependency  name=utf-8-validate version=5.0.10
  • cannot build optional native dependency  name=fs-xattr
                                             version=0.3.0
                                             cause=exit status 1
                                             out=Usage Error: Couldn't find a script named "install".
    
    $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
    
                                             command=/tmp/xfs-91d44c42/yarn run install
                                             workingDir=/home/ryan/Code/Signal/Signal-Desktop/node_modules/fs-xattr
  ⨯ cannot execute  cause=exit status 1
                    out=Usage Error: Couldn't find a script named "install".
    
    $ yarn run [--inspect] [--inspect-brk] [-T,--top-level] [-B,--binaries-only] [--require #0] <scriptName> ...
    
                    command=/tmp/xfs-91d44c42/yarn run install
                    workingDir=/home/ryan/Code/Signal/Signal-Desktop/node_modules/contextify

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging a pull request may close this issue.