Closed GitPaulo closed 4 years ago
Perhaps.
I don't have a RPi4 myself and I have no idea how it differs from the earlier models on hardware. I would have figured out it had the same architecture - but I guess not? The README.md has instructions on how to compile node-opus for (currently) unsupported architectures.
I have followed the instructions on the .README of the root repo folder. Unfortunately, I still get the same error.
This is the new package.json
:
https://pastebin.com/raw/4BKksHyd
This is the config.h at ~/Desktop/Vulcan/node_modules/node-opus/deps/config/opus/linux/armv7l
https://pastebin.com/raw/jtLYuwaE
Perhaps this has nothing to do with node-opus and it is prism-media's problem? The weird thing is, the exact same project works just fine on my Windows machine.
Another thing i've noticed - the newer versions of node v12.x
seem to cause this error during the build:
gyp ERR! build error
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/home/pi/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:266:23)
gyp ERR! stack at ChildProcess.emit (events.js:203:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12)
gyp ERR! System Linux 4.19.57-v7+
gyp ERR! command "/home/pi/.nvm/versions/node/v12.7.0/bin/node" "/home/pi/.nvm/versions/node/v12.7.0/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /home/pi/Desktop/Vulcan/node_modules/ref
gyp ERR! node -v v12.7.0
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
When I downgraded to v11.x
the error was gone.
The README could be missing node-gyp requirements for Linux machines. I might have assumed these are most often installed anyway. You might want to try something like sudo apt-get install build-essential
if I remember right.
Edit: Changed build-essentials
to build-essential
according to https://raspberrypi.stackexchange.com/questions/4813/how-to-install-gnu-c-development-tools-on-raspberry-pi-using-apt-get
https://github.com/nodejs/node-gyp lists the following:
On Unix
- python (v2.7 recommended, v3.x.x is not supported)
- make
- A proper C/C++ compiler toolchain, like GCC
I am wondering if the problem I have encountered is to do with node-opus not being compatibile with raspberrypi 4? If that is the case, is this compatibility going to be achieved in the near future?
Thank you for reading this.
All the information about my system, project and error can be encountered below
========== HOST MACHINE INFORMATION ========== Linux raspberrypi 4.19.57-v7+ #1244 SMP armv7l GNU/Linux
========== REQUIRED SOFTWARE VERSIONS ========== Python 2.7.13 NPM 6.10.0 Node v12.7.0 FFMPEG v3.2.14-1~deb9u1+rpt1
========== DEPENDENCIES TREE (DEPTH=0) ========== ├── UNMET PEER DEPENDENCY @discordjs/uws@^11.149.1 ├── archiver@3.0.3 ├── UNMET PEER DEPENDENCY bufferutil@^4.0.1 ├── chalk@2.4.2 ├── cheerio@1.0.0-rc.3 ├── discord.js@12.0.0-dev (github:discordjs/discord.js#e562564123912f09725a6e03ecf4ba44d85de35a) ├── UNMET PEER DEPENDENCY erlpack@discordapp/erlpack ├── eslint@6.1.0 ├── eslint-config-mudamuda@1.0.10 ├── eslint-plugin-security@1.4.0 ├── github-api@3.2.2 ├── got@9.6.0 ├── js-yaml@3.13.1 ├── UNMET PEER DEPENDENCY libsodium-wrappers@^0.7.4 ├── mongoose@5.6.7 ├── node-opus@0.3.2 ├── nodemon@1.19.1 ├── pem@1.14.2 ├── pm2@3.5.1 ├── request@2.88.0 ├── request-promise@4.2.4 ├── snyk@1.200.1 ├── UNMET PEER DEPENDENCY sodium@^3.0.2 ├── ytdl-core@0.29.3 ├── ytdl-core-discord@1.0.3 ├── UNMET PEER DEPENDENCY zlib-sync@^0.1.4 └── UNMET PEER DEPENDENCY zucc@^0.1.0
========== ERROR MESSAGE & STACK TRACE ========== Error originated by using ytdl-core-discord function on a valid youtube url.