Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 554392 - app-crypt/johntheripper-1.7.9-r10 does not compile with clang-3.6.1-r100
Summary: app-crypt/johntheripper-1.7.9-r10 does not compile with clang-3.6.1-r100
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Robin Johnson
Depends on:
Blocks: systemwide-clang
  Show dependency tree
Reported: 2015-07-09 23:16 UTC by Julian Ospald
Modified: 2016-06-15 03:45 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---

1436483297-install-app-crypt_johntheripper-1.7.9-r10:0::hasufell-overlay.out (1436483297-install-app-crypt_johntheripper-1.7.9-r10:0::hasufell-overlay.out,32.41 KB, text/plain)
2015-07-09 23:16 UTC, Julian Ospald
cave-info.john.txt (cave-info.john.txt,24.97 KB, text/plain)
2015-07-09 23:18 UTC, Julian Ospald
johntheripper-1.7.9-fix-clang-intrinsics.patch (johntheripper-1.7.9-fix-clang-intrinsics.patch,454 bytes, patch)
2015-10-13 18:59 UTC, Ted Tanberry
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Ospald 2015-07-09 23:16:16 UTC
Created attachment 406444 [details]

NOTE: I am running libressl and so I had to add a non-intrusive patch renaming a few casts and function names, because johntheripper makes use of some ancient OpenSSL stuff that isn't even in the docs anymore (e.g. "C_Block" instead of "const_DES_cblock" or "des_fixup_key_parity" instead of "DES_fixup_key_parity").
The error here doesn't seem to be related, but just wanted to explain why this is not ::gentoo.

This works fine with gcc-4.8.5.

relevant lines:

clang -c -Wall -include ../config.gentoo -march=core-avx2 -O2 -pipe -Wall -fPIC -fPIE   -mavx -DHAVE_CRYPT -DHAVE_DL  external.c
Makefile:1781: recipe for target 'rawSHA1_ng_fmt.o' failed
rawSHA1_ng_fmt.c:535:19: error: redefinition of '_mm_testz_si128'
static inline int _mm_testz_si128 (__m128i __M, __m128i __V)
/usr/bin/../lib/clang/3.6.1/include/smmintrin.h:258:1: note: previous
      definition is here
_mm_testz_si128(__m128i __M, __m128i __V)
1 error generated.
make[1]: *** [rawSHA1_ng_fmt.o] Error 1
make[1]: *** Waiting for unfinished jobs....
Comment 1 Julian Ospald 2015-07-09 23:18:23 UTC
Created attachment 406446 [details]
Comment 2 Ted Tanberry 2015-10-13 18:59:44 UTC
Created attachment 414524 [details, diff]

I believe to have a potential fix:

clang -c -Wall -include ../config.gentoo -march=corei7-avx -O2 -pipe -fPIC -fPIE   -mavx -DHAVE_CRYPT -DHAVE_DL  mediawiki_fmt_plug.c
clang -c -Wall -include ../config.gentoo -march=corei7-avx -O2 -pipe -fPIC -fPIE   -mavx -DHAVE_CRYPT -DHAVE_DL  rawSHA1_ng_fmt.c
clang -c -Wall -include ../config.gentoo -march=corei7-avx -O2 -pipe -fPIC -fPIE   -mavx -DHAVE_CRYPT -DHAVE_DL  plugin.c

and to ensure it still compiles with GCC:

x86_64-pc-linux-gnu-gcc -c -Wall -include ../config.gentoo -march=corei7-avx -O2 -pipe -fPIC -fPIE   -mavx -DHAVE_CRYPT -DHAVE_DL  mediawiki_fmt_plug.c
x86_64-pc-linux-gnu-gcc -c -Wall -include ../config.gentoo -march=corei7-avx -O2 -pipe -fPIC -fPIE   -mavx -DHAVE_CRYPT -DHAVE_DL  rawSHA1_ng_fmt.c
x86_64-pc-linux-gnu-gcc -c -Wall -include ../config.gentoo -march=corei7-avx -O2 -pipe -fPIC -fPIE   -mavx -DHAVE_CRYPT -DHAVE_DL  plugin.c

appears good to me.
Comment 3 Austin English (RETIRED) gentoo-dev 2016-06-02 08:24:42 UTC
Sent a PR:
Comment 4 Austin English (RETIRED) gentoo-dev 2016-06-15 00:35:30 UTC
Robbin/Mgorny, please review/ack/merge
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-06-15 02:56:25 UTC
<hat project="">
why does this drop the libressl DEPEND?
Other than that, +1 to merge it yourself.
Comment 6 Austin English (RETIRED) gentoo-dev 2016-06-15 03:45:16 UTC
(In reply to Robin Johnson from comment #5)
> <hat project="">
> wizardedit:
> why does this drop the libressl DEPEND?
> Other than that, +1 to merge it yourself.
> </hat>

Not sure why I copied r6 instead of r10 when I did this, fixed by