Skip to content

cargo build fails in latest macOS due to removed macro _LIBCPP_ENABLE_ASSERTIONS #1633

@ibc

Description

@ibc

I updated my Xcode Command Line Tools or whatver and now I cannot build mediasoup Rust. cargo build fails as follows:

Found ninja-1.10.2.git.kitware.jobserver-1 at /Volumes/src-cs/mediasoup/target/debug/build/mediasoup-sys-a3e37132768c4096/out/out/pip_meson_ninja/bin/ninja
  [1/49] Compiling C++ object subprojects/flatbuffers-24.3.25/libswift_generator.a.p/grpc_src_compiler_swift_generator.cc.o
  FAILED: subprojects/flatbuffers-24.3.25/libswift_generator.a.p/grpc_src_compiler_swift_generator.cc.o 
  c++ -Isubprojects/flatbuffers-24.3.25/libswift_generator.a.p -Isubprojects/flatbuffers-24.3.25 -I../../../../../../worker/subprojects/flatbuffers-24.3.25 -I../../../../../../worker/subprojects/flatbuffers-24.3.25/include -I../../../../../../worker/subprojects/flatbuffers-24.3.25/grpc -fdiagnostics-color=always -D_LIBCPP_ENABLE_ASSERTIONS=1 -std=c++17 -O0 -g -DFLATBUFFERS_LOCALE_INDEPENDENT=true -fsigned-char -MD -MQ subprojects/flatbuffers-24.3.25/libswift_generator.a.p/grpc_src_compiler_swift_generator.cc.o -MF subprojects/flatbuffers-24.3.25/libswift_generator.a.p/grpc_src_compiler_swift_generator.cc.o.d -o subprojects/flatbuffers-24.3.25/libswift_generator.a.p/grpc_src_compiler_swift_generator.cc.o -c ../../../../../../worker/subprojects/flatbuffers-24.3.25/grpc/src/compiler/swift_generator.cc
  In file included from ../../../../../../worker/subprojects/flatbuffers-24.3.25/grpc/src/compiler/swift_generator.cc:23:
  In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/map:577:
  In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/equal.h:13:
  In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__algorithm/comp.h:12:
  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:49:6: error: "_LIBCPP_ENABLE_ASSERTIONS has been removed, please use _LIBCPP_HARDENING_MODE instead"
     49 | #    error "_LIBCPP_ENABLE_ASSERTIONS has been removed, please use _LIBCPP_HARDENING_MODE instead"
        |      ^
  1 error generated.
  [2/49] Compiling C++ object subprojects/flatbuffers-24.3.25/libpython_generator.a.p/grpc_src_compiler_python_generator.cc.o
  • macOS: 15.6.1 (ARM M4)
  • Xcode: 26.0.1
  • MacOSX26.0.sdk

Metadata

Metadata

Labels

Type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions