Drop dependencies on non-distributable ADL/NVML headers. The needed glue
[hashcat.git] / docs / BUILD.md
1 oclHashcat build documentation
2 =
3 # Revision:
4 * 1.2
5
6 # Authors:
7 * Gabriele Gristina <<matrix@hashcat.net>>
8 * Christoph Heuwieser <<dropdead@hashcat.net>>
9
10 # Dependencies
11
12 To compile **oclHashcat** the following third party libraries are required:
13
14 - ADL_SDK v9.0 ( http://developer.amd.com/tools-and-sdks/graphics-development/display-library-adl-sdk/ )
15 - NVAPI R352 ( https://developer.nvidia.com/nvapi )
16 - GDK v352_55 ( https://developer.nvidia.com/gpu-deployment-kit )
17
18 The next thing to do is download all the third party libraries listed above and put these files into the *deps/tmp* directory.
19
20 The following files are needed inside the *deps/tmp* directory:
21
22     R352-developer.zip  (only needed when cross-compiling for Windows)
23
24 # Building oclHashcat
25 First get a copy of the **oclHashcat** repository
26
27 ```sh
28 $ git clone https://github.com/hashcat/oclHashcat.git
29 ```
30 Install the dependencies (root permission needed)
31
32 ```sh
33 $ cd oclHashcat
34 $ ./tools/deps.sh
35 ```
36
37 Run "make"
38
39 ```sh
40 $ make
41 ```
42
43 to install it run "make install"
44
45 ```sh
46 $ make install
47 ```
48
49 Useful tricks:
50 - build native linux/osx binaries
51 ```sh
52 $ make
53 ```
54
55 - build all binaries (see Note1 and Note2):
56 ```sh
57 $ make binaries
58 ```
59
60 Note1: to install all binaries ("make binaries") you need to first clone the OpenCL-Headers within the main folder:
61
62 ```sh
63 $ git clone https://github.com/KhronosGroup/OpenCL-Headers deps/OpenCL-Headers/CL
64 ```
65
66 the tools/deps.sh script does not clone this repo automatically since for native compilation it is not needed.
67
68 Note2: if you get an error like the following one for "make binaries"
69
70 ```sh
71 /usr/bin/ld: cannot find -lOpenCL
72 ```
73
74 the main reason is probably that the 32-bit version of libOpenCL.so was not found.
75
76 A possible solution is to just symbolic link it (if the 32-bit version of libOpenCL.so.1 exists), for example:
77
78 ```sh
79 sudo ln -s /usr/lib/i386-linux-gnu/libOpenCL.so.1 /usr/lib/i386-linux-gnu/libOpenCL.so
80 ```
81
82 =
83 Enjoy your fresh **oclHashcat** binaries ;)