I am a total beginner so please forgive me for asking something stupid!
running npm install of our server application built with mediasoup, it fails with Could not detect Ninja v1.8.2 or newer
Setup computer #1: MacMini M1, macOS 11.4, node 17.0.1, npm 6.14.15, mediasoup 3.9.0, probably missing something relevant
I can build locally on a MacBook Pro M1 without any issues, the same versions except macOS 11.2
Installing on the same computer has worked without any issues, last time 2 weeks ago but the day before yesterday it failed
Another MacMini #2 which I have also installed the application before fails with the same error.
Some updates have been done on #1 but is not obviously connected since #2 also fails now
Uninstalled v16, not sure which, and installed v17, same error but explicitly stated in v17
The only common denominator is that both computers are at the same location, which doesn’t make any sense. #1 is outside the firewall, #2 is inside the local network.
Works for everyone building locally…
There has been three other people more competent than me looking at it but without finding the cause
Any suggestions?
And how do I upload the error log?
That usually means something unexpected happened to the build system used for worker. Have you tried to delete node_modules
and see if the issue repeats?
Yes many times, many variations of the same build, variations of mediasoup version, 3.7.17 and 3.9.0, on two different machines, works locally on my macbook pro m1 every time, has worked on the target computer every time until now, has worked every time on #2 until now
So one thing that is different is the network, mediasoup makes calls to e.g. mesonbuild.com if that could matter? It seems like such a long shot though, especially since #1 is outside and #2 is inside firewall.
And here is a link to the error log: https://docs.google.com/document/d/1JxFQ7O5ZkkNnCwgp4SQ9iup3dwngKVU8b4ouT2CKWRI/edit?usp=sharing
You can’t get this error in 3.7.17, but in 3.9.0 Ninja will be downloaded through PIP and Meson will be used to download dependencies, so Internet connection must be working in that environment.
Some more info:
updated my macbook on which it installs correctly to macOS 11.6, still working
The difference I have found is the versions of clang. My computer has 12.0.5, the ones that fails have 13.0
UPDATE: managed to downgrade, now 12.0.5 on #2 but still failing
I don’t see “Ninja” in that log
Thanks for responding, I really appreciate it! And sorry for not being 100% clear
The error message was from the terminal, did not search for it in the error log
Here is the terminal error
What is PIP version on the machine that works? Here it warns that the version you have is 19.2.3 back from 2019, which is pretty old, I’m wondering if working setup has newer version.
UPD: Also if you can attach meson log from node_modules/mediasoup/worker/out/Release/meson-logs/meson-log.txt
it would help (please use pastebin instead of Google Drive if possible though).
The one that is broken #1 has 21.3, the one that WORKS gives a “command not found”…
I used drive since the first log was too big and required a pro account. The node_modules directory is deleted automatically when npm fails so I don’t have that file
Update: I got some help and npm install now works on machine #1, but there is still a lot unclear for me.
The reason it started failing was most likely the release of 3.9.0. Our build was configured to use the latest 3.*, will never do that mistake again.
However, 3.9.0 installs and runs on my macbook pro M1, same os, processor, npm etc. This is what the developer said:
“The problem on the macmini was that the clang x86_64 compiler was launched with aarch64 target and that is not supported”
Or something similar.
So it works now but would of course love to know:
what can be the reason for the differences between the machines?
Is there anything to do about it?
3.9.0 switched build system, so things have changed significantly. As to x86-64 compiler on aarch64 target… I honestly don’t know too much about it, feels like one of the rough edges in transition to ARM on macOS.
Thanks for your reply, yeah one could expect some rough edges in that transition
Facing the same issue on Ubuntu 20.04.5
here’s my meson-log
This error appeared today in both my dev environment ( Ubuntu22.04 ) and dev server ( Ubuntu 22.04 )
Same for me on a fresh Debian stable install today.
The latest ninja version (1.11.1) triggers a segfault on Ubuntu LTS.
I solved manually installing the previous version:
/usr/bin/python3 -m pip install --upgrade --target=worker/out/pip meson==0.61.5 ninja==1.10.2.4
npm run worker:build