Build ray from source failed on apple m3

Hi, building ray 2.10.0 on macos with m3 failed with the following error:
Computing main repo mapping:
Loading:
Loading: 0 packages loaded
Analyzing: 2 targets (2 packages loaded, 0 targets configured)
Analyzing: 2 targets (2 packages loaded, 0 targets configured)
[0 / 1] checking cached actions
ERROR: /private/var/tmp/_bazel_guxiaobo/d275183569699e5f6e49e8ef5050c6a5/external/com_google_protobuf/src/google/protobuf/BUILD.bazel:129:8: @@com_google_protobuf//src/google/protobuf:gen_wkt_cc_sources: no such attribute ‘exec_tools’ in ‘genrule’ rule (did you mean ‘executable’?)
ERROR: /private/var/tmp/_bazel_guxiaobo/d275183569699e5f6e49e8ef5050c6a5/external/com_google_protobuf/BUILD.bazel:82:6: Target ‘@@com_google_protobuf//src/google/protobuf:wrappers_proto’ contains an error and its package is in error and referenced by ‘@@com_google_protobuf//:wrappers_proto’
ERROR: Analysis of target ‘//:ray_pkg’ failed; build aborted: Analysis failed
INFO: Elapsed time: 9.860s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
FAILED:
Traceback (most recent call last):
File “”, line 2, in
File “”, line 34, in
File “/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py”, line 754, in
setuptools.setup(
File “/opt/anaconda3/envs/rayenv/lib/python3.9/site-packages/setuptools/init.py”, line 153, in setup
return distutils.core.setup(**attrs)
File “/opt/anaconda3/envs/rayenv/lib/python3.9/distutils/core.py”, line 148, in setup
dist.run_commands()
File “/opt/anaconda3/envs/rayenv/lib/python3.9/distutils/dist.py”, line 966, in run_commands
self.run_command(cmd)
File “/opt/anaconda3/envs/rayenv/lib/python3.9/distutils/dist.py”, line 985, in run_command
cmd_obj.run()
File “/opt/anaconda3/envs/rayenv/lib/python3.9/site-packages/setuptools/command/develop.py”, line 34, in run
self.install_for_development()
File “/opt/anaconda3/envs/rayenv/lib/python3.9/site-packages/setuptools/command/develop.py”, line 114, in install_for_development
self.run_command(‘build_ext’)
File “/opt/anaconda3/envs/rayenv/lib/python3.9/distutils/cmd.py”, line 313, in run_command
self.distribution.run_command(command)
File “/opt/anaconda3/envs/rayenv/lib/python3.9/distutils/dist.py”, line 985, in run_command
cmd_obj.run()
File “/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py”, line 742, in run
return pip_run(self)
File “/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py”, line 646, in pip_run
build(True, BUILD_JAVA, True)
File “/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py”, line 594, in build
return bazel_invoke(
File “/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py”, line 373, in bazel_invoke
result = invoker([cmd] + cmdline, *args, **kwargs)
File “/opt/anaconda3/envs/rayenv/lib/python3.9/subprocess.py”, line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘bazel’, ‘build’, ‘–verbose_failures’, ‘–’, ‘//:ray_pkg’, ‘//cpp:ray_cpp_pkg’]’ returned non-zero exit status 1.
error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
full command: /opt/anaconda3/envs/rayenv/bin/python3.9 -c '
exec(compile('"'"''"'"''"'"'
# This is <pip-setuptools-caller> -- a caller that pip uses to run setup.py
#
# - It imports setuptools before invoking setup.py, to enable projects that directly
#   import from `distutils.core` to work with newer packaging standards.
# - It provides a clear error message when setuptools is not installed.
# - It sets `sys.argv[0]` to the underlying `setup.py`, when invoking `setup.py` so
#   setuptools doesn'"'"'t think the script is `-c`. This avoids the following warning:
#     manifest_maker: standard file '"'"'-c'"'"' not found".
# - It generates a shim setup.py, for handling setup.cfg-only projects.
import os, sys, tokenize

try:
    import setuptools
except ImportError as error:
    print(
        "ERROR: Can not execute `setup.py` since setuptools is not available in "
        "the build environment.",
        file=sys.stderr,
    )
    sys.exit(1)

__file__ = %r
sys.argv[0] = __file__

if os.path.exists(__file__):
    filename = __file__
    with tokenize.open(__file__) as f:
        setup_py_code = f.read()
else:
    filename = "<auto-generated setuptools caller>"
    setup_py_code = "from setuptools import setup; setup()"

exec(compile(setup_py_code, filename, "exec"))
'"'"''"'"''"'"' % ('"'"'/Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/setup.py'"'"',), "<pip-setuptools-caller>", "exec"))' develop --no-deps
cwd: /Users/guxiaobo/Documents/GitHub/ray-2.10.0/python/

error: subprocess-exited-with-error

× python setup.py develop did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.