[BUG]: doesn't build on ubuntu 22.04 and below with standard cuda
Closed this issue · 1 comments
Bug Report
In ubuntu 22.04 and below the official cuda-package from the nvidia website has to be used instead of the nvidia-cuda-toolkit
from the apt-repositories, because of a compiling error. With the package of the nvidia-website it works, but it is only a workaround and shouldn't be necessary.
Also the code doesn't use any fancy features, so it is unclear, what the reason could be.
Current Behavior:
Get error-message while compiling:
/usr/include/c++/11/bits/std_function.h:530: Fehler: parameter packs not expanded with ‘...’:
/usr/include/c++/11/bits/std_function.h:530:146: error: parameter packs not expanded with ‘...’:
530 | operator=(_Functor&& __f)
| ^
/usr/include/c++/11/bits/std_function.h:530:146: note: ‘_ArgTypes’
make[1]: *** [Makefile:717: gpu_kernel.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Expected Behavior:
Should compile even with the apt package.
Steps To Reproduce:
- install cuda from apt-repos
sudo apt -y install nvidia-cuda-toolkit
- try to compile the code
Environment:
- OS: Ubuntu 22.04
Anything else:
There are already many issues within other repositories, related to this problem, but doesn't provide a real reason for the problem. For example:
Hint could be stackoverflow:
problem was the #include <algorithm>
, which where added for the std::fill_n
-function within the objects.h
, which is included and used within the cuda-kernel. So it was really the same problem like in the stackoverflow-thread: https://stackoverflow.com/questions/74350584/nvcc-compilation-error-using-thrust-in-cuda-11-5 . Removing the algorithm
-include fixed the problem. Luckily the fill_n
still works without this include, so no changes were necessary at the code.