[GH-ISSUE #623] Legacy builds (-f makefile.orig) broken (again) #288

Closed
opened 2026-10-14 02:59:57 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @frank-dittrich on GitHub (Jun 5, 2014).
Original GitHub issue: https://github.com/openwall/john/issues/623

Originally assigned to: @jfoug on GitHub.

Tested latest bleeding-jumbo github.com/magnumripper/JohnTheRipper@7fddd4b3c4 on 64bit linux:

native (gcc):

$ make -s distclean ; make -s -j 8 -f Makefile.orig linux-x86-64-native 
DES_std.c: In function ‘DES_std_set_key’:
DES_std.c:637:17: warning: array subscript is above array bounds [-Warray-bounds]
   while (DES_key[i++]) k += 2;
                 ^
mkvcalcproba.c: In function ‘main’:
mkvcalcproba.c:190:23: error: expected ‘)’ before ‘LLd’
    printf("\t%d\t%d\t"LLd"\t%d\n",k,i,index,l);
                       ^
mkvcalcproba.c:190:23: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
mkvcalcproba.c:190:23: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=]
make[1]: *** [mkvcalcproba.o] Error 1
make[1]: *** Waiting for unfinished jobs....
ar: creating aes.a
make: *** [linux-x86-64-native] Error 2

clang:

$ make -s distclean ; make -s -j 8 -f Makefile.orig linux-x86-64-clang
cracker.c:376:3: warning: data argument not used by format string [-Wformat-extra-args]
                crk_db->salt_count);
                ^
1 warning generated.
gpg2john.c:430:1: warning: variable 'SYM_ALGS' is not needed and will not be emitted [-Wunneeded-internal-declaration]
SYM_ALGS[] = {
^
gpg2john.c:1017:1: warning: variable 'TAG' is not needed and will not be emitted [-Wunneeded-internal-declaration]
TAG[] = {
^
gpg2john.c:1155:1: warning: variable 'SIGSUB' is not needed and will not be emitted [-Wunneeded-internal-declaration]
SIGSUB[] = {
^
mkvcalcproba.c:190:23: error: expected ')'
                        printf("\t%d\t%d\t"LLd"\t%d\n",k,i,index,l);
                                           ^
mkvcalcproba.c:190:10: note: to match this '('
                        printf("\t%d\t%d\t"LLd"\t%d\n",k,i,index,l);
                              ^
1 error generated.
make[1]: *** [mkvcalcproba.o] Error 1
make[1]: *** Waiting for unfinished jobs....
3 warnings generated.
ar: creating aes.a
make: *** [linux-x86-64-clang] Error 2
Originally created by @frank-dittrich on GitHub (Jun 5, 2014). Original GitHub issue: https://github.com/openwall/john/issues/623 Originally assigned to: @jfoug on GitHub. Tested latest bleeding-jumbo https://github.com/magnumripper/JohnTheRipper/commit/7fddd4b3c4f82a2cc03b9b030a2420a7b1b0db3e on 64bit linux: native (gcc): ``` $ make -s distclean ; make -s -j 8 -f Makefile.orig linux-x86-64-native DES_std.c: In function ‘DES_std_set_key’: DES_std.c:637:17: warning: array subscript is above array bounds [-Warray-bounds] while (DES_key[i++]) k += 2; ^ mkvcalcproba.c: In function ‘main’: mkvcalcproba.c:190:23: error: expected ‘)’ before ‘LLd’ printf("\t%d\t%d\t"LLd"\t%d\n",k,i,index,l); ^ mkvcalcproba.c:190:23: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=] mkvcalcproba.c:190:23: warning: format ‘%d’ expects a matching ‘int’ argument [-Wformat=] make[1]: *** [mkvcalcproba.o] Error 1 make[1]: *** Waiting for unfinished jobs.... ar: creating aes.a make: *** [linux-x86-64-native] Error 2 ``` clang: ``` $ make -s distclean ; make -s -j 8 -f Makefile.orig linux-x86-64-clang cracker.c:376:3: warning: data argument not used by format string [-Wformat-extra-args] crk_db->salt_count); ^ 1 warning generated. gpg2john.c:430:1: warning: variable 'SYM_ALGS' is not needed and will not be emitted [-Wunneeded-internal-declaration] SYM_ALGS[] = { ^ gpg2john.c:1017:1: warning: variable 'TAG' is not needed and will not be emitted [-Wunneeded-internal-declaration] TAG[] = { ^ gpg2john.c:1155:1: warning: variable 'SIGSUB' is not needed and will not be emitted [-Wunneeded-internal-declaration] SIGSUB[] = { ^ mkvcalcproba.c:190:23: error: expected ')' printf("\t%d\t%d\t"LLd"\t%d\n",k,i,index,l); ^ mkvcalcproba.c:190:10: note: to match this '(' printf("\t%d\t%d\t"LLd"\t%d\n",k,i,index,l); ^ 1 error generated. make[1]: *** [mkvcalcproba.o] Error 1 make[1]: *** Waiting for unfinished jobs.... 3 warnings generated. ar: creating aes.a make: *** [linux-x86-64-clang] Error 2 ```
bsakaguchi 2026-10-14 02:59:57 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@frank-dittrich commented on GitHub (Jun 5, 2014):

6369737b84f8b6ecbc0ae613835c4d08e6fcb80f is the first bad commit
commit 6369737b84f8b6ecbc0ae613835c4d08e6fcb80f
Author: jfoug <jfoug@cox.net>
Date:   Wed Jun 4 17:53:01 2014 -0500

    Wrapped all unistd.h in wrappers.  Made a wrapper for other headers (fcntl.h, etc). Switched to using -std=c99 in MinGW, which eliminates most of the printf formatting issues, BUT which caused some porting issues
$ git bisect log 
git bisect start
# bad: [7fddd4b3c4f82a2cc03b9b030a2420a7b1b0db3e] Revert the redundant "=1" for -D. Drop a large block of comments that does not belong in source. Change more 'dnl' to backslashes.
git bisect bad 7fddd4b3c4f82a2cc03b9b030a2420a7b1b0db3e
# good: [884d54622b03b97eb4368cf0495873cbb9574539] Bugfix for 1f341404. You can't use HAVE_ macros unless including autoconfig.h...
git bisect good 884d54622b03b97eb4368cf0495873cbb9574539
# good: [ac90d29baf9a5cec002c846b1d3dc4fba68d0b28] Added check for -ldl OR windows.h and if neither, then do NOT add any GPU code.  There is a warning emitted in such case for intel chips.  Also changed common-gpu.c to properly use the WINDOWS_H code.  This still should work on Makefile.orig, since HAVE_LIBDL is defined for GPU targets
git bisect good ac90d29baf9a5cec002c846b1d3dc4fba68d0b28
# bad: [8065ad49cc9a3e09e84ac7e1b3096a454f210f22] The change for krb5 in 41969aec had the side effect LIBS was polluted.
git bisect bad 8065ad49cc9a3e09e84ac7e1b3096a454f210f22
# good: [56f0d87aec87448b301224ec3491f7dc902db64f] Set AC_BUILT to 1. Also, added @PTHREAD_CFLAGS@ to uaf2john.  It would not link on mingw without this
git bisect good 56f0d87aec87448b301224ec3491f7dc902db64f
# bad: [6369737b84f8b6ecbc0ae613835c4d08e6fcb80f] Wrapped all unistd.h in wrappers.  Made a wrapper for other headers (fcntl.h, etc). Switched to using -std=c99 in MinGW, which eliminates most of the printf formatting issues, BUT which caused some porting issues
git bisect bad 6369737b84f8b6ecbc0ae613835c4d08e6fcb80f
# first bad commit: [6369737b84f8b6ecbc0ae613835c4d08e6fcb80f] Wrapped all unistd.h in wrappers.  Made a wrapper for other headers (fcntl.h, etc). Switched to using -std=c99 in MinGW, which eliminates most of the printf formatting issues, BUT which caused some porting issues
<!-- gh-comment-id:45197914 --> @frank-dittrich commented on GitHub (Jun 5, 2014): ``` 6369737b84f8b6ecbc0ae613835c4d08e6fcb80f is the first bad commit commit 6369737b84f8b6ecbc0ae613835c4d08e6fcb80f Author: jfoug <jfoug@cox.net> Date: Wed Jun 4 17:53:01 2014 -0500 Wrapped all unistd.h in wrappers. Made a wrapper for other headers (fcntl.h, etc). Switched to using -std=c99 in MinGW, which eliminates most of the printf formatting issues, BUT which caused some porting issues ``` ``` $ git bisect log git bisect start # bad: [7fddd4b3c4f82a2cc03b9b030a2420a7b1b0db3e] Revert the redundant "=1" for -D. Drop a large block of comments that does not belong in source. Change more 'dnl' to backslashes. git bisect bad 7fddd4b3c4f82a2cc03b9b030a2420a7b1b0db3e # good: [884d54622b03b97eb4368cf0495873cbb9574539] Bugfix for 1f341404. You can't use HAVE_ macros unless including autoconfig.h... git bisect good 884d54622b03b97eb4368cf0495873cbb9574539 # good: [ac90d29baf9a5cec002c846b1d3dc4fba68d0b28] Added check for -ldl OR windows.h and if neither, then do NOT add any GPU code. There is a warning emitted in such case for intel chips. Also changed common-gpu.c to properly use the WINDOWS_H code. This still should work on Makefile.orig, since HAVE_LIBDL is defined for GPU targets git bisect good ac90d29baf9a5cec002c846b1d3dc4fba68d0b28 # bad: [8065ad49cc9a3e09e84ac7e1b3096a454f210f22] The change for krb5 in 41969aec had the side effect LIBS was polluted. git bisect bad 8065ad49cc9a3e09e84ac7e1b3096a454f210f22 # good: [56f0d87aec87448b301224ec3491f7dc902db64f] Set AC_BUILT to 1. Also, added @PTHREAD_CFLAGS@ to uaf2john. It would not link on mingw without this git bisect good 56f0d87aec87448b301224ec3491f7dc902db64f # bad: [6369737b84f8b6ecbc0ae613835c4d08e6fcb80f] Wrapped all unistd.h in wrappers. Made a wrapper for other headers (fcntl.h, etc). Switched to using -std=c99 in MinGW, which eliminates most of the printf formatting issues, BUT which caused some porting issues git bisect bad 6369737b84f8b6ecbc0ae613835c4d08e6fcb80f # first bad commit: [6369737b84f8b6ecbc0ae613835c4d08e6fcb80f] Wrapped all unistd.h in wrappers. Made a wrapper for other headers (fcntl.h, etc). Switched to using -std=c99 in MinGW, which eliminates most of the printf formatting issues, BUT which caused some porting issues ```
Author
Owner

@jfoug commented on GitHub (Jun 5, 2014):

I have a fix, but can not push. I have even pulled a complete new git clone, patched it, and still can not push.

Simply add #include "jumbo.h" into mkvcalcproba.c. There is also a change to jumbo, but it will not impact anything other than a build under win32. I do not know how to get the git-push working. Even trying git pull --rebase is failing.

<!-- gh-comment-id:45210099 --> @jfoug commented on GitHub (Jun 5, 2014): I have a fix, but can not push. I have even pulled a complete new git clone, patched it, and still can not push. Simply add #include "jumbo.h" into mkvcalcproba.c. There is also a change to jumbo, but it will not impact anything other than a build under win32. I do not know how to get the git-push working. Even trying git pull --rebase is failing.
Author
Owner

@jfoug commented on GitHub (Jun 5, 2014):

Fixed 34c4674

<!-- gh-comment-id:45210197 --> @jfoug commented on GitHub (Jun 5, 2014): Fixed 34c4674
Author
Owner

@jfoug commented on GitHub (Jun 5, 2014):

Sorry, fixed in 4a8de2e

<!-- gh-comment-id:45210374 --> @jfoug commented on GitHub (Jun 5, 2014): Sorry, fixed in 4a8de2e
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#288
No description provided.