Which version of GCC is required to build the ray from soruce?

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

According to Building Ray from Source — Ray 2.3.0, we need gcc-9

Hi, is this all I have to do ?

I have updated my gcc to 9.0.

Yea, is it working now?

Let us know your progress.

There are some errors rasied during building with gcc 9.3. After googling, told cuased by a gcc bug’(`std::variant` build error on CentOS7 and g++9.3 · Issue #30118 · grpc/grpc · GitHub)`. Put it simply, I failed to build 2.3.0 in my centos with gcc 9.3.

Good news is when updated gcc from 9.3 to 10 , I finally made things done

“Successfully installed ray-2.3.0”

BTW: could you pls guide me how debug the ray suppose I am using vscode. Any help will be appreicated.

Do you want to debug your ray application or ray internal codebase?

Internal codebase . If I can not find the root causes, I don’t have confidence to take it to rebuild our backends.

I normally just add logs for debugging.

What’s the issue you are trying to debug?