RenderKit / ospray

An Open, Scalable, Portable, Ray Tracing Based Rendering Engine for High-Fidelity Visualization
http://ospray.org
Apache License 2.0
982 stars 178 forks source link

Fix build with gcc-11 on Linux #488

Closed t-bltg closed 2 years ago

t-bltg commented 2 years ago

Build fails with gcc 11.2.0 toolchain on Linux:

[...]/modules/mpi/ospray/common/DistributedWorld.cpp:209:48: error: invalid operands to binary expression ('ospray::StatusMsgStream' and 'const ospray::mpi::Region')
          postStatusMsg(OSP_LOG_DEBUG) << "\t" << b << ",";
          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~
[...]gcc-11/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/system_error:263:5: note: candidate function template not viable: no known conversion from 'const ospray::mpi::Region' to 'const std::error_code' for 2nd argument
    operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e)
    ^
[...]gcc-11/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../include/c++/11.2.0/ostream:511:5: note: candidate function template not viable: no known conversion from 'const ospray::mpi::Region' to 'char' for 2nd argument
    operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
    ^
[...]

2 warnings and 1 error generated.
Twinklebear commented 2 years ago

Hi @t-bltg , thanks for reporting this issue! We do want to keep this debug logging on linux since it can be useful on HPC systems, so I've opened a PR on our internal repo to get this code building on gcc-11.2 to resolve this issue. I'll close the PR and link to the commit once that's merged and pushed to github.

Twinklebear commented 2 years ago

This is now on github devel: 9f84576d7021715edff7346a139b6c2dba9cd0e7

t-bltg commented 2 years ago

Thanks :+1: