Mediasoup installation downloads particular versions of dependencies on the fly. The easiest workaround I believe is to make it use an older version of gcc. Another way is to modify meson’s wrap file for abseil in mediasoup-xxx.tgz (worker\subprojects\abseil-cpp.wrap) in hope that newer version of abseil is compatible with the current mediasoup source code, which may not necessarily be true. You may also open an issue at GitHub.
Unfortunately i dont know how can i tell the installation to use the older version of gcc. And the other option looks like a way to cause problems in the future
Well, you may try this.
Install mediasoup files without building mediasoup-worker: npm i mediasoup --ignore-scripts
Then go to the mediasoup directory: cd node_modules/mediasoup/
and start mediasoup-worker build: node npm-scripts.js worker:build
It will fail as before, but all temporary files will remain.
Open worker/subprojects/abseil-cpp-20211102.0/absl/strings/internal/str_format/extension.h and insert line #include <cstdint> between #include <cstddef> and #include <cstrings>.
Build the worker again: node npm-scripts.js worker:build
If this is the only problem with gcc-13, not just the first one, the command should complete successfully.
Run node npm-scripts.js postinstall to clean up temporary files.
Thank you for your answer Sergey, i did what you said and it worked. But i dont understand what the problem actually is. Is problem mediasoup or the abseil project?
Since mediasoup does not compile with gcc-13, because it uses outdated version of abseil, it’s the problem of mediasoup. It is not that pressing because most Linux distributions install older versions of gcc, but eventually it has to be fixed. This, as always in case of dependency update, will involve some testing to ensure that other changes in abseil accumulated for the past two years do not break anything.
By the way, for the reference, this change that is already present in more recent versions of abseil, and which you applyied manually to the older version used by mediasoup, is described in the following instruction: Porting to GCC 13 - GNU Project (see “Header dependency changes”, <cstdint>).