@charles welcome to the community! As far as I know, OpenMC should compile fine with gcc 9 or 10. In your case, it may be that you have multiple versions of gcc and libstdc++ installed and the compiler is linking against the wrong library. A quick search turned up this github issue that may be informative.
@charles I’ve tried both GCC 9 and GCC 10, and I didn’t encounter any issues. The compilation was successful on my side without any problems. If you’d like to give it a try, you can find the notebook with the compilation steps here
I did not provide enough context at first, sorry about that. I am building OpenMC without the submodules.
This led me find out that the fmt version was the culprit. Using fmt/9.1.0 led to my issue, but downgrading to fmt/7.0.3 worked.