openwall / john

John the Ripper jumbo - advanced offline password cracker, which supports hundreds of hash and cipher types, and runs on many operating systems, CPUs, GPUs, and even some FPGAs
https://www.openwall.com/john/
Other
10.33k stars 2.1k forks source link

fails to link with bt_hash_type_64.c undefined reference to `add64` #5406

Closed ZeroChaos- closed 10 months ago

ZeroChaos- commented 10 months ago

Checklist

I understand all the instructions, I have replicated my error on HEAD but I haven't joined the mailing list.

IMPORTANT

We expect only reports of issues with the latest revision found in this GitHub repository. We do not expect in here, and have little use for, reports of issues only seen in a release or in a distro package.

Attach details about your OS and about john, including:

Configured for building John the Ripper jumbo:

Target CPU ......................................... x86_64 SSE2, 64-bit LE AES-NI support ..................................... run-time detection Target OS .......................................... linux-gnu Cross compiling .................................... no Legacy arch header ................................. x86-64.h

Optional libraries/features found: Memory map (share/page large files) ................ yes Fork support ....................................... yes OpenMP support ..................................... yes (not for fast formats) OpenCL support ..................................... yes Generic crypt(3) format ............................ yes OpenSSL (many additional formats) .................. yes libgmp (PRINCE mode and faster SRP formats) ........ yes 128-bit integer (faster PRINCE mode) ............... yes libz (7z, pkzip and some other formats) ............ yes libbz2 (7z and gpg2john bz2 support) ............... yes libpcap (vncpcap2john and SIPdump) ................. no Non-free unrar code (complete RAR support) ......... yes librexgen (regex mode, see doc/README.librexgen) ... no OpenMPI support (default disabled) ................. yes Experimental code (default disabled) ............... no ZTEX USB-FPGA module 1.15y support ................. no

Install missing libraries to get any needed features that were omitted.

Configure finished. Now "make -s clean && make -sj4" to compile.

Source configured. Compiling source in /var/tmp/portage/app-crypt/johntheripper-jumbo-1.9.0_p20231229/work/john-62c27ff77466745b49cd310dd4a6bb8a5ab2c0c9 ... make -j30 LD=x86_64-pc-linux-gnu-gcc -C src make: Entering directory '/var/tmp/portage/app-crypt/johntheripper-jumbo-1.9.0_p20231229/work/john-62c27ff77466745b49cd310dd4a6bb8a5ab2c0c9/src' make find_version make[1]: Entering directory '/var/tmp/portage/app-crypt/johntheripper-jumbo-1.9.0_p20231229/work/john-62c27ff77466745b49cd310dd4a6bb8a5ab2c0c9/src' echo "#define JTR_GIT_VERSION JUMBO_VERSION "\"-62c27ff774 2023-12-30 01:37:51 +0100\""" > version.h.new diff >/dev/null 2>/dev/null version.h.new version.h && rm -f version.h.new || mv -f version.h.new version.h make[1]: Leaving directory '/var/tmp/portage/app-crypt/johntheripper-jumbo-1.9.0_p20231229/work/john-62c27ff77466745b49cd310dd4a6bb8a5ab2c0c9/src' make[1]: Entering directory '/var/tmp/portage/app-crypt/johntheripper-jumbo-1.9.0_p20231229/work/john-62c27ff77466745b49cd310dd4a6bb8a5ab2c0c9/src' echo "timestamp from Makefile" > autoconfig-stamp-h-in x86_64-pc-linux-gnu-cc -DAC_BUILT -msse2 -DJOHN_SSE2 -c -Werror=strict-aliasing -flto -Werror=strict-aliasing -flto -Werror=strict-aliasing -flto -Werror=strict-aliasing -flto -DARCH_LITTLE_ENDIAN=1 -DJOHN_SYSTEMWIDE -DJOHN_SYSTEMWIDE_EXEC='"/usr/bin"' -DJOHN_SYSTEMWIDE_HOME='"/etc/john"' -DPREFER_FLOCK -Wall -Wno-stringop-truncation -Wno-format-overflow -Wno-format-truncation -fno-omit-frame-pointer -Wno-deprecated-declarations -Wformat-extra-args -Wunused-but-set-variable -Wdate-time -D_POSIX_SOURCE -D_GNU_SOURCE -D_XOPEN_SOURCE=600 -fopenmp -DHAVE_MPI -DCL_SILENCE_DEPRECATION -DHAVE_OPENCL -funroll-loops yescrypt/yescrypt-opt.c -o yescrypt/yescrypt-opt.o

x86_64-pc-linux-gnu-gcc jumbo.o john_mpi.o DES_fmt.o DES_std.o DES_bs.o DES_bs_b.o BSDI_fmt.o MD5_fmt.o MD5_std.o md5crypt_common.o md5crypt_long_fmt.o BF_fmt.o BF_std.o BF_common.o scrypt_fmt.o yescrypt/yescrypt-opt.o yescrypt/yescrypt-common.o yescrypt/sha256.o AFS_fmt.o LM_fmt.o trip_fmt.o KeccakDuplex.o KeccakF-1600-opt64.o KeccakHash.o KeccakSponge.o whirlpool.o haval.o skein.o md2.o panama.o timer.o omp_autotune.o md5.o rc4.o hmacmd5.o base64_convert.o md4.o sha1.o sha2.o dynamic_fmt.o dynamic_parser.o dynamic_preloads.o dynamic_utils.o dynamic_big_crypt.o dynamic_compiler.o dynamic_compiler_lib.o ripemd.o tiger.o unrarcmd.o unrarfilter.o unrarhlp.o unrar.o unrarppm.o unrarvm.o rar2john.o zip2john.o pkzip.o 7z_common_plug.o 7z_fmt_plug.o AzureAD_common_plug.o AzureAD_fmt_plug.o BFEgg_fmt_plug.o DMD5_fmt_plug.o DOMINOSEC8_fmt_plug.o DOMINOSEC_fmt_plug.o EPI_fmt_plug.o FG2_fmt_plug.o FGT_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_bs_fmt_plug.o NETLM_fmt_plug.o NETLMv2_fmt_plug.o NETNTLM_bs_fmt_plug.o NETNTLMv2_fmt_plug.o NETSPLITLM_fmt_plug.o NS_fmt_plug.o NT-long_fmt_plug.o PHPS2_fmt_plug.o PHPS_fmt_plug.o PO_fmt_plug.o SKEY_fmt_plug.o SKEY_jtr_plug.o SybaseASE_fmt_plug.o SybasePROP_fmt_plug.o XSHA512_fmt_plug.o XSHA_fmt_plug.o adxcrypt_fmt_plug.o aes_ccm_plug.o aes_gcm_plug.o aes_ige_plug.o agilekeychain_common_plug.o agilekeychain_fmt_plug.o aix_ssha_fmt_plug.o andotp_fmt_plug.o androidbackup_common_plug.o androidbackup_fmt_plug.o androidfde_fmt_plug.o ansible_common_plug.o ansible_fmt_plug.o argon2_core_plug.o argon2_encoding_plug.o argon2_fmt_plug.o argon2_opt_plug.o argon2_plug.o argon2_ref_plug.o as400_des_fmt_plug.o as400_ssha1_fmt_plug.o asaMD5_fmt_plug.o asn1_plug.o axcrypt_common_plug.o axcrypt_fmt_plug.o bcrypt_pbkdf_plug.o bestcrypt_fmt_plug.o bestcrypt_ve_fmt_plug.o bitcoin_fmt_plug.o bitlocker_common_plug.o bitlocker_fmt_plug.o bitshares_fmt_plug.o bitwarden_common_plug.o bitwarden_fmt_plug.o bks_fmt_plug.o blackberry_ES10_fmt_plug.o blake256_plug.o blake2b-ref_plug.o blake2b_plug.o blf_plug.o blockchain_common_plug.o blockchain_fmt_plug.o cardano_common_plug.o cardano_fmt_plug.o chacha_plug.o chap_fmt_plug.o citrix_ns_fmt_plug.o clipperz_srp_fmt_plug.o cloudkeychain_common_plug.o cloudkeychain_fmt_plug.o cq_fmt_plug.o crc32_fmt_plug.o cryptosafe_common_plug.o cryptosafe_fmt_plug.o dahua_fmt_plug.o dashlane_common_plug.o dashlane_fmt_plug.o diskcryptor_common_plug.o diskcryptor_fmt_plug.o django_fmt_plug.o django_scrypt_fmt_plug.o dmg_common_plug.o dmg_fmt_plug.o dpapimk_fmt_plug.o dragonfly3_fmt_plug.o dragonfly4_fmt_plug.o drupal7_fmt_plug.o dynamic_compiler_fmt_plug.o ecryptfs_fmt_plug.o eigrp_fmt_plug.o electrum_fmt_plug.o encdatavault_common_plug.o encdatavault_md5_fmt_plug.o encdatavault_pbkdf2_fmt_plug.o encfs_common_plug.o encfs_fmt_plug.o enpass_common_plug.o enpass_fmt_plug.o episerver_fmt_plug.o ethereum_common_plug.o ethereum_fmt_plug.o feal8_plug.o formspring_fmt_plug.o fvde_common_plug.o fvde_fmt_plug.o geli_common_plug.o geli_fmt_plug.o gost3411-2012-core_plug.o gost_fmt_plug.o gpg_common_plug.o gpg_fmt_plug.o groestl_plug.o has160_fmt_plug.o has160_plug.o haval_fmt_plug.o hmacMD5_fmt_plug.o hmacSHA1_fmt_plug.o hmacSHA256_fmt_plug.o hmacSHA512_fmt_plug.o hmac_sha_plug.o hmailserver_fmt_plug.o hsrp_fmt_plug.o idea_plug.o ike_fmt_plug.o itunes_common_plug.o itunes_fmt_plug.o iwork_common_plug.o iwork_fmt_plug.o jh_plug.o keccak_plug.o keepass_common_plug.o keepass_fmt_plug.o keplr_f mt_plug.o keychain_common_plug.o keychain_fmt_plug.o keyring_fmt_plug.o keystore_common_plug.o keystore_fmt_plug.o known_hosts_fmt_plug.o krb5_asrep_common_plug.o krb5_asrep_fmt_plug.o krb5_common_plug.o krb5_db_fmt_plug.o krb5_tgs_common_plug.o krb5_tgs_fmt_plug.o krb5_tgsrep_common_plug.o krb5_tgsrep_fmt_plug.o krb5pa-md5_fmt_plug.o krb5pa-sha1_fmt_plug.o kwallet_fmt_plug.o lastpass_cli_common_plug.o lastpass_cli_fmt_plug.o lastpass_common_plug.o lastpass_fmt_plug.o lastpass_sniffed_fmt_plug.o leet_cc_fmt_plug.o lotus5_fmt_plug.o lotus85_fmt_plug.o luks_fmt_plug.o md2_fmt_plug.o mdc2_fmt_plug.o mdc2dgst_plug.o mediawiki_fmt_plug.o monero_fmt_plug.o money_fmt_plug.o mongodb_fmt_plug.o mongodb_scram_fmt_plug.o mozilla_ng_fmt_plug.o mscash1_fmt_plug.o mscash2_fmt_plug.o mscash_common_plug.o mssql-old_fmt_plug.o mssql05_fmt_plug.o mssql12_fmt_plug.o multibit_fmt_plug.o mysqlSHA1_fmt_plug.o mysql_fmt_plug.o mysql_netauth_fmt_plug.o net_ah_fmt_plug.o net_md5_fmt_plug.o net_sha1_fmt_plug.o notes_common_plug.o notes_fmt_plug.o nsec3_fmt_plug.o nt2_fmt_plug.o ntlmv1_mschapv2_fmt_plug.o nukedclan_fmt_plug.o o10glogon_fmt_plug.o o3logon_fmt_plug.o o5logon_fmt_plug.o oaes_lib_plug.o odf_common_plug.o odf_fmt_plug.o office_common_plug.o office_fmt_plug.o oldoffice_common_plug.o oldoffice_fmt_plug.o openbsdsoftraid_common_plug.o openbsdsoftraid_fmt_plug.o openssl_code_plug.o openssl_enc_fmt_plug.o oracle11_fmt_plug.o oracle12c_fmt_plug.o oracle_fmt_plug.o osc_fmt_plug.o ospf_fmt_plug.o padlock_fmt_plug.o palshop_fmt_plug.o panama_fmt_plug.o pbkdf2-hmac-md4_fmt_plug.o pbkdf2-hmac-md5_fmt_plug.o pbkdf2-hmac-sha1_fmt_plug.o pbkdf2-hmac-sha512_fmt_plug.o pbkdf2_hmac_common_plug.o pbkdf2_hmac_sha256_fmt_plug.o pdf_fmt_plug.o pdfcrack_md5_plug.o pem_common_plug.o pem_fmt_plug.o pfx_common_plug.o pfx_fmt_plug.o pgpdisk_common_plug.o pgpdisk_fmt_plug.o pgpsda_common_plug.o pgpsda_fmt_plug.o pgpwde_common_plug.o pgpwde_fmt_plug.o phpassMD5_fmt_plug.o phpass_common_plug.o pixMD5_fmt_plug.o pkcs12_plug.o pkzip_fmt_plug.o plaintext_fmt_plug.o postgres_fmt_plug.o pst_fmt_plug.o putty_fmt_plug.o pwsafe_common_plug.o pwsafe_fmt_plug.o qnx_fmt_plug.o racf_fmt_plug.o racf_kdfaes_fmt_plug.o radius_fmt_plug.o radmin_fmt_plug.o rakp_fmt_plug.o rar5_fmt_plug.o rar_fmt_plug.o rawBLAKE2_512_fmt_plug.o rawKeccak_256_fmt_plug.o rawKeccak_512_fmt_plug.o rawMD4_fmt_plug.o rawMD5_fmt_plug.o rawMD5flat_fmt_plug.o rawSHA1_common_plug.o rawSHA1_fmt_plug.o rawSHA1_linkedIn_fmt_plug.o rawSHA224_fmt_plug.o rawSHA256_common_plug.o rawSHA256_fmt_plug.o rawSHA384_fmt_plug.o rawSHA512_common_plug.o rawSHA512_fmt_plug.o rawmd5u_fmt_plug.o restic_fmt_plug.o ripemd_fmt_plug.o rsvp_fmt_plug.o rvary_fmt_plug.o salted_sha1_common_plug.o salted_sha1_fmt_plug.o sapB_fmt_plug.o sapG_fmt_plug.o sapH_fmt_plug.o sap_pse_common_plug.o sap_pse_fmt_plug.o securezip_common_plug.o securezip_fmt_plug.o serpent_plug.o sha1crypt_common_plug.o sha1crypt_fmt_plug.o sha256crypt_fmt_plug.o sha3_512_fmt_plug.o sha512crypt_fmt_plug.o siemens-s7_fmt_plug.o signal_fmt_plug.o sip_fmt_plug.o skein_fmt_plug.o sl3_common_plug.o sl3_fmt_plug.o slow_hash_plug.o snefru_fmt_plug.o snefru_plug.o snmp_fmt_plug.o solarwinds_common_plug.o solarwinds_fmt_plug.o ssh_common_plug.o ssh_fmt_plug.o ssha512_fmt_plug.o sspr_common_plug.o sspr_fmt_plug.o stribog_fmt_plug.o strip_common_plug.o strip_fmt_plug.o sunmd5_fmt_plug.o syb-prop_repro_plug.o tacacs_plus_fmt_plug.o tcp_md5_fmt_plug.o telegram_common_plug.o telegram_fmt_plug.o tezos_common_plug.o tezos_fmt_plug.o tiger_fmt_plug.o timeroast_common_plug.o timeroast_fmt_plug.o truecrypt_fmt_plug.o twofish_plug.o vdi_fmt_plug.o vms_fmt_plug.o vmx_common_plug.o vmx_fmt_plug.o vnc_fmt_plug.o vtp_fmt_plug.o wbb3_fmt_plug.o whirlpool_fmt_plug.o wow_srp_fmt_plug.o wpapmk_fmt_plug.o wpapsk_fmt_plug.o xmpp_scram_fmt_plug.o xts_plug.o zed_common_plug.o zed_fmt_plug.o zip_fmt_plug.o zipmonster_fmt_plug.o dyna_salt.o dummy.o gost.o gpu_common.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 mask.o mask_ext.o memory.o misc.o options.o params.o path.o recovery.o rpp.o rules.o signals.o single.o status.o suppressor.o tty.o wordlist.o mkv.o mkvlib.o subsets.o unicode_range.o listconf.o fake_salts.o win32_memmap.o mmap-windows.o uaf_encode.o unicode.o unshadow.o unafs.o undrop.o regex.o pp.o c3_fmt.o lzma/LzmaDec.o lzma/Lzma2Dec.o lzma/Bra.o lzma/Bra86.o lzma/BraIA64.o lzma/CpuArch.o lzma/Delta.o unique.o gpg2john.o showformats.o opencl_common.o opencl_dynamic_loader.o opencl_autotune.o bt.o bt_hash_type_64.o bt_hash_type_128.o bt_hash_type_192.o bt_twister.o opencl_7z_fmt_plug.o opencl_DES_bs_b_plug.o opencl_DES_bs_f_plug.o opencl_DES_bs_h_plug.o opencl_DES_bs_plug.o opencl_DES_fmt_plug.o opencl_agilekeychain_fmt_plug.o opencl_androidbackup_fmt_plug.o opencl_ansible_fmt_plug.o opencl_argon2_fmt_plug.o opencl_axcrypt2_fmt_plug.o opencl_axcrypt_fmt_plug.o opencl_bf_fmt_plug.o opencl_bf_std_plug.o opencl_bitcoin_fmt_plug.o opencl_bitlocker_fmt_plug.o opencl_bitwarden_fmt_plug.o opencl_blockchain_fmt_plug.o opencl_cloudkeychain_fmt_plug.o opencl_cryptosafe_fmt_plug.o opencl_dashlane_fmt_plug.o opencl_diskcryptor_aes_fmt_plug.o opencl_diskcryptor_fmt_plug.o opencl_dmg_fmt_plug.o opencl_electrum_modern_fmt_plug.o opencl_encfs_fmt_plug.o opencl_enpass_fmt_plug.o opencl_ethereum_fmt_plug.o opencl_ethereum_presale_fmt_plug.o opencl_fvde_fmt_plug.o opencl_geli_fmt_plug.o opencl_gpg_fmt_plug.o opencl_hash_check_128_plug.o opencl_hash_check_64_plug.o opencl_iwork_fmt_plug.o opencl_keepass_fmt_plug.o opencl_keychain_fmt_plug.o opencl_keyring_fmt_plug.o opencl_keystore_fmt_plug.o opencl_krb5_asrep_aes_fmt_plug.o opencl_krb5_tgs_fmt_plug.o opencl_krb5_tgsrep_fmt_plug.o opencl_krb5pa-md5_fmt_plug.o opencl_krb5pa-sha1_fmt_plug.o opencl_lastpass_cli_fmt_plug.o opencl_lastpass_fmt_plug.o opencl_lm_b_plug.o opencl_lm_fmt_plug.o opencl_lm_plug.o opencl_lotus5_fmt_plug.o opencl_md5crypt_fmt_plug.o opencl_mscash2_fmt_plug.o opencl_mscash2_helper_plug.o opencl_mscash_fmt_plug.o opencl_mysqlsha1_fmt_plug.o opencl_notes_fmt_plug.o opencl_nt_fmt_plug.o opencl_ntlmv2_fmt_plug.o opencl_o5logon_fmt_plug.o opencl_odf_fmt_plug.o opencl_office_fmt_plug.o opencl_oldoffice_fmt_plug.o opencl_openbsdsoftraid_fmt_plug.o opencl_pbkdf2_hmac_md4_fmt_plug.o opencl_pbkdf2_hmac_md5_fmt_plug.o opencl_pbkdf2_hmac_sha1_fmt_plug.o opencl_pbkdf2_hmac_sha256_fmt_plug.o opencl_pbkdf2_hmac_sha512_fmt_plug.o opencl_pem_fmt_plug.o opencl_pfx_fmt_plug.o opencl_pgpdisk_fmt_plug.o opencl_pgpsda_fmt_plug.o opencl_pgpwde_fmt_plug.o opencl_phpass_fmt_plug.o opencl_pwsafe_fmt_plug.o opencl_rakp_fmt_plug.o opencl_rar5_fmt_plug.o opencl_rar_fmt_plug.o opencl_rawmd4_fmt_plug.o opencl_rawmd5_fmt_plug.o opencl_rawsha1_fmt_plug.o opencl_rawsha256_fmt_plug.o opencl_rawsha512_fmt_plug.o opencl_rawsha512_gpl_fmt_plug.o opencl_salted_sha_fmt_plug.o opencl_sappse_fmt_plug.o opencl_sha1crypt_fmt_plug.o opencl_sha256crypt_fmt_plug.o opencl_sha2_common_plug.o opencl_sha512crypt_fmt_plug.o opencl_sl3_fmt_plug.o opencl_solarwinds_fmt_plug.o opencl_ssh_fmt_plug.o opencl_sspr_fmt_plug.o opencl_strip_fmt_plug.o opencl_tc_fmt_plug.o opencl_telegram_fmt_plug.o opencl_tezos_fmt_plug.o opencl_timeroast_fmt_plug.o opencl_vmx_fmt_plug.o opencl_wpapmk_fmt_plug.o opencl_wpapsk_fmt_plug.o opencl_xsha512_fmt_plug.o opencl_zed_fmt_plug.o opencl_zip_fmt_plug.o x86-64.o simd-intrinsics.o -g -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -L/usr/local/lib -L/usr/local/lib64 -L/usr/lib64 -L/lib64 -lmpi -DHAVE_MPI -lssl -lcrypto -fopenmp -lgmp -lm -lm -lrt -lz -ldl -lcrypt -lbz2 aes/aes.a secp256k1/secp256k1.a ed25519-donna/ed25519-donna.a poly1305-donna/poly1305-donna.a -o ../run/john /usr/lib/gcc/x86_64-pc-linux-gnu/13/../../../../x86_64-pc-linux-gnu/bin/ld: /var/tmp/portage/app-crypt/johntheripper-jumbo-1.9.0_p20231229/temp/cckIQqX6.ltrans0.ltrans.o: in function `calc_ht_idx_64': /var/tmp/portage/app-crypt/johntheripper-jumbo-1.9.0_p20231229/work/john-62c27ff77466745b49cd310dd4a6bb8a5ab2c0c9/src/bt_hash_type_64.c:47:(.text+0x364478): undefined reference to `add64' collect2: error: ld returned 1 exit status make[1]: *** [Makefile:1502: ../run/john] Error 1 ```
solardiz commented 10 months ago

This is puzzling. I've just tested, and build with gcc 13 for x86_64 succeeds on Ubuntu: https://github.com/solardiz/john/actions/runs/7361739125/job/20039405205

solardiz commented 10 months ago

Related: #5326, #5327. We should definitely add more static keywords in those files anyway, which will probably help, but it's unclear to me why gcc/ld would fail like that - looks like a gcc bug.

ZeroChaos- commented 10 months ago

I'm on Gentoo, which as you may know means this could totally be my fault somehow. I am happy to test whatever you like in the way of fixes, but if you are pretty sure it's not your bug then feel free to close.

solardiz commented 10 months ago

@ZeroChaos- I've pushed a change that will likely avoid the issue, please try again and let us know. Thank you!

ZeroChaos- commented 10 months ago

I can confirm that HEAD works as of this moment. Thanks a lot for looking into it and fixing it so quickly.