{"action":"created","issue":{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1874","labels_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1874/labels{/name}","comments_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1874/comments","events_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1874/events","html_url":"https://github.com/magnumripper/JohnTheRipper/issues/1874","id":114496116,"number":1874,"title":"clang build for Raspberry Pi 2 fails","user":{"login":"frank-dittrich","id":2026819,"avatar_url":"https://avatars.githubusercontent.com/u/2026819?v=3","gravatar_id":"","url":"https://api.github.com/users/frank-dittrich","html_url":"https://github.com/frank-dittrich","followers_url":"https://api.github.com/users/frank-dittrich/followers","following_url":"https://api.github.com/users/frank-dittrich/following{/other_user}","gists_url":"https://api.github.com/users/frank-dittrich/gists{/gist_id}","starred_url":"https://api.github.com/users/frank-dittrich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frank-dittrich/subscriptions","organizations_url":"https://api.github.com/users/frank-dittrich/orgs","repos_url":"https://api.github.com/users/frank-dittrich/repos","events_url":"https://api.github.com/users/frank-dittrich/events{/privacy}","received_events_url":"https://api.github.com/users/frank-dittrich/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/labels/portability","name":"portability","color":"fbca04"}],"state":"closed","locked":false,"assignee":{"login":"jfoug","id":1270024,"avatar_url":"https://avatars.githubusercontent.com/u/1270024?v=3","gravatar_id":"","url":"https://api.github.com/users/jfoug","html_url":"https://github.com/jfoug","followers_url":"https://api.github.com/users/jfoug/followers","following_url":"https://api.github.com/users/jfoug/following{/other_user}","gists_url":"https://api.github.com/users/jfoug/gists{/gist_id}","starred_url":"https://api.github.com/users/jfoug/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jfoug/subscriptions","organizations_url":"https://api.github.com/users/jfoug/orgs","repos_url":"https://api.github.com/users/jfoug/repos","events_url":"https://api.github.com/users/jfoug/events{/privacy}","received_events_url":"https://api.github.com/users/jfoug/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/milestones/2","html_url":"https://github.com/magnumripper/JohnTheRipper/milestones/1.8.0-jumbo-2","labels_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/milestones/2/labels","id":492145,"number":2,"title":"1.8.0-jumbo-2","description":"Please assign ALL issues which should be in J2 to this milestone, and lets push forward in fixing all of them.","creator":{"login":"magnumripper","id":1268598,"avatar_url":"https://avatars.githubusercontent.com/u/1268598?v=3","gravatar_id":"","url":"https://api.github.com/users/magnumripper","html_url":"https://github.com/magnumripper","followers_url":"https://api.github.com/users/magnumripper/followers","following_url":"https://api.github.com/users/magnumripper/following{/other_user}","gists_url":"https://api.github.com/users/magnumripper/gists{/gist_id}","starred_url":"https://api.github.com/users/magnumripper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnumripper/subscriptions","organizations_url":"https://api.github.com/users/magnumripper/orgs","repos_url":"https://api.github.com/users/magnumripper/repos","events_url":"https://api.github.com/users/magnumripper/events{/privacy}","received_events_url":"https://api.github.com/users/magnumripper/received_events","type":"User","site_admin":false},"open_issues":79,"closed_issues":202,"state":"open","created_at":"2013-11-21T06:59:25Z","updated_at":"2015-11-02T16:38:24Z","due_on":null,"closed_at":null},"comments":12,"created_at":"2015-11-01T22:06:01Z","updated_at":"2015-11-02T18:44:04Z","closed_at":"2015-11-02T16:38:24Z","body":"A regular autoconf build works, with and without openmp. But using clang instead of gcc doesn't.  \r\n\r\n```\r\n$ clang --version\r\nRaspbian clang version 3.5.0-10+rpi1 (tags/RELEASE_350/final) (based on LLVM 3.5.0)\r\nTarget: arm-unknown-linux-gnueabihf\r\nThread model: posix\r\n$ clang -dumpversion\r\n4.2.1\r\n$ uname -a\r\nLinux raspberrypi 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux\r\n```\r\n```\r\nclang -DAC_BUILT -march=native  -c -g -O2 -I/usr/local/include -DARCH_LITTLE_ENDIAN=1   -Wall -Wdeclaration-after-statement -fomit-frame-pointer -Wno-deprecated-declarations -Wno-format-extra-args -Qunused-arguments -std=gnu89 -Wdate-time -D_POSIX_SOURCE -D_GNU_SOURCE -D_XOPEN_SOURCE=600 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE      -pthread  -I/usr/local/include -funroll-loops MD5_fmt.c -o MD5_fmt.o\r\nMD5_fmt.c:389:10: error: expected '}'\r\n                \"MD5 \" MD5_ALGORITHM_NAME,\r\n                       ^\r\n./simd-intrinsics.h:79:29: note: expanded from macro 'MD5_ALGORITHM_NAME'\r\n#define MD5_ALGORITHM_NAME              BITS \" \" SIMD_TYPE \" \" MD5_N_STR\r\n                                        ^\r\nMD5_fmt.c:386:2: note: to match this '{'\r\n        {\r\n        ^\r\n1 error generated.\r\nMakefile:1534: recipe for target 'MD5_fmt.o' failed\r\nmake[1]: *** [MD5_fmt.o] Error 1\r\nmake[1]: Leaving directory '/usb/home/fd/git/JtR/src'\r\nMakefile:187: recipe for target 'default' failed\r\nmake: *** [default] Error 2\r\n```\r\n\r\nIf I try to compile that that single file with gcc, I get the same error:\r\n```\r\n $ gcc  -DAC_BUILT -march=native  -c -g -O2 -I/usr/local/include -DARCH_LITTLE_ENDIAN=1   -Wall -Wdeclaration-after-statement -fomit-frame-pointer -Wno-deprecated-declarations -Wno-format-extra-args -std=gnu89 -Wdate-time -D_POSIX_SOURCE -D_GNU_SOURCE -D_XOPEN_SOURCE=600 -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE      -pthread  -I/usr/local/include -funroll-loops MD5_fmt.c -o MD5_fmt.o\r\nIn file included from MD5_fmt.c:17:0:\r\nsimd-intrinsics.h:79:29: error: expected ‘}’ before ‘BITS’\r\n #define MD5_ALGORITHM_NAME  BITS \" \" SIMD_TYPE \" \" MD5_N_STR\r\n                             ^\r\nMD5_fmt.c:389:10: note: in expansion of macro ‘MD5_ALGORITHM_NAME’\r\n   \"MD5 \" MD5_ALGORITHM_NAME,\r\n          ^\r\nMD5_fmt.c:52:25: warning: ‘tests’ defined but not used [-Wunused-variable]\r\n static struct fmt_tests tests[] = {\r\n                         ^\r\n```\r\n\r\n\r\n\r\nTo see what else fails, I just touched MD5_fmt.o and continued.\r\n\r\n```\r\n$ touch MD5_fmt.o; make -s\r\ndynamic_fmt.c:4837:8: error: use of undeclared identifier 'input_buf'\r\n                        p = input_buf[i+j].w;\r\n                            ^\r\ndynamic_fmt.c:4838:20: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                        for (k = 0; k < SIMD_COEF_32; k++)\r\n                                        ^\r\ndynamic_fmt.c:4839:10: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                                p[14*SIMD_COEF_32+k] = total_len[i+j][k] << 3;\r\n                                     ^\r\ndynamic_fmt.c:4839:28: error: use of undeclared identifier 'total_len'\r\n                                p[14*SIMD_COEF_32+k] = total_len[i+j][k] << 3;\r\n                                                       ^\r\ndynamic_fmt.c:4846:8: error: use of undeclared identifier 'input_buf2'\r\n                        p = input_buf2[i+j].w;\r\n                            ^\r\ndynamic_fmt.c:4847:20: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                        for (k = 0; k < SIMD_COEF_32; k++)\r\n                                        ^\r\ndynamic_fmt.c:4848:10: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                                p[14*SIMD_COEF_32+k] = total_len2[i+j][k] << 3;\r\n                                     ^\r\ndynamic_fmt.c:4848:28: error: use of undeclared identifier 'total_len2'\r\n                                p[14*SIMD_COEF_32+k] = total_len2[i+j][k] << 3;\r\n                                                       ^\r\ndynamic_fmt.c:4862:8: error: use of undeclared identifier 'input_buf'\r\n                        p = input_buf[i+j].w;\r\n                            ^\r\ndynamic_fmt.c:4863:20: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                        for (k = 0; k < SIMD_COEF_32; k++)\r\n                                        ^\r\ndynamic_fmt.c:4864:10: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                                p[14*SIMD_COEF_32+k] = total_len[i+j][k] << 3;\r\n                                     ^\r\ndynamic_fmt.c:4864:28: error: use of undeclared identifier 'total_len'\r\n                                p[14*SIMD_COEF_32+k] = total_len[i+j][k] << 3;\r\n                                                       ^\r\ndynamic_fmt.c:4871:8: error: use of undeclared identifier 'input_buf2'\r\n                        p = input_buf2[i+j].w;\r\n                            ^\r\ndynamic_fmt.c:4872:20: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                        for (k = 0; k < SIMD_COEF_32; k++)\r\n                                        ^\r\ndynamic_fmt.c:4873:10: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                                p[14*SIMD_COEF_32+k] = total_len2[i+j][k] << 3;\r\n                                     ^\r\ndynamic_fmt.c:4873:28: error: use of undeclared identifier 'total_len2'\r\n                                p[14*SIMD_COEF_32+k] = total_len2[i+j][k] << 3;\r\n                                                       ^\r\n16 errors generated.\r\nMakefile:1534: recipe for target 'dynamic_fmt.o' failed\r\nmake[1]: *** [dynamic_fmt.o] Error 1\r\nMakefile:187: recipe for target 'default' failed\r\nmake: *** [default] Error 2\r\n```\r\n\r\nNext error:\r\n```\r\n $ touch dynamic_fmt.o; make -s\r\ndynamic_big_crypt.c:521:33: error: use of undeclared identifier 'SIMD_COEF_32'\r\nstatic const uint32_t MD5_inc = MD5_LOOPS;\r\n                                ^\r\ndynamic_big_crypt.c:520:20: note: expanded from macro 'MD5_LOOPS'\r\n#define MD5_LOOPS (SIMD_COEF_32*SIMD_PARA_MD5)\r\n                   ^\r\ndynamic_big_crypt.c:523:54: error: use of undeclared identifier 'SIMD_COEF_32'\r\nstatic void DoMD5_crypt_f_sse(void *in, uint32_t len[MD5_LOOPS], void *out) {\r\n                                                     ^\r\ndynamic_big_crypt.c:520:20: note: expanded from macro 'MD5_LOOPS'\r\n#define MD5_LOOPS (SIMD_COEF_32*SIMD_PARA_MD5)\r\n                   ^\r\ndynamic_big_crypt.c:524:47: error: use of undeclared identifier 'SIMD_COEF_32'\r\n        JTR_ALIGN(MEM_ALIGN_SIMD) ARCH_WORD_32 a[(16*MD5_LOOPS)/sizeof(ARCH_WORD_32)];\r\n                                                     ^\r\ndynamic_big_crypt.c:520:20: note: expanded from macro 'MD5_LOOPS'\r\n#define MD5_LOOPS (SIMD_COEF_32*SIMD_PARA_MD5)\r\n                   ^\r\ndynamic_big_crypt.c:525:23: error: use of undeclared identifier 'SIMD_COEF_32'\r\n        uint32_t i, j, loops[MD5_LOOPS], bMore, cnt;\r\n                             ^\r\ndynamic_big_crypt.c:520:20: note: expanded from macro 'MD5_LOOPS'\r\n#define MD5_LOOPS (SIMD_COEF_32*SIMD_PARA_MD5)\r\n                   ^\r\ndynamic_big_crypt.c:528:18: error: use of undeclared identifier 'SIMD_COEF_32'\r\n        for (i = 0; i < MD5_LOOPS; ++i) {\r\n                        ^\r\ndynamic_big_crypt.c:520:20: note: expanded from macro 'MD5_LOOPS'\r\n#define MD5_LOOPS (SIMD_COEF_32*SIMD_PARA_MD5)\r\n                   ^\r\ndynamic_big_crypt.c:529:3: error: use of undeclared identifier 'loops'\r\n                loops[i] = Do_FixBufferLen32(cp, len[i], 0);\r\n                ^\r\ndynamic_big_crypt.c:535:2: error: use of undeclared identifier 'bMore'\r\n        bMore = 1;\r\n        ^\r\ndynamic_big_crypt.c:536:2: error: use of undeclared identifier 'cnt'\r\n        cnt = 1;\r\n        ^\r\ndynamic_big_crypt.c:537:9: error: use of undeclared identifier 'bMore'\r\n        while (bMore) {\r\n               ^\r\ndynamic_big_crypt.c:538:66: error: use of undeclared identifier 'cnt'; did you mean 'int'?\r\n                SIMDmd5body(cp, a, a, SSEi_FLAT_IN |SSEi_4BUF_INPUT_FIRST_BLK|(cnt==1?0:SSEi_RELOAD));\r\n                                                                               ^\r\ndynamic_big_crypt.c:539:3: error: use of undeclared identifier 'bMore'\r\n                bMore = 0;\r\n                ^\r\ndynamic_big_crypt.c:540:19: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                for (i = 0; i < MD5_LOOPS; ++i) {\r\n                                ^\r\ndynamic_big_crypt.c:520:20: note: expanded from macro 'MD5_LOOPS'\r\n#define MD5_LOOPS (SIMD_COEF_32*SIMD_PARA_MD5)\r\n                   ^\r\ndynamic_big_crypt.c:541:8: error: use of undeclared identifier 'cnt'\r\n                        if (cnt == loops[i]) {\r\n                            ^\r\ndynamic_big_crypt.c:541:15: error: use of undeclared identifier 'loops'\r\n                        if (cnt == loops[i]) {\r\n                                   ^\r\ndynamic_big_crypt.c:542:25: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                                uint32_t offx = ((i/SIMD_COEF_32)*(16/sizeof(ARCH_WORD_32))*SIMD_COEF_32)+(i&(SIMD_COEF_32-1));\r\n                                                    ^\r\ndynamic_big_crypt.c:542:65: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                                uint32_t offx = ((i/SIMD_COEF_32)*(16/sizeof(ARCH_WORD_32))*SIMD_COEF_32)+(i&(SIMD_COEF_32-1));\r\n                                                                                            ^\r\ndynamic_big_crypt.c:542:83: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                                uint32_t offx = ((i/SIMD_COEF_32)*(16/sizeof(ARCH_WORD_32))*SIMD_COEF_32)+(i&(SIMD_COEF_32-1));\r\n                                                                                                              ^\r\ndynamic_big_crypt.c:544:44: error: use of undeclared identifier 'SIMD_COEF_32'\r\n                                        ((ARCH_WORD_32*)out)[(i*4)+j] =  a[(j*SIMD_COEF_32)+offx];\r\n                                                                              ^\r\ndynamic_big_crypt.c:546:15: error: use of undeclared identifier 'cnt'\r\n                        } else if (cnt < loops[i]) bMore = 1;\r\n                                   ^\r\nfatal error: too many errors emitted, stopping now [-ferror-limit=]\r\n20 errors generated.\r\nMakefile:1534: recipe for target 'dynamic_big_crypt.o' failed\r\nmake[1]: *** [dynamic_big_crypt.o] Error 1\r\nMakefile:187: recipe for target 'default' failed\r\nmake: *** [default] Error 2\r\n```\r\n\r\nNext error:\r\n```\r\n$ touch dynamic_big_crypt.o; make -s\r\nFGT_fmt_plug.c:245:3: error: expected '}'\r\n                ALGORITHM_NAME,\r\n                ^\r\nFGT_fmt_plug.c:54:33: note: expanded from macro 'ALGORITHM_NAME'\r\n#define ALGORITHM_NAME          \"SHA1 \" SHA1_ALGORITHM_NAME\r\n                                        ^\r\n./simd-intrinsics.h:98:30: note: expanded from macro 'SHA1_ALGORITHM_NAME'\r\n#define SHA1_ALGORITHM_NAME             BITS \" \" SIMD_TYPE \" \" SHA1_N_STR\r\n                                        ^\r\nFGT_fmt_plug.c:242:5: note: to match this '{'\r\n    {\r\n    ^\r\n1 error generated.\r\nMakefile:1534: recipe for target 'FGT_fmt_plug.o' failed\r\nmake[1]: *** [FGT_fmt_plug.o] Error 1\r\nMakefile:187: recipe for target 'default' failed\r\nmake: *** [default] Error 2\r\n```\r\n\r\nand so on..."},"comment":{"url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/comments/153120885","html_url":"https://github.com/magnumripper/JohnTheRipper/issues/1874#issuecomment-153120885","issue_url":"https://api.github.com/repos/magnumripper/JohnTheRipper/issues/1874","id":153120885,"user":{"login":"magnumripper","id":1268598,"avatar_url":"https://avatars.githubusercontent.com/u/1268598?v=3","gravatar_id":"","url":"https://api.github.com/users/magnumripper","html_url":"https://github.com/magnumripper","followers_url":"https://api.github.com/users/magnumripper/followers","following_url":"https://api.github.com/users/magnumripper/following{/other_user}","gists_url":"https://api.github.com/users/magnumripper/gists{/gist_id}","starred_url":"https://api.github.com/users/magnumripper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magnumripper/subscriptions","organizations_url":"https://api.github.com/users/magnumripper/orgs","repos_url":"https://api.github.com/users/magnumripper/repos","events_url":"https://api.github.com/users/magnumripper/events{/privacy}","received_events_url":"https://api.github.com/users/magnumripper/received_events","type":"User","site_admin":false},"created_at":"2015-11-02T18:44:04Z","updated_at":"2015-11-02T18:44:04Z","body":"> BTW: I wonder why gcc isn't able to detect the unused functions detected by clang. I even tried ./configure CC=\"gcc -Wunused\". Didn't help.\r\n\r\nBecause with gcc you had NEON and an other source file was used for Blake, already fixed long ago."}}