JPaulMora/Pyrit

clang issue fatal error: 'new' file not found

vido89 opened this issue · 0 comments

Im using Linux Mint 21 x86_64 and Im trying to compile cpyrit_cuda but it uses old clang, my version of clang is

clang --version
Ubuntu clang version 14.0.0-1ubuntu1

I tried installing oldest which I have the clang-11 but Im getting an error

python setup.py clean build
The CUDA compiler and headers required to build kernel were not found. Trying to continue anyway...
running clean
Removing temporary files and pre-built GPU-kernels...
running build
running build_ext
Compiling CUDA module using nvcc 11.5, V11.5.119
Build cuda_11.5.r11.5/compiler.30672275_0...
Executing 'nvcc -m64 -ccbin clang-11 -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu'
In file included from <built-in>:1:
In file included from /usr/include/cuda_runtime.h:115:
/usr/include/crt/common_functions.h:111:10: fatal error: 'new' file not found
#include <new>
         ^~~~~
1 error generated.
Traceback (most recent call last):
  File "setup.py", line 166, in <module>
    setup(**setup_args)
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/distutils/command/build.py", line 128, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 91, in run
    subprocess.check_call(nvcc_cmd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'nvcc -m64 -ccbin clang-11 -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu' returned non-zero exit status 1