./core/cc/target.h:41:9: error: 'TARGET_OS' macro redefined [-Werror,-Wmacro-redefined] #define TARGET_OS GAPID_OS_OSX
ERROR: /Users/chenxiaojiong/Desktop/project/googel/2/gapid/core/os/device/deviceinfo/cc/BUILD.bazel:28:1: C++ compilation of rule '//core/os/device/deviceinfo/cc:cc' failed (Exit 1) wrapped_clang failed: error executing command
(cd /private/var/tmp/bazel_chenxiaojiong/fbc10ff03d7172ef2cc1b34707b1af70/sandbox/darwin-sandbox/313/execroot/gapid &&
exec env -
APPLE_SDK_PLATFORM=MacOSX
APPLE_SDK_VERSION_OVERRIDE=12.1
PATH=/Users/chenxiaojiong/Library/Java/JavaVirtualMachines/corretto-1.8.0_312/Contents/Home/bin:/Library/Frameworks/Python.framework/Versions/3.9/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/chenxiaojiong/Desktop/project/googel/sdk/build-tools/29.0.2/aapt:/Users/chenxiaojiong/Desktop/project/googel/sdk/platform-tools:/Users/chenxiaojiong/Desktop/project/googel/sdk/ndk-bundle:/Users/chenxiaojiong/bin
XCODE_VERSION_OVERRIDE=13.2.0.13C90
external/local_config_cc/wrapped_clang '-D_FORTIFY_SOURCE=1' -fstack-protector -fcolor-diagnostics -Wall -Wthread-safety -Wself-assign -fno-omit-frame-pointer -O0 -DDEBUG '-std=c++11' -iquote . -iquote bazel-out/darwin-fastbuild/bin -iquote external/breakpad -iquote bazel-out/darwin-fastbuild/bin/external/breakpad -iquote external/cityhash -iquote bazel-out/darwin-fastbuild/bin/external/cityhash -iquote external/com_google_protobuf -iquote bazel-out/darwin-fastbuild/bin/external/com_google_protobuf -iquote external/net_zlib -iquote bazel-out/darwin-fastbuild/bin/external/net_zlib -Ibazel-out/darwin-fastbuild/bin/external/breakpad/virtual_includes/breakpad -Ibazel-out/darwin-fastbuild/bin/external/breakpad/virtual_includes/breakpad_darwin -Ibazel-out/darwin-fastbuild/bin/external/breakpad/virtual_includes/breakpad_darwin_defines -Ibazel-out/darwin-fastbuild/bin/external/cityhash/virtual_includes/cityhash -isystem external/com_google_protobuf/src -isystem bazel-out/darwin-fastbuild/bin/external/com_google_protobuf/src -MD -MF bazel-out/darwin-fastbuild/bin/core/os/device/deviceinfo/cc/objs/cc/gl.d '-frandom-seed=bazel-out/darwin-fastbuild/bin/core/os/device/deviceinfo/cc/objs/cc/gl.o' -isysroot BAZEL_XCODE_SDKROOT -F__BAZEL_XCODE_SDKROOT/System/Library/Frameworks -F__BAZEL_XCODE_DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/Library/Frameworks '-mmacosx-version-min=12.1' '-std=c++11' -Werror -DTARGET_OS_OSX -no-canonical-prefixes -Wno-builtin-macro-redefined '-D__DATE="redacted"' '-D__TIMESTAMP_="redacted"' '-D__TIME__="redacted"' -c core/os/device/deviceinfo/cc/gl.cpp -o bazel-out/darwin-fastbuild/bin/core/os/device/deviceinfo/cc/_objs/cc/gl.o)
Execution platform: @local_config_platform//:host
Use --sandbox_debug to see verbose messages from the sandbox In file included from core/os/device/deviceinfo/cc/gl.cpp:20: In file included from ./core/cc/assert.h:20: In file included from ./core/cc/log.h:39: ./core/cc/target.h:41:9: error: 'TARGET_OS' macro redefined [-Werror,-Wmacro-redefined] #define TARGET_OS GAPID_OS_OSX ^ ./core/cc/target.h:31:9: note: previous definition is here #define TARGET_OS GAPID_OS_LINUX ^ ./core/cc/target.h:66:9: error: 'TARGET_OS' macro redefined [-Werror,-Wmacro-redefined] #define TARGET_OS GAPID_OS_WINDOWS ^ ./core/cc/target.h:41:9: note: previous definition is here #define TARGET_OS GAPID_OS_OSX ^ ./core/cc/target.h:67:9: error: 'STDCALL' macro redefined [-Werror,-Wmacro-redefined] #define STDCALL __stdcall ^ ./core/cc/target.h:42:9: note: previous definition is here #define STDCALL ^ ./core/cc/target.h:68:9: error: 'EXPORT' macro redefined [-Werror,-Wmacro-redefined] #define EXPORT __declspec(dllexport) ^ ./core/cc/target.h:43:9: note: previous definition is here #define EXPORT attribute((visibility("default"))) ^ ./core/cc/target.h:69:9: error: 'PATH_DELIMITER' macro redefined [-Werror,-Wmacro-redefined] #define PATH_DELIMITER '\' ^ ./core/cc/target.h:44:9: note: previous definition is here #define PATH_DELIMITER '/' ^ ./core/cc/target.h:70:9: error: 'PATH_DELIMITER_STR' macro redefined [-Werror,-Wmacro-redefined] #define PATH_DELIMITER_STR "\" ^ ./core/cc/target.h:45:9: note: previous definition is here #define PATH_DELIMITER_STR "/" ^ 6 errors generated. Target //core/os/device/deviceinfo/cc:cc failed to build INFO: Elapsed time: 78.907s, Critical Path: 24.49s INFO: 310 processes: 310 darwin-sandbox. FAILED: Build did NOT complete successfully
The environment is: gapid master branch
OS

GCC

bazel Build label: 4.2.2
Does anyone know how to fix it?
https://github.com/google/agi/commit/10e5468be49daac157c1da77c67c74703a7a5b93 Apply this commit should fix the compile issue