I tried this
bazel build -c dbg //:ray_pkg
but got the errors
ERROR: /home/binli/workspace/ray-project/ray/BUILD.bazel:505:10: Linking raylet failed: (Exit 1): gcc failed: error executing command
(cd /home/binli/.cache/bazel/_bazel_binli/29239b4810a270a8aded6ce18dc74d91/sandbox/processwrapper-sandbox/5497/execroot/com_github_ray_project_ray && \
exec env - \
PATH=/home/binli/anaconda3/envs/ray/bin:/home/binli/anaconda3/condabin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/binli/.local/bin:/home/binli/bin \
PWD=/proc/self/cwd \
/usr/bin/gcc @bazel-out/k8-dbg/bin/raylet-2.params)
Execution platform: @local_config_platform//:host
Use --sandbox_debug to see verbose messages from the sandbox
src/ray/common/memory_monitor.cc:389: error: undefined reference to 'std::filesystem::directory_iterator::operator*() const'
src/ray/common/memory_monitor.cc:389: error: undefined reference to 'std::filesystem::directory_iterator::operator++()'
/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/fs_dir.h:361: error: undefined reference to 'std::filesystem::directory_iterator::directory_iterator(std::filesystem::path const&, std::filesystem::directory_options, std::error_code*)'
/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/fs_ops.h:121: error: undefined reference to 'std::filesystem::status(std::filesystem::path const&)'
/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/fs_path.h:184: error: undefined reference to 'std::filesystem::path::_M_split_cmpts()'
/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/fs_path.h:184: error: undefined reference to 'std::filesystem::path::_M_split_cmpts()'
/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/fs_path.h:184: error: undefined reference to 'std::filesystem::path::_M_split_cmpts()'
/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/fs_path.h:184: error: undefined reference to 'std::filesystem::path::_M_split_cmpts()'
src/ray/common/file_system_monitor.cc:57: error: undefined reference to 'std::filesystem::space(std::filesystem::path const&, std::error_code&)'
/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/fs_path.h:257: error: undefined reference to 'std::filesystem::path::has_filename() const'
/opt/rh/devtoolset-8/root/usr/lib/gcc/x86_64-redhat-linux/8/../../../../include/c++/8/bits/fs_path.h:380: error: undefined reference to 'std::filesystem::path::has_root_directory() const'
collect2: error: ld returned 1 exit status
Target //:ray_pkg failed to build
INFO: Elapsed time: 10.806s, Critical Path: 9.23s
INFO: 4 processes: 4 internal.
FAILED: Build did NOT complete successfully
OS: CentOS 7.9
gcc: gcc version 8.3.1 20190311 (Red Hat 8.3.1-3)
ray: 2.3