BernardoGiordano / signal-desktop-pi4

A bash script to compile Signal Desktop for the Raspberry Pi 4 on Ubuntu 21.04.
13 stars 0 forks source link

yarn install failing #4

Open junefish opened 2 years ago

junefish commented 2 years ago

When I run yarn install (line 58) it fails:


yarn install v1.22.17
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
[4/4] Building fresh packages...
$ node-gyp-build
gyp info it worked if it ends with ok
gyp info using node-gyp@7.1.2
gyp info using node@14.16.0 | linux | arm
gyp info find Python using Python version 3.9.2 found at "/usr/bin/python3"
gyp http GET https://nodejs.org/download/release/v14.16.0/node-v14.16.0-headers.tar.gz
gyp http 200 https://nodejs.org/download/release/v14.16.0/node-v14.16.0-headers.tar.gz
gyp http GET https://nodejs.org/download/release/v14.16.0/SHASUMS256.txt
gyp http 200 https://nodejs.org/download/release/v14.16.0/SHASUMS256.txt
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/home/pi/signal/libsignal-client/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   '/home/pi/signal/libsignal-client/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pi/signal/libsignal-client/node_modules/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/home/pi/.cache/node-gyp/14.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=/home/pi/.cache/node-gyp/14.16.0',
gyp info spawn args   '-Dnode_gyp_dir=/home/pi/signal/libsignal-client/node_modules/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/home/pi/.cache/node-gyp/14.16.0/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/pi/signal/libsignal-client',
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: Undefined variable CARGO_ARCH in binding.gyp while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/home/pi/signal/libsignal-client/node_modules/node-gyp/lib/configure.js:351:16)
gyp ERR! stack     at ChildProcess.emit (events.js:315:20)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
gyp ERR! System Linux 5.10.63-v7l+
gyp ERR! command "/home/pi/.nvm/versions/node/v14.16.0/bin/node" "/home/pi/signal/libsignal-client/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /home/pi/signal/libsignal-client
gyp ERR! node -v v14.16.0
gyp ERR! node-gyp -v v7.1.2
gyp ERR! not ok 
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.```
ChrisS85 commented 2 years ago

I see this as well on Raspbian. In my case the issue is that it expects a different architecture (arm instead of arm64 I think) in binding.gyp and so it doesn't set the variable. In this case there are further problems along the road though, so I couldn't compile it on that distro.