John The Ripper cuda souce compile Error Makefile:294 & Makefile:185
5,352
openwall.com highlighted the error
/opt/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4989: undefined reference to > `MD5_body_for_thread'
Solution: Install this version: https://github.com/magnumripper/JohnTheRipper
Related videos on Youtube
Author by
Suleman Hasib
I do DevOps and being an entrepreneur is just the DNA. Oh and a *nix fanboy.
Updated on September 18, 2022Comments
-
Suleman Hasib over 1 year
I am following this guide
http://openwall.info/wiki/john/GPU
but I get errors Makefile:294 & Makefile:185
Environment: x86_64 DISTRIB_ID=Ubuntu DISTRIB_RELEASE=15.10 DISTRIB_CODENAME=wily DISTRIB_DESCRIPTION="Ubuntu 15.10" NAME="Ubuntu" VERSION="15.10 (Wily Werewolf)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 15.10" VERSION_ID="15.10"
Nvidia SMI
+------------------------------------------------------+ | NVIDIA-SMI 352.63 Driver Version: 352.63 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | |===============================+======================+======================| | 0 Quadro K2100M Off | 0000:01:00.0 Off | N/A | | N/A 49C P0 N/A / N/A | 298MiB / 2047MiB | 2% Default | +-------------------------------+----------------------+----------------------+ +-----------------------------------------------------------------------------+ | Processes: GPU Memory | | GPU PID Type Process name Usage | |=============================================================================| | 0 976 G /usr/bin/X 213MiB | | 0 2570 G compiz 63MiB | | 0 8168 G /usr/lib/firefox/plugin-container 9MiB | +-----------------------------------------------------------------------------+
Command run:
$ ./configure && make clean && make -sj4 checking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking whether to compile using MPI... no checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking whether gcc understands -c and -o together... (cached) yes checking additional paths... -L/usr/local/lib -I/usr/local/include checking arg check macro for -m with gcc... yes checking arg check macro for -Q with gcc... yes checking if gcc supports -funroll-loops... yes checking if gcc supports -Os... yes checking if gcc supports -finline-functions... yes checking if gcc supports -Wall... yes checking if gcc supports -Wdeclaration-after-statement... yes checking if gcc supports -fomit-frame-pointer... yes checking if gcc supports --param allow-store-data-races=0... yes checking if gcc supports -Wno-deprecated-declarations... yes checking if gcc supports -Wno-format-extra-args... yes checking if gcc supports -Qunused-arguments... no checking whether ln -s works... yes checking for grep that handles long lines and -e... /bin/grep checking for a sed that does not truncate output... /bin/sed checking for GNU make... make checking whether make sets $(MAKE)... yes checking how to run the C preprocessor... gcc -E checking for a thread-safe mkdir -p... /bin/mkdir -p checking for sort... /usr/bin/sort checking for ar... /usr/bin/ar checking for find... /usr/bin/find checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking if pkg-config will be used... yes checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking size of char... 1 checking size of unsigned char... 1 checking size of short... 2 checking size of unsigned short... 2 checking size of int... 4 checking size of unsigned... 4 checking size of unsigned int... 4 checking size of long... 8 checking size of long long... 8 checking size of double... 8 checking size of long double... 16 checking size of int *... 8 checking size of long long *... 8 checking size of void *... 8 configure: Testing build host's native CPU features checking for MMX... yes checking for SSE2... yes checking for SSSE3... yes checking for SSE4.1... yes checking for AVX... yes checking for AVX2... yes checking for XOP... no checking for arch.h alternative... x86-64.h checking whether compiler understands -march=native... yes checking for 32/64 bit... 64-bit checking for extra ASFLAGS... None needed checking for X32 ABI... no checking for unaligned memory access allowed... yes checking for byte ordering according to target triple... little checking for OPENSSL... yes checking for sqrt in -lm... yes checking for deflate in -lz... yes checking for library containing crypt... -lcrypt checking gmp.h usability... no checking gmp.h presence... no checking for gmp.h... no checking gmp/gmp.h usability... no checking gmp/gmp.h presence... no checking for gmp/gmp.h... no checking skey.h usability... no checking skey.h presence... no checking for skey.h... no checking for S/Key... using our own code checking bzlib.h usability... no checking bzlib.h presence... no checking for bzlib.h... no checking for main in -lkernel32... no checking for dlopen in -ldl... yes checking librexgen/api/c/librexgen.h usability... no checking librexgen/api/c/librexgen.h presence... no checking for librexgen/api/c/librexgen.h... no checking pcap.h usability... no checking pcap.h presence... no checking for pcap.h... no checking pcap/pcap.h usability... no checking pcap/pcap.h presence... no checking for pcap/pcap.h... no checking for pcap.h... (cached) no checking for pcap/pcap.h... (cached) no checking whether time.h and sys/time.h may both be included... yes checking whether string.h and strings.h may both be included... yes checking for EVP_aes_256_xts... yes checking for SHA256... yes checking for WHIRLPOOL... yes checking for RIPEMD160... yes checking for AES_encrypt... yes checking for EVP_sha512... yes checking for BIO_new... yes checking for gcc option to support OpenMP... -fopenmp checking additional paths for OpenCL... none checking if compiler needs -Werror to reject unknown flags... no checking for the pthreads library -lpthreads... no checking whether pthreads work without any flags... no checking whether pthreads work with -Kthread... no checking whether pthreads work with -kthread... no checking for the pthreads library -llthread... no checking whether pthreads work with -pthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... no checking for PTHREAD_PRIO_INHERIT... yes checking whether we are using the Microsoft C compiler... no checking CL/cl.h usability... yes checking CL/cl.h presence... yes checking for CL/cl.h... yes checking OpenCL/cl.h usability... no checking OpenCL/cl.h presence... no checking for OpenCL/cl.h... no checking windows.h usability... no checking windows.h presence... no checking for windows.h... no checking for OpenCL library... -lOpenCL checking additional paths for CUDA... none checking for nvcc... /usr/bin/nvcc checking for llvm-gcc-4.2... no checking for gcc-4.6... no checking for gcc-4.5... no checking for gcc-4.4... no checking for gcc-4.3... no checking for gcc-4.2... no checking cuda.h usability... yes checking cuda.h presence... yes checking for cuda.h... yes checking for cudaGetDeviceCount in -lcudart... yes checking OS.h usability... no checking OS.h presence... no checking for OS.h... no checking arpa/inet.h usability... yes checking arpa/inet.h presence... yes checking for arpa/inet.h... yes checking crypt.h usability... yes checking crypt.h presence... yes checking for crypt.h... yes checking fcntl.h usability... yes checking fcntl.h presence... yes checking for fcntl.h... yes checking limits.h usability... yes checking limits.h presence... yes checking for limits.h... yes checking locale.h usability... yes checking locale.h presence... yes checking for locale.h... yes checking net/ethernet.h usability... yes checking net/ethernet.h presence... yes checking for net/ethernet.h... yes checking netdb.h usability... yes checking netdb.h presence... yes checking for netdb.h... yes checking netinet/in.h usability... yes checking netinet/in.h presence... yes checking for netinet/in.h... yes checking netinet/in_systm.h usability... yes checking netinet/in_systm.h presence... yes checking for netinet/in_systm.h... yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking for stdint.h... (cached) yes checking for stdlib.h... (cached) yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking sys/ethernet.h usability... no checking sys/ethernet.h presence... no checking for sys/ethernet.h... no checking sys/file.h usability... yes checking sys/file.h presence... yes checking for sys/file.h... yes checking sys/param.h usability... yes checking sys/param.h presence... yes checking for sys/param.h... yes checking sys/socket.h usability... yes checking sys/socket.h presence... yes checking for sys/socket.h... yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking sys/timeb.h usability... yes checking sys/timeb.h presence... yes checking for sys/timeb.h... yes checking sys/times.h usability... yes checking sys/times.h presence... yes checking for sys/times.h... yes checking for sys/types.h... (cached) yes checking termios.h usability... yes checking termios.h presence... yes checking for termios.h... yes checking for unistd.h... (cached) yes checking unixlib/local.h usability... no checking unixlib/local.h presence... no checking for unixlib/local.h... no checking wchar.h usability... yes checking wchar.h presence... yes checking for wchar.h... yes checking for windows.h... (cached) no checking for net/if.h... yes checking for net/if_arp.h... yes checking for netinet/if_ether.h... yes checking for netinet/ip.h... yes checking for stdbool.h that conforms to C99... yes checking for _Bool... yes checking for inline... inline checking for int32_t... yes checking for int64_t... yes checking for off_t... yes checking for size_t... yes checking for ssize_t... yes checking for uint16_t... yes checking for uint32_t... yes checking for uint64_t... yes checking for uint8_t... yes checking for ptrdiff_t... yes checking for error_at_line... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for sys/param.h... (cached) yes checking for getpagesize... yes checking for working mmap... yes checking for pid_t... yes checking vfork.h usability... no checking vfork.h presence... no checking for vfork.h... no checking for fork... yes checking for vfork... yes checking for working fork... yes checking for working vfork... (cached) yes checking for fseek64... no checking for fseeko... yes checking for fseeko64... yes checking for _fseeki64... no checking for lseek64... yes checking for lseek... yes checking for ftell64... no checking for ftello... yes checking for ftello64... yes checking for _ftelli64... no checking for fopen64... yes checking for _fopen64... no checking for memmem... yes checking for sleep... yes checking for atexit... yes checking for endpwent... yes checking for floor... no checking for ftruncate... yes checking for gethostbyname... yes checking for gettimeofday... yes checking for inet_ntoa... yes checking for isascii... yes checking for mkdir... yes checking for rmdir... yes checking for setenv... yes checking for putenv... yes checking for strcasecmp... yes checking for strncasecmp... yes checking for stricmp... no checking for strcmpi... no checking for _stricmp... no checking for _strcmpi... no checking for strnicmp... no checking for strncmpi... no checking for _strnicmp... no checking for _strncmpi... no checking for strrchr... yes checking for strcspn... yes checking for strspn... yes checking for strtol... yes checking for strtoul... yes checking for strlwr... no checking for strupr... no checking for bzero... yes checking for atoll... yes checking for _atoi64... no checking for snprintf... yes checking for sprintf_s... no checking for yasm that supports "-g dwarf2 -f elf64"... checking for OS-specific feature macros needed... -D_GNU_SOURCE checking size of size_t... 8 checking size of off_t... 8 configure: creating ./john_build_rule.h configure: creating ./config.status config.status: creating Makefile config.status: creating aes/Makefile config.status: creating aes/aesni/Makefile config.status: creating aes/openssl/Makefile config.status: creating escrypt/Makefile config.status: creating autoconfig.h config.status: autoconfig.h is unchanged config.status: linking x86-64.h to arch.h config.status: executing default commands configure: creating ./fmt_externs.h configure: creating ./fmt_registers.h checking for john.local.conf... exists Configured for building John the Ripper 1.8.0-jumbo-1: Target CPU .................................. x86_64 AVX2, 64-bit LE AES-NI support .............................. depends on OpenSSL Target OS ................................... linux-gnu Cross compiling ............................. no Legacy arch header .......................... x86-64.h OpenMPI support (default disabled) .......... no Fork support ................................ yes OpenMP support .............................. yes OpenCL support .............................. yes CUDA support ................................ yes Generic crypt(3) format ..................... yes Optional libraries found: Rexgen (extra cracking mode) ................ no GMP (performance for SRP formats) ........... no PCAP (vncpcap2john and SIPdump) ............. no BZ2 (gpg2john extra decompression logic) .... yes Development options (these may hurt performance when enabled): Memdbg memory debugging settings ............ disabled AddressSanitizer ("ASAN") ................... disabled Install missing libraries to get any needed features that were omitted. Configure finished. Now 'make clean && make -s' to compile. rm -f ../run/john ../run/unshadow ../run/unafs ../run/unique ../run/undrop ../run/ssh2john ../run/rar2john ../run/zip2john ../run/genmkvpwd ../run/mkvcalcproba ../run/calc_stat ../run/tgtsnarf ../run/racf2john ../run/hccap2john ../run/pwsafe2john ../run/raw2dyna ../run/keepass2john ../run/pfx2john ../run/keychain2john ../run/keyring2john ../run/kwallet2john ../run/dmg2john ../run/putty2john ../run/uaf2john ../run/truecrypt_volume2john ../run/keystore2john ../run/wpapcap2john ../run/gpg2john ../run/cprepair ../run/luks2john ../run/base64conv rm -f john-macosx-* *.o escrypt/*.o *.bak core rm -f ../run/kernels/*.cl ../run/kernels/*.h ../run/kernels/*.bin rm -f detect bench para-bench generic.h tmp.s rm -f cuda/*.o cuda/*~ *~ cp /dev/null Makefile.dep make[1]: Entering directory '/opt/john-1.8.0-jumbo-1/src/aes' /usr/bin/find . -name \*.a -exec rm {} \; /usr/bin/find . -name \*.o -exec rm {} \; make[1]: Leaving directory '/opt/john-1.8.0-jumbo-1/src/aes' make[1]: Entering directory '/opt/john-1.8.0-jumbo-1/src/escrypt' /bin/rm -f tests crypto_scrypt-best.o crypto_scrypt-common.o sha256.o tests.o crypto_scrypt-*.o make[1]: Leaving directory '/opt/john-1.8.0-jumbo-1/src/escrypt' gpg2john.c: In function ‘pkt_type’: gpg2john.c:1194:7: warning: type of ‘tag’ defaults to ‘int’ [-Wimplicit-int] char *pkt_type(tag) { ^ /usr/bin/ar: creating aes.a ptxas info : 0 bytes gmem ptxas info : 0 bytes gmem, 12 bytes cmem[2] ptxas info : Compiling entry function '_Z13kernel_phpassPhP12phpass_crack' for 'sm_20' ptxas info : Function properties for _Z13kernel_phpassPhP12phpass_crack 32 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 18 registers, 48 bytes cmem[0], 16 bytes cmem[16] ptxas info : 0 bytes gmem, 21 bytes cmem[2] ptxas info : Compiling entry function '_Z14kernel_crypt_rP18crypt_md5_passwordP15crypt_md5_crack' for 'sm_20' ptxas info : Function properties for _Z14kernel_crypt_rP18crypt_md5_passwordP15crypt_md5_crack 64 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 28 registers, 5120 bytes smem, 48 bytes cmem[0], 16 bytes cmem[16] ptxas info : 0 bytes gmem, 288 bytes cmem[2] ptxas info : Compiling entry function '_Z13kernel_sha256P15sha256_passwordP11sha256_hash' for 'sm_20' ptxas info : Function properties for _Z13kernel_sha256P15sha256_passwordP11sha256_hash 264 bytes stack frame, 4 bytes spill stores, 4 bytes spill loads ptxas info : Used 63 registers, 48 bytes cmem[0], 24 bytes cmem[16] ptxas info : 0 bytes gmem, 108 bytes cmem[2] ptxas info : Compiling entry function '_Z13pbkdf2_kernelP16mscash2_passwordP12mscash2_hash' for 'sm_20' ptxas info : Function properties for _Z13pbkdf2_kernelP16mscash2_passwordP12mscash2_hash 136 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 50 registers, 48 bytes cmem[0], 4 bytes cmem[16] ptxas info : 0 bytes gmem, 288 bytes cmem[2] ptxas info : Compiling entry function '_Z13kernel_sha256P15sha256_passwordP11sha224_hash' for 'sm_20' ptxas info : Function properties for _Z13kernel_sha256P15sha256_passwordP11sha224_hash 264 bytes stack frame, 8 bytes spill stores, 8 bytes spill loads ptxas info : Used 63 registers, 48 bytes cmem[0], 24 bytes cmem[16] ptxas info : 0 bytes gmem, 42 bytes cmem[2] ptxas info : Compiling entry function '_Z13mscash_kernelP15mscash_passwordP11mscash_hash' for 'sm_20' ptxas info : Function properties for _Z13mscash_kernelP15mscash_passwordP11mscash_hash 112 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 26 registers, 48 bytes cmem[0], 4 bytes cmem[16] ptxas info : 0 bytes gmem, 280 bytes cmem[2] ptxas info : Compiling entry function '_Z14kernel_crypt_rP21crypt_sha256_passwordPj' for 'sm_20' ptxas info : Function properties for _Z14kernel_crypt_rP21crypt_sha256_passwordPj 0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 52 registers, 7680 bytes smem, 48 bytes cmem[0], 28 bytes cmem[16] ptxas info : Function properties for _Z11sha256cryptPKchPjjj4 400 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : 0 bytes gmem, 664 bytes cmem[2] ptxas info : Compiling entry function '_Z14kernel_xsha512iP11xsha512_keyP12xsha512_hashPA110_c' for 'sm_20' ptxas info : Function properties for _Z14kernel_xsha512iP11xsha512_keyP12xsha512_hashPA110_c 200 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 60 registers, 64 bytes cmem[0], 20 bytes cmem[16] ptxas info : Compiling entry function '_Z14kernel_cmp_alliPyPh' for 'sm_20' ptxas info : Function properties for _Z14kernel_cmp_alliPyPh 0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 8 registers, 56 bytes cmem[0] ptxas info : 0 bytes gmem, 648 bytes cmem[2] ptxas info : Compiling entry function '_Z13kernel_sha512P10sha512_keyPA1_y' for 'sm_20' ptxas info : Function properties for _Z13kernel_sha512P10sha512_keyPA1_y 200 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 60 registers, 48 bytes cmem[0], 20 bytes cmem[16] ptxas info : Compiling entry function '_Z14kernel_cmp_alliPyPh' for 'sm_20' ptxas info : Function properties for _Z14kernel_cmp_alliPyPh 0 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 8 registers, 56 bytes cmem[0] ptxas info : 0 bytes gmem ptxas info : Compiling entry function '_Z13kernel_pwsafeP11pwsafe_passP11pwsafe_saltP11pwsafe_hash' for 'sm_20' ptxas info : Function properties for _Z13kernel_pwsafeP11pwsafe_passP11pwsafe_saltP11pwsafe_hash 64 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 35 registers, 56 bytes cmem[0], 24 bytes cmem[16] ptxas info : 0 bytes gmem, 712 bytes cmem[2] ptxas info : Compiling entry function '_Z14kernel_crypt_rP21crypt_sha512_passwordP17crypt_sha512_hash' for 'sm_20' ptxas info : Function properties for _Z14kernel_crypt_rP21crypt_sha512_passwordP17crypt_sha512_hash 8 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 63 registers, 5120 bytes smem, 48 bytes cmem[0], 28 bytes cmem[16] ptxas info : Function properties for _Z11sha512cryptPKchPyjj1 616 bytes stack frame, 88 bytes spill stores, 120 bytes spill loads ptxas info : 0 bytes gmem, 40 bytes cmem[2] ptxas info : Compiling entry function '_Z20wpapsk_pbkdf2_kernelP15wpapsk_passwordP11wpapsk_hash' for 'sm_20' ptxas info : Function properties for _Z20wpapsk_pbkdf2_kernelP15wpapsk_passwordP11wpapsk_hash 216 bytes stack frame, 0 bytes spill stores, 0 bytes spill loads ptxas info : Used 60 registers, 48 bytes cmem[0], 4 bytes cmem[16] dynamic_fmt.o: In function `DynamicFunc__crypt_md5_to_input_raw_Overwrite_NoLen': /opt/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4989: undefined reference to `MD5_body_for_thread' dynamic_fmt.o: In function `DynamicFunc__crypt_md5': /opt/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4425: undefined reference to `MD5_body_for_thread' dynamic_fmt.o: In function `DynamicFunc__crypt_md5_in1_to_out2': /opt/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4732: undefined reference to `MD5_body_for_thread' dynamic_fmt.o: In function `DynamicFunc__crypt_md5_to_input_raw': /opt/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4903: undefined reference to `MD5_body_for_thread' dynamic_fmt.o: In function `DynamicFunc__crypt_md5_to_input_raw_Overwrite_NoLen_but_setlen_in_SSE': /opt/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4946: undefined reference to `MD5_body_for_thread' dynamic_fmt.o:/opt/john-1.8.0-jumbo-1/src/dynamic_fmt.c:4817: more undefined references to `MD5_body_for_thread' follow collect2: error: ld returned 1 exit status Makefile:294: recipe for target '../run/john' failed make[1]: *** [../run/john] Error 1 Makefile:185: recipe for target 'default' failed make: *** [default] Error 2