I found out an indirect solution to this issue. I believe this has to do with compiler c++ version. “maybe_unused” came with C++17 and the complier we are using might has older standard, like c++14 as default. Thereby, throwing this error. I haven;t figured out a way to change the c++ standard while building a tutorial in PALABOS yet.
However, for now you can download previous version of PALABOS like v2.2.0, link.
I’ve had a similar problem, which was really annoying since it worked on my PC but didn’t on the HPC cluster.
What I have found is that the compiler version needs to know what [[maybe_unused]] means. That means that one can actually compile the code with the std=c++11 as usual, but one needs a updated compiler (tested with GNU 9.4 and above).
For the redhat distro on my HPC, the default was 8.5, which was not up to date enough. There are modules such that one can choose which GNU version one uses. However, the RedHat distro did not automatically set the environment variable CXX, which the CMakeLists.txt looks for, such that the default version is always used.
What worked for me was:
Load an up to date compiler (GNU >9.4): e.g. module load gnu/10.2
Set the environment CXX via: export CXX=g++
Then go into the build folder, and run the command cmake ..
Proceed as usual with make -j 4
I hope that helps you, or anyone else that is stuck on this error.