[GH-ISSUE #2591] error: ‘SIMD_COEF_64’ undeclared here (not in a function) #1695

Closed
opened 2026-10-15 04:22:36 +07:00 by bsakaguchi · 6 comments
Owner

Originally created by @roycewilliams on GitHub (Jun 27, 2017).
Original GitHub issue: https://github.com/openwall/john/issues/2591

Originally assigned to: @kholia on GitHub.

While compiling f3dba83 on a Raspberry Pi:

$ uname -a
Linux [redacted] 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux

$ gcc --version
gcc (Raspbian 4.9.2-10) 4.9.2

$ ./configure --enable-ztex
[...]
Target CPU ................................. armv7l NEON, 32-bit LE
AES-NI support ............................. no
Target OS .................................. linux-gnueabihf
Cross compiling ............................ no
Legacy arch header ......................... arm32le.h

Optional libraries/features found:
Fuzzing test ............................... no
Experimental code .......................... no
OpenMPI support (default disabled) ......... no
Fork support ............................... yes
OpenMP support ............................. yes (not for fast formats)
OpenCL support ............................. no
Generic crypt(3) format .................... yes
Rexgen (extra cracking mode) ............... no
GMP (PRINCE mode and faster SRP formats) ... no
PCAP (vncpcap2john and SIPdump) ............ no
Z (pkzip format, gpg2john) ................. yes
BZ2 (gpg2john extra decompression logic) ... no
128-bit integer (faster PRINCE mode) ....... no
Memory map (share/page large files) ........ yes
ZTEX USB-FPGA module 1.15y support ......... yes
$ make
[...]
DES_std.c: In function ‘DES_std_set_key’:
DES_std.c:639:17: warning: array subscript is above array bounds [-Warray-bounds]
   while (DES_key[i++]) k += 2;
                 ^
DES_std.c: At top level:
cc1: warning: unrecognized command line option "-Wno-implicit-fallthrough"
DES_bs_b.c: At top level:
cc1: warning: unrecognized command line option "-Wno-implicit-fallthrough"
In file included from simd-intrinsics.h:18:0,
                 from pbkdf2_hmac_sha512.h:23,
                 from electrum_fmt_plug.c:40:
pseudo_intrinsics.h:51:18: error: ‘SIMD_COEF_64’ undeclared here (not in a function)
     uint64_t s64[SIMD_COEF_64];
                  ^
cc1: warning: unrecognized command line option "-Wno-implicit-fallthrough"
Makefile:1602: recipe for target 'electrum_fmt_plug.o' failed
make[1]: *** [electrum_fmt_plug.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Makefile:173: recipe for target 'default' failed
make: *** [default] Error 2

Originally created by @roycewilliams on GitHub (Jun 27, 2017). Original GitHub issue: https://github.com/openwall/john/issues/2591 Originally assigned to: @kholia on GitHub. While compiling f3dba83 on a Raspberry Pi: $ uname -a Linux [redacted] 4.9.24-v7+ #993 SMP Wed Apr 26 18:01:23 BST 2017 armv7l GNU/Linux $ gcc --version gcc (Raspbian 4.9.2-10) 4.9.2 ``` $ ./configure --enable-ztex [...] Target CPU ................................. armv7l NEON, 32-bit LE AES-NI support ............................. no Target OS .................................. linux-gnueabihf Cross compiling ............................ no Legacy arch header ......................... arm32le.h Optional libraries/features found: Fuzzing test ............................... no Experimental code .......................... no OpenMPI support (default disabled) ......... no Fork support ............................... yes OpenMP support ............................. yes (not for fast formats) OpenCL support ............................. no Generic crypt(3) format .................... yes Rexgen (extra cracking mode) ............... no GMP (PRINCE mode and faster SRP formats) ... no PCAP (vncpcap2john and SIPdump) ............ no Z (pkzip format, gpg2john) ................. yes BZ2 (gpg2john extra decompression logic) ... no 128-bit integer (faster PRINCE mode) ....... no Memory map (share/page large files) ........ yes ZTEX USB-FPGA module 1.15y support ......... yes ``` ``` $ make [...] DES_std.c: In function ‘DES_std_set_key’: DES_std.c:639:17: warning: array subscript is above array bounds [-Warray-bounds] while (DES_key[i++]) k += 2; ^ DES_std.c: At top level: cc1: warning: unrecognized command line option "-Wno-implicit-fallthrough" DES_bs_b.c: At top level: cc1: warning: unrecognized command line option "-Wno-implicit-fallthrough" In file included from simd-intrinsics.h:18:0, from pbkdf2_hmac_sha512.h:23, from electrum_fmt_plug.c:40: pseudo_intrinsics.h:51:18: error: ‘SIMD_COEF_64’ undeclared here (not in a function) uint64_t s64[SIMD_COEF_64]; ^ cc1: warning: unrecognized command line option "-Wno-implicit-fallthrough" Makefile:1602: recipe for target 'electrum_fmt_plug.o' failed make[1]: *** [electrum_fmt_plug.o] Error 1 make[1]: *** Waiting for unfinished jobs.... Makefile:173: recipe for target 'default' failed make: *** [default] Error 2
bsakaguchi 2026-10-15 04:22:36 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@kholia commented on GitHub (Jun 27, 2017):

@roycewilliams Does the following patch work?

$ git diff
diff --git a/src/electrum_fmt_plug.c b/src/electrum_fmt_plug.c
index 2bdda3f..51b58f2 100644
--- a/src/electrum_fmt_plug.c
+++ b/src/electrum_fmt_plug.c
@@ -35,7 +35,6 @@ john_register_one(&fmt_electrum);
 #include "sha2.h"
 #include "jumbo.h"
 #include "secp256k1.h"
-#undef SIMD_COEF_64 // hack, will fix in later commit
 #define PBKDF2_HMAC_SHA512_ALSO_INCLUDE_CTX 1 // hack
 #include "pbkdf2_hmac_sha512.h"
 #include "hmac_sha.h"
<!-- gh-comment-id:311263662 --> @kholia commented on GitHub (Jun 27, 2017): @roycewilliams Does the following patch work? ``` $ git diff diff --git a/src/electrum_fmt_plug.c b/src/electrum_fmt_plug.c index 2bdda3f..51b58f2 100644 --- a/src/electrum_fmt_plug.c +++ b/src/electrum_fmt_plug.c @@ -35,7 +35,6 @@ john_register_one(&fmt_electrum); #include "sha2.h" #include "jumbo.h" #include "secp256k1.h" -#undef SIMD_COEF_64 // hack, will fix in later commit #define PBKDF2_HMAC_SHA512_ALSO_INCLUDE_CTX 1 // hack #include "pbkdf2_hmac_sha512.h" #include "hmac_sha.h" ```
Author
Owner

@kholia commented on GitHub (Jun 27, 2017):

@magnumripper The compiler warnings about unrecognized command line option "-Wno-implicit-fallthrough" are annoying and seem to occur on almost every platform. Can we remove it?

<!-- gh-comment-id:311264079 --> @kholia commented on GitHub (Jun 27, 2017): @magnumripper The compiler warnings about `unrecognized command line option "-Wno-implicit-fallthrough"` are annoying and seem to occur on almost every platform. Can we remove it?
Author
Owner

@magnumripper commented on GitHub (Jun 27, 2017):

They are very strange since we're not supposed to use them unless they are supported. I'll investigate.

<!-- gh-comment-id:311356880 --> @magnumripper commented on GitHub (Jun 27, 2017): They are very strange since we're not supposed to use them unless they are supported. I'll investigate.
Author
Owner

@roycewilliams commented on GitHub (Jun 27, 2017):

@kholia Yes, confirmed that your patch resolves the issue for me.

<!-- gh-comment-id:311362881 --> @roycewilliams commented on GitHub (Jun 27, 2017): @kholia Yes, confirmed that your patch resolves the issue for me.
Author
Owner

@kholia commented on GitHub (Jun 27, 2017):

@roycewilliams Thanks! A better patch is going to land soon.

<!-- gh-comment-id:311363920 --> @kholia commented on GitHub (Jun 27, 2017): @roycewilliams Thanks! A better patch is going to land soon.
Author
Owner

@kholia commented on GitHub (Jun 28, 2017):

The fix has been merged, hence closing the issue.

<!-- gh-comment-id:311611140 --> @kholia commented on GitHub (Jun 28, 2017): The fix has been merged, hence closing the issue.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
openwall/john#1695
No description provided.