Mediapipe MacOS Build Failure and How to Fix It
The Problem If you are attempting to use any rule from @build_bazel_rules_apple on MacOS with a mediapipe project you may face a build error. The error will contain the following message: Configurable attribute "srcs" doesn't match this configuration (would a default condition help?). Conditions checked: @cpuinfo//:linux_x86_64 @cpuinfo//:linux_arm @cpuinfo//:linux_armhf @cpuinfo//:linux_armv7a @cpuinfo//:linux_armeabi @cpuinfo//:linux_aarch64 @cpuinfo//:linux_mips64 @cpuinfo//:linux_riscv64 @cpuinfo//:linux_s390x @cpuinfo//:macos_x86_64 @cpuinfo//:macos_arm64 @cpuinfo//:windows_x86_64 @cpuinfo//:android_armv7 @cpuinfo//:android_arm64 @cpuinfo//:android_x86 @cpuinfo//:android_x86_64 @cpuinfo//:ios_x86_64 @cpuinfo//:ios_x86 @cpuinfo//:ios_armv7 @cpuinfo//:ios_arm64 @cpuinfo//:ios_arm64e @cpuinfo//:watchos_x86_64 @cpuinfo//:watchos_x86 @cpuinfo//:watchos_armv7k @cpuinfo//:watchos_arm64_32 @cpuinfo//:tvos_x86_64 @cpuinfo//:tvos_arm64 @cpuinfo//:emscripten_wasm This github issue summarizes the problem succinctly....