Can`t upgrade mediasoup to 3.9.X on Macbook M1

Hello everyone!
I am trying to upgrade from 3.8.4 to 3.9.2 but I get an error.

Trace trace.txt · GitHub

Did you try to remove node_modules and trying again?
These lines in particular are very suspicious:

3909 error ld: warning: ignoring file subprojects/openssl-1.1.1l/libcrypto.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64
3909 error ld: warning: ignoring file subprojects/openssl-1.1.1l/libssl.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64

Everything else seems to indicate you’re building for AArch64, but these claim it is trying to build for x86-64, no idea why, but might be caused by the old run with some temporary files left in place.

I tried to delete the node_modules folder and reinstall it, but the error still repeats

This is the well known issue due to pip fetching x86 version of ninja, right?

No, that issue was resolved, this is something weird during linking step.

I will try to check later with Meson folks on Matrix (feel free to reach out to them before me if anyone would like to debug without me): https://matrix.to/#/#mesonbuild:matrix.org

I would love to turn to them for a solution to the problem, but I don’t understand anything about it :man_facepalming:

I tried to install mason via pip and the command was executed successfully

➜  ~ python --version
Python 3.9.2
➜  ~ pip --version
pip 21.3.1 from /opt/homebrew/lib/python3.9/site-packages/pip (python 3.9)
➜  ~ pip install --upgrade meson cmake
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting meson
  Using cached meson-0.60.1-py3-none-any.whl (837 kB)
Collecting cmake
  Using cached cmake-3.22.0-py2.py3-none-macosx_10_9_universal2.macosx_10_9_x86_64.macosx_11_0_arm64.macosx_11_0_universal2.whl (74.6 MB)
Installing collected packages: meson, cmake
  DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Successfully installed cmake-3.22.0 meson-0.60.1
➜  ~

I’ll try to chat with them later today, hopefully this is something simple.

Of course it installed successfully, we can see that in logs already.

Thank you very much!

Did you install Node from brew by any chance? I think it is x86-64 version, can you try updating it/installing arm64 version?

Alternatively you should be able to execute arch -x86_64 zsh and get x86-64 shell where things should build as usual (c++ - Using x86 libraries and OpenMP on macOS arm64 architecture - Stack Overflow).

Ideally the first solution works, if that is the case we’ll have to document it in the installation guide.

Honestly, these x64-64/arm64 bugs on M1 are really annoying, I wish Apple worked some more on this to polish things (if this is even their fault).

I had the x86-64 version of node installed. I updated node and everything worked! Thank you very much!

I’ll add a note in de docs

1 Like

Thanks, I tried installing arm64 node and it didn’t work for me. Here’s my Dockerfile:

FROM arm64v8/node:17-alpine3.12

RUN apk update && \
    apk add g++ make py-pip net-tools iputils iproute2 curl

After this I try to install mediasoup via npm and it throws the Segmentation fault error:

https://paste.ofcode.org/EXZMG5jXjpWkaYiHsfw8AD

Thanks again for your work making this great tool!

Not sure what you are doing with Docker, but this ticket about specifically running mediasoup natively on macOS with M1 processor. If you have a different issue then create a separate topic, don’t hijack this one.

Wil do, thanks.