qsim
qsim copied to clipboard
compilation failure using g++ 11.3.0
Reported originally at https://github.com/GoogleCloudPlatform/hpc-toolkit/pull/788. The error from this script as follows:
nvcc cuda/pybind_main_cuda.cpp -o ../qsimcirq/qsim_cuda`python3-config --extension-suffix` -O3 -std=c++14 -x cu -Xcompiler \"-Wall -shared -fPIC `python3 -m pybind11 --includes`\"",
cuda/../pybind_main.cpp(53): warning #177-D: handler parameter \"exp\" was declared but never referenced",
,
cuda/../pybind_main.cpp(61): warning #177-D: handler parameter \"exp\" was declared but never referenced",
,
cuda/../pybind_main.cpp(70): warning #177-D: handler parameter \"exp\" was declared but never referenced",
,
/opt/conda/envs/qsim/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/std_function.h:435:145: error: parameter packs not expanded with '...':",
435 | function(_Functor&& __f)",
| ^",
/opt/conda/envs/qsim/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/std_function.h:435:145: note: '_ArgTypes'",
/opt/conda/envs/qsim/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/std_function.h:530:146: error: parameter packs not expanded with '...':",
530 | operator=(_Functor&& __f)",
| ^",
/opt/conda/envs/qsim/x86_64-conda-linux-gnu/include/c++/11.3.0/bits/std_function.h:530:146: note: '_ArgTypes'",
make[1]: *** [Makefile:47: pybind-gpu] Error 1",
The failure (though not the warnings) are observed to go away if we revert to g++ 10.4.0.