mediasoup: [macOS] v3.9+ failing to compile abseil-cpp-20210324.2

Bug Report

Receive the following error upon yarn add mediasoup:

FAILED: subprojects/abseil-cpp-20210324.2/libabsl_base.a.p/absl_base_internal_cycleclock.cc.o 
c++ -Isubprojects/abseil-cpp-20210324.2/libabsl_base.a.p -Isubprojects/abseil-cpp-20210324.2 -I../../subprojects/abseil-cpp-20210324.2 -fcolor-diagnostics -DNDEBUG -std=c++11 -O3 -Wno-sign-compare -march=armv8-a+crypto -MD -MQ subprojects/abseil-cpp-20210324.2/libabsl_base.a.p/absl_base_internal_cycleclock.cc.o -MF subprojects/abseil-cpp-20210324.2/libabsl_base.a.p/absl_base_internal_cycleclock.cc.o.d -o subprojects/abseil-cpp-20210324.2/libabsl_base.a.p/absl_base_internal_cycleclock.cc.o -c ../../subprojects/abseil-cpp-20210324.2/absl/base/internal/cycleclock.cc
error: unknown target CPU 'armv8-a+crypto'
note: valid target CPU values are: nocona, core2, penryn, bonnell, atom, silvermont, slm, goldmont, goldmont-plus, tremont, nehalem, corei7, westmere, sandybridge, corei7-avx, ivybridge, core-avx-i, haswell, core-avx2, broadwell, skylake, skylake-avx512, skx, cascadelake, cooperlake, cannonlake, icelake-client, icelake-server, tigerlake, sapphirerapids, alderlake, knl, knm, k8, athlon64, athlon-fx, opteron, k8-sse3, athlon64-sse3, opteron-sse3, amdfam10, barcelona, btver1, btver2, bdver1, bdver2, bdver3, bdver4, znver1, znver2, znver3, x86-64, x86-64-v2, x86-64-v3, x86-64-v4

v3.8.4 installs so I’m guessing something changed from the v3.7.1 release that added M1 support (#548)?

Your environment

  • Operating system: macOS Monterey (Macbook Air M1, 2020)
  • Node version: 17.0.1
  • npm version: 8.1.1
  • gcc/clang version: clang-1300.0.29.3 (Apple)
  • mediasoup version: 3.9+

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 24 (12 by maintainers)

Most upvoted comments

Yeah, looks like your compiler is x86-64, you need ARM compiler instead on M1 machine.

According to https://github.com/abseil/abseil-cpp/issues/970 you might actually try to cross-compile it. Make sure your compiler is for ARM. People had other issues of a similar nature the other way around: https://mediasoup.discourse.group/t/partly-solved-could-not-detect-ninja-v1-8-2-or-newer/3464