mukulyadav49 / pyrit

Automatically exported from code.google.com/p/pyrit
0 stars 0 forks source link

NVCC does not compiler CPyrit_CUDA with GCC 4.5+ #307

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I am using Linux Mint Debian Edition w/ an updated kernel and I receive the 
following compilation error when trying to build cpyrit_cuda package:

sudo python setup.py build
running build
running build_ext
Compiling CUDA module using nvcc 4.0, V0.2.1221...
Executing '/usr/local/cuda/bin/nvcc -m64 --host-compilation C -Xcompiler 
"-fPIC" --ptx ./_cpyrit_cudakernel.cu'
nvcc warning : option 'host-compilation' has been deprecated and is ignored
In file included from /usr/local/cuda/bin/../include/cuda_runtime.h:59:0,
                 from <command-line>:0:
/usr/local/cuda/bin/../include/host_config.h:82:2: error: #error -- unsupported 
GNU version! gcc 4.5 and up are not supported!
Traceback (most recent call last):
  File "setup.py", line 175, in <module>
    setup(**setup_args)
  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.6/distutils/command/build.py", line 135, in run
    self.run_command(cmd_name)
  File "/usr/lib/python2.6/distutils/cmd.py", line 333, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "setup.py", line 100, in run
    subprocess.check_call(nvcc_cmd, shell=True)
  File "/usr/lib/python2.6/subprocess.py", line 488, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/usr/local/cuda/bin/nvcc -m64 
--host-compilation C -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu' returned 
non-zero exit status 1

I have defined all the lib libraries and have edited all the necessary files, 
and installed drivers/dependencies:  As far as I know...  Please let me know if 
you have any suggestions.

Original issue reported on code.google.com by HamNE...@gmail.com on 6 May 2011 at 11:24

GoogleCodeExporter commented 9 years ago
do you have libpcap-dev libssl-dev python-dev scapy and build-essential 
installed? I know these are needed for Ubuntu 10.10 perhaps you might want to 
give that a shot first. 

Original comment by GrantWSa...@gmail.com on 7 May 2011 at 4:20

GoogleCodeExporter commented 9 years ago
I am experiencing this issue as well after upgrading to ubuntu 11.04. I to have 
all dependencies installed. Any ideas?

Original comment by haykey...@gmail.com on 7 May 2011 at 3:08

GoogleCodeExporter commented 9 years ago
The error message from nvidia's compiler seems very clear: It can't use GCC 
4.5+ to compile the host code parts. Can you downgrade to GCC 4.4 or try 
upgrading your cuda toolkit to a more recent version?

Original comment by lukas.l...@gmail.com on 9 May 2011 at 7:10

GoogleCodeExporter commented 9 years ago
this is where you can find a fix if you are using ubuntu 11.04

http://forums.nvidia.com/index.php?showtopic=196892

Original comment by haykey...@gmail.com on 26 May 2011 at 10:34

GoogleCodeExporter commented 9 years ago
Hello,

I worked around this issue with installing gcc-4.4 and g++-4.4 on Ubuntu and by 
applying the attached patch to cpyrit-cuda/setup.py. No need to mess with 
alternatives. 

Original comment by bordju...@gmail.com on 21 Jan 2012 at 2:58

Attachments:

GoogleCodeExporter commented 9 years ago
Here is a log of the compilation, installation and execution of pyrist 
list_cores: http://pastebin.com/CuLt37v0

And here is the relevant nvcc help excerpt:

--compiler-bindir <path>                    (-ccbin)                          
        Specify the directory in which the compiler executable (Microsoft 
        Visual Studio cl, or a gcc derivative) resides. By default, this 
        executable is expected in the current executable search path. For a 
        different compiler, or to specify these compilers with a different 
        executable name, specify the path to the compiler including the 
        executable name.

Original comment by bordju...@gmail.com on 21 Jan 2012 at 3:16

GoogleCodeExporter commented 9 years ago
After dealing with other problems I got to the same point-error and solved my 
issues following this advice.
I am running xubuntu 12.10 64 bits with the last drivers from nvidia (304.64) 
and the last cuda_5.0.35 
Mission accomplished, thanks

Pyrit 0.3.0 (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Running benchmark (884.9 PMKs/s)... | 

Computed 899.28 PMKs/s total.
#1: 'CUDA-Device #1 'GeForce 210'': 842.3 PMKs/s (RTT 2.8)
#2: 'Network-Clients': 0.0 PMKs/s (RTT 0.0)

a part form a little detail but my card is recognized and working as expected:

WARNING: Version mismatch between <module 'cpyrit._cpyrit_cpu' from 
'/usr/local/lib/python2.7/dist-packages/cpyrit/_cpyrit_cpu.so'> ('0.3.0') and 
<module 'cpyrit._cpyrit_cuda' from 
'/usr/local/lib/python2.7/dist-packages/cpyrit/_cpyrit_cuda.so'> ('0.4.0')

Pyrit 0.3.0 (C) 2008-2010 Lukas Lueg http://pyrit.googlecode.com
This code is distributed under the GNU General Public License v3+

Parsing file 'Orange-4259-01.cap' (1/1)...
9912 packets (9912 802.11-packets), 1 APs

^Cied 60003 PMKs so far; 1702 PMKs per second.
Interrupted...

Original comment by kcdt...@gmail.com on 19 Feb 2013 at 4:24

GoogleCodeExporter commented 9 years ago
Hi,anyone can poitnme in tne right direction please...i want to instal pyrit on 
a macbook with 10.8 and i get this

Users-MacBook-Pro-2:cpyrit_cuda user$  sudo LDFLAGS=-L/usr/local/cuda/lib 
python setup.py install
running install
running build
running build_ext
Compiling CUDA module using nvcc 3.2, V0.2.1221...
Executing '/usr/local/cuda/bin/nvcc -m64 --host-compilation C -Xcompiler 
"-fPIC" --ptx ./_cpyrit_cudakernel.cu'
nvcc warning : option 'host-compilation' has been deprecated and is ignored
clang: error: unsupported option '-dumpspecs'
clang: error: no input files
Traceback (most recent call last):
  File "setup.py", line 175, in <module>
    setup(**setup_args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/install.py", line 573, in run
    self.run_command('build')
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/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 "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 511, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '/usr/local/cuda/bin/nvcc -m64 
--host-compilation C -Xcompiler "-fPIC" --ptx ./_cpyrit_cudakernel.cu' returned 
non-zero exit status 1

Thank you!

Original comment by aly...@gmail.com on 26 Sep 2013 at 1:29