mediasoup: Build fails on Docker node:20-alpine
Bug Report
I am trying to build mediasoup on docker with an alpine node image, but this fails.
Very simple to reproduce, just init a node project and add mediasoup, like here: https://github.com/copiltembel/mediasoup-docker-alpine-not-building
Your environment
- Operating system: Ubuntu 20.04
- Node version: v20.9.0
- npm version: 10.1.0
- gcc/clang version: gcc version 12.2.1 20220924 (Alpine 12.2.1_git20220924-r10)
- mediasoup version: 3.13.1
- mediasoup-client version: n/a
Issue description
Running docker build . with a simple mediasoup node project on docker alpine leads to the build failing with this error:
../../../subprojects/flatbuffers-23.3.3/include/flatbuffers/util.h:228:39: error: 'strtoull_l' was not declared in this scope; did you mean 'strtoull'?
(See full stack error in the above repo.)
Seems to be related to the flatbuffers update? Googling the error took me here: https://github.com/google/flatbuffers/issues/7265
About this issue
- Original URL
- State: closed
- Created 8 months ago
- Comments: 18 (18 by maintainers)
Commits related to this issue
- Fix build on musl Build of applications using flatbuffers such as mediasoup (see related issue https://github.com/versatica/mediasoup/issues/1223) are broken on musl (such as in Alpine Linux) since v... — committed to ibc/flatbuffers by ibc 6 months ago
- Fix build on musl based systems (such as Alpine Linux) Fixes #1223 — committed to versatica/mediasoup by ibc 6 months ago
I see now, thanks. So it must be a bug in flatbuffers since it should not define a macro only available in the library itself if later it uses it in a header file that the application includes (because such a macro is not defined in the application build system).
So tomorrow I’ll report it and, as a temporary workaround, I’ll define the same macro in mediasoup meson.build file.