Can't Install Cpyrit Cuda After Installing Nvidia Cuda Toolkit 8.0

I decided to use pyrit with gpu. I have read all guides on internet. I upgraded my system to 4.9.0 kali1. I installed nvidia drivers and nvidia cuda. When i try to install cpyrit-cuda-4.0 in this link https://code.google.com/archive/p/pyrit/downloads as in the guides, it gives an error. In the guides they use cuda 7.5 without any problem and i think maybe somethings changed in 8.0. When i open cpyrit-cuda path with terminal and write python setup.py build it gives me this error:

~/Downloads/cpyrit-cuda-0.4.0# python setup.py build
The CUDA compiler and headers required to build kernel were not found. Trying to continue anyway…
svn: E155007: ‘/root/Downloads/cpyrit-cuda-0.4.0’ is not a working copy
running build
running build_ext
Compiling CUDA module using nvcc 8.0, V8.0.44…
Executing ‘nvcc -m64 --host-compilation C -Xcompiler “-fPIC” --ptx ./_cpyrit_cudakernel.cu’
nvcc fatal : Unknown option ‘-host-compilation’
Traceback (most recent call last):
File “setup.py”, line 175, in
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 100, in run
subprocess.check_call(nvcc_cmd, shell=True)
File “/usr/lib/python2.7/subprocess.py”, line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘nvcc -m64 --host-compilation C -Xcompiler “-fPIC” --ptx ./_cpyrit_cudakernel.cu’ returned non-zero exit status 1
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘nvcc -m64 --host-compilation C -Xcompiler “-fPIC” --ptx ./_cpyrit_cudakernel.cu’ returned non-zero exit status 1

Please help me…

Hi HackEndLess,

The solution is the following:

  • install latest “clang” version
  • in setup.py you put:
    ‘-ccbin clang’
  • instead of :
    ‘–host-compilation C’

Then, all works like a charm.

Success !!