Recently while attempting to get John The Ripper 1.7.9 jumbo-7 working on a Ubuntu 12.04 LTS Linux server with multiple AMD GPU cards in it I ran across an error during the compile process. The error complained about the VL/cl.h file not being installed and thus could not finishing compiling. Below I describe the compile error, how to locate the Ubuntu package that installs the necessary file to move past the previously mentioned compile error, and then how to install the correct package.
JTR Compile Error: common-opencl.h:8:19: fatal error: CL/cl.h: No such file or directory
- In file included from rar_fmt.c:88:0:
- common-opencl.h:8:19: fatal error: CL/cl.h: No such file or directory
- compilation terminated.
- make[1]: *** [rar_fmt.o] Error 1
- make[1]: Leaving directory `/usr/local/src/jtr/john-1.7.9-jumbo-7/src'
- make: *** [linux-x86-64-opencl] Error 2
The entire output of the compile process can be viewed by clicking below which will expand to show the full output. Locating the specific error will assist you in tracking down errors when compiling software on Linux.
- root@dev:/usr/local/src/jtr/john-1.7.9-jumbo-7/src# make clean linux-x86-64-opencl
- rm -f ../run/john ../run/unshadow ../run/unafs ../run/unique ../run/undrop ../run/ssh2john ../run/pdf2john ../run/rar2john ../run/zip2john ../run/genmkvpwd ../run/mkvcalcproba ../run/calc_stat ../run/tgtsnarf ../run/racf2john ../run/mozilla2john ../run/hccap2john ../run/pwsafe2john ../run/raw2dyna ../run/keepass2john ../run/keychain2john john.local.conf ../run/john.bin ../run/john.com ../run/unshadow.com ../run/unafs.com ../run/unique.com ../run/undrop.com ../run/ssh2john.com ../run/pdf2john.com ../run/rar2john.com ../run/zip2john ../run/racf2john.com ../run/mozilla2john.com ../run/hccap2john.com ../run/pwsafe2john.com ../run/keepass2john.com ../run/keychain2john.com john.local.conf ../run/john.exe ../run/unshadow.exe ../run/unafs.exe ../run/unique.exe ../run/undrop.exe ../run/ssh2john.exe ../run/pdf2john.exe ../run/rar2john.exe ../run/zip2john.exe ../run/genmkvpwd.exe ../run/mkvcalcproba.exe ../run/calc_stat.exe ../run/racf2john.exe ../run/mozilla2john.exe ../run/hccap2john.exe ../run/pwsafe2john.exe ../run/raw2dyna.exe ../run/keepass2john.exe ../run/keychain2john.exe john.local.conf ../run/john-mingw.exe ../run/unshadow.exe ../run/unafs.exe ../run/unique.exe ../run/undrop.exe ../run/ssh2john.exe ../run/pdf2john.exe ../run/rar2john.exe ../run/zip2john.exe ../run/genmkvpwd.exe ../run/mkvcalcproba.exe ../run/calc_stat.exe ../run/racf2john.exe ../run/mozilla2john.exe ../run/hccap2john.exe ../run/pwsafe2john.exe ../run/raw2dyna.exe ../run/keepass2john.exe ../run/keychain2john.exe john.local.conf
- rm -f ../run/john.exe john-macosx-* *.o *.bak core
- rm -f ../run/*.cl ../run/*.h ../run/office2john ../run/vncpcap2john
- rm -f detect bench para-bench generic.h arch.h tmp.s
- rm -f cuda/*.o cuda/*~ *~ ../run/SIPdump
- rm -f fmt_registers.h fmt_externs.h john_build_rule.h
- cp /dev/null Makefile.dep
- ln -f -s x86-64.h arch.h
- make ../run/john ../run/unshadow ../run/unafs ../run/unique ../run/undrop ../run/ssh2john ../run/pdf2john ../run/rar2john ../run/zip2john ../run/genmkvpwd ../run/mkvcalcproba ../run/calc_stat ../run/tgtsnarf ../run/racf2john ../run/mozilla2john ../run/hccap2john ../run/pwsafe2john ../run/raw2dyna ../run/keepass2john ../run/keychain2john john.local.conf \
- JOHN_OBJS=" DES_fmt.o DES_std.o DES_bs.o DES_bs_b.o BSDI_fmt.o MD5_fmt.o MD5_std.o BF_fmt.o BF_std.o AFS_fmt.o LM_fmt.o trip_fmt.o timer.o md5_go.o md5_eq.o md5.o rc4.o hmacmd5.o base64.o md4.o dynamic_fmt.o dynamic_parser.o dynamic_preloads.o dynamic_utils.o rawSHA224_fmt.o rawSHA256_fmt.o rawSHA384_fmt.o rawSHA512_fmt.o hmacMD5_fmt.o hmacSHA1_fmt.o hmacSHA224_fmt.o hmacSHA256_fmt.o hmacSHA384_fmt.o hmacSHA512_fmt.o episerver_fmt.o keepass_fmt.o pwsafe_fmt.o XSHA512_fmt.o hmailserver_fmt.o dragonfly3_fmt.o dragonfly4_fmt.o drupal7_fmt.o django_fmt.o cryptsha256_fmt.o cryptsha512_fmt.o SybaseASE_fmt.o SKEY_fmt.o ssh_fmt.o ssh2john.o pdf_fmt.o pdf2john.o pdfcrack_common.o pdfcrack_md5.o pdfparser.o pdfcrack.o pdfcrack_rc4.o unrarcmd.o unrarfilter.o unrarhlp.o unrar.o unrarppm.o unrarvm.o rar_fmt.o rar2john.o rawSHA0_fmt.o zip_fmt.o zip2john.o gladman_hmac.o gladman_pwd2key.o racf2john.o pwsafe2john.o keepass2john.o keychain2john.o wpapsk_fmt.o hccap2john.o mozilla_fmt.o KeyDBCracker.o mozilla_des.o lowpbe.o mozilla2john.o BFEgg_fmt_plug.o DMD5_fmt_plug.o DOMINOSEC_fmt_plug.o EPI_fmt_plug.o HDAA_fmt_plug.o IPB2_fmt_plug.o KRB4_fmt_plug.o KRB4_std_plug.o KRB5_fmt_plug.o KRB5_std_plug.o MSCHAPv2_fmt_plug.o NETLM_fmt_plug.o NETLMv2_fmt_plug.o NETNTLM_fmt_plug.o NETNTLMv2_fmt_plug.o NETSPLITLM_fmt_plug.o NS_fmt_plug.o NT_fmt_plug.o PHPS_fmt_plug.o PO_fmt_plug.o XSHA_fmt_plug.o crc32_fmt_plug.o gost_fmt_plug.o gost_plug.o keychain_fmt_plug.o lotus5_fmt_plug.o md4_gen_fmt_plug.o mediawiki_fmt_plug.o mscash1_fmt_plug.o mscash2_fmt_plug.o mskrb5_fmt_plug.o mssql-old_fmt_plug.o mssql05_fmt_plug.o mysqlSHA1_fmt_plug.o mysql_fmt_plug.o nsldap_fmt_plug.o nt2_fmt_plug.o odf_fmt_plug.o office_fmt_plug.o oracle11_fmt_plug.o oracle_fmt_plug.o osc_fmt_plug.o phpassMD5_fmt_plug.o pixMD5_fmt_plug.o pkzip_fmt_plug.o racf_fmt_plug.o rawMD4_fmt_plug.o rawMD5_fmt_plug.o rawSHA1_fmt_plug.o rawSHA1_linkedIn_fmt_plug.o rawmd5u_fmt_plug.o salted_sha1_fmt_plug.o sapB_fmt_plug.o sapG_fmt_plug.o sha1_gen_fmt_plug.o sip_fmt_plug.o vnc_fmt_plug.o wbb3_fmt_plug.o rawSHA1_ng_fmt.o plugin.o dummy.o batch.o bench.o charset.o common.o compiler.o config.o cracker.o crc32.o external.o formats.o getopt.o idle.o inc.o john.o list.o loader.o logger.o math.o memory.o misc.o options.o params.o path.o recovery.o rpp.o rules.o signals.o single.o status.o tty.o wordlist.o mkv.o mkvlib.o fake_salts.o win32_memmap.o unicode.o unshadow.o unafs.o undrop.o unique.o common-opencl.o common_opencl_pbkdf2.o opencl_mysqlsha1_fmt.o opencl_cryptmd5_fmt.o opencl_phpass_fmt.o opencl_rawsha1_fmt.o opencl_nt_fmt.o opencl_rawmd5_fmt.o opencl_nsldaps_fmt.o opencl_cryptsha512_fmt.o opencl_mscash2_fmt.o opencl_wpapsk_fmt.o opencl_xsha512_fmt.o opencl_rawsha512_fmt.o opencl_bf_std.o opencl_bf_fmt.o opencl_pwsafe_fmt.o opencl_rawmd4_fmt.o c3_fmt.o x86-64.o sse-intrinsics.o" \
- CFLAGS="-c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native" \
- ASFLAGS="-c -march=native" \
- LDFLAGS="-s -L/usr/local/lib -L/usr/local/ssl/lib -lssl -lcrypto -lm -lz -L/usr/local/cuda/lib/x86_64 -L/usr/local/cuda/lib64 -lcrypt -lOpenCL -ldl -march=native"
- make[1]: Entering directory `/usr/local/src/jtr/john-1.7.9-jumbo-7/src'
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops DES_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops DES_std.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops DES_bs.c
- DES_bs.c:310:25: warning: always_inline function might not be inlinable [-Wattributes]
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -Os -funroll-loops -finline-functions DES_bs_b.c
- DES_bs_b.c:1415:26: warning: always_inline function might not be inlinable [-Wattributes]
- In file included from DES_bs_b.c:1087:0:
- nonstd.c:2956:1: warning: always_inline function might not be inlinable [-Wattributes]
- nonstd.c:2602:1: warning: always_inline function might not be inlinable [-Wattributes]
- nonstd.c:1406:1: warning: always_inline function might not be inlinable [-Wattributes]
- nonstd.c:1250:1: warning: always_inline function might not be inlinable [-Wattributes]
- nonstd.c:1115:1: warning: always_inline function might not be inlinable [-Wattributes]
- nonstd.c:744:1: warning: always_inline function might not be inlinable [-Wattributes]
- nonstd.c:443:1: warning: always_inline function might not be inlinable [-Wattributes]
- nonstd.c:136:1: warning: always_inline function might not be inlinable [-Wattributes]
- DES_bs_b.c:1000:26: warning: always_inline function might not be inlinable [-Wattributes]
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops BSDI_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops MD5_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops MD5_std.c
- MD5_std.c:587:24: warning: always_inline function might not be inlinable [-Wattributes]
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops BF_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops BF_std.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops AFS_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops LM_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops trip_fmt.c
- trip_fmt.c:341:26: warning: always_inline function might not be inlinable [-Wattributes]
- trip_fmt.c:294:26: warning: always_inline function might not be inlinable [-Wattributes]
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops timer.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops md5_go.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops md5_eq.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops md5.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops rc4.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops hmacmd5.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops base64.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops md4.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops dynamic_fmt.c
- dynamic_fmt.c: In function 'cmp_all':
- dynamic_fmt.c:1257:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
- dynamic_fmt.c: In function 'cmp_all_64_4x6':
- dynamic_fmt.c:1296:4: warning: dereferencing type-punned pointer will break strict-aliasing rules [-Wstrict-aliasing]
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops dynamic_parser.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops dynamic_preloads.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops dynamic_utils.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops rawSHA224_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops rawSHA256_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops rawSHA384_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops rawSHA512_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops hmacMD5_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops hmacSHA1_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops hmacSHA224_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops hmacSHA256_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops hmacSHA384_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops hmacSHA512_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops episerver_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops keepass_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops pwsafe_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops XSHA512_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops hmailserver_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops dragonfly3_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops dragonfly4_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops drupal7_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops django_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops cryptsha256_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops cryptsha512_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops SybaseASE_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops SKEY_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops ssh_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops ssh2john.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops pdf_fmt.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops pdf2john.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops pdfcrack_common.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops pdfcrack_md5.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops pdfparser.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops pdfcrack.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops pdfcrack_rc4.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops unrarcmd.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops unrarfilter.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops unrarhlp.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops unrar.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops unrarppm.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops unrarvm.c
- gcc -c -Wall -O2 -fomit-frame-pointer -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/cuda/include -DHAVE_CRYPT -DCL_VERSION_1_0 -DHAVE_DL -march=native -funroll-loops rar_fmt.c
- In file included from rar_fmt.c:88:0:
- common-opencl.h:8:19: fatal error: CL/cl.h: No such file or directory
- compilation terminated.
- make[1]: *** [rar_fmt.o] Error 1
- make[1]: Leaving directory `/usr/local/src/jtr/john-1.7.9-jumbo-7/src'
- make: *** [linux-x86-64-opencl] Error 2
- root@dev:/usr/local/src/jtr/john-1.7.9-jumbo-7/src#
Once you know the details of the specific error such as the file that was not found which caused the compile process to error out you can move towards resolving the issue. In this case we can see that the CL/cl.h is not found so we can use apt-file as shown below to locate the Ubuntu package that will install the missing file. Since we know this version of john can use GPU’s and we are compiling specifically for GPU’s which interface with OpenCL we are likely looking for an OpenCL related package on Ubuntu.
Use apt-file To Locate CL/cl.h:
- root@dev:~# apt-file search '/CL/cl.h'
- libstarpu-contrib-dev: /usr/include/starpu/1.0/socl/CL/cl.h
- libstarpu-contrib-dev: /usr/include/starpu/1.0/socl/CL/cl.hpp
- nvidia-current-dev: /usr/include/nvidia-current/CL/cl.h
- nvidia-current-updates-dev: /usr/include/nvidia-current-updates/CL/cl.h
- nvidia-experimental-304-dev: /usr/include/nvidia-experimental-304/CL/cl.h
- nvidia-experimental-310-dev: /usr/include/nvidia-experimental-310/CL/cl.h
- opencl-headers: /usr/include/CL/cl.h
- opencl-headers: /usr/include/CL/cl.hpp
- root@dev:~#
So you can see there are multiple Ubuntu packages that provide the necessary file and selecting the correct package is important. The server we are using has AMD GPU cards installed so we can immediately rule out any of the Nvidia packages and since we know we are compiling JTR or john with OpenCL support we can assume that the proper package is opencl-headers. Install the package on your Ubuntu server using the syntax displayed in the example below.
Install The opencl-headers Package On Ubuntu Linux:
- root@dev:/usr/local/src/jtr/john-1.7.9-jumbo-7/src# apt-get install opencl-headers
- Reading package lists... Done
- Building dependency tree
- Reading state information... Done
- The following NEW packages will be installed:
- opencl-headers
- 0 upgraded, 1 newly installed, 0 to remove and 31 not upgraded.
- Need to get 59.8 kB of archives.
- After this operation, 1099 kB of additional disk space will be used.
- Get:1 http://us.archive.ubuntu.com/ubuntu/ quantal/universe opencl-headers all 1.2-2012.04.18a-1 [59.8 kB]
- Fetched 59.8 kB in 0s (162 kB/s)
- Selecting previously unselected package opencl-headers.
- (Reading database ... 178083 files and directories currently installed.)
- Unpacking opencl-headers (from .../opencl-headers_1.2-2012.04.18a-1_all.deb) ...
- Setting up opencl-headers (1.2-2012.04.18a-1) ...
- root@dev:/usr/local/src/jtr/john-1.7.9-jumbo-7/src#
Once the opencl-headers package was installed we no longer received the above error during the compile process of John The Ripper version 1.7.9 jumbo-7 on Ubuntu 12.04 LTS.
Click here to check out the JTR application home page or click here for more password cracking articles.