Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 554392

Summary: app-crypt/johntheripper-1.7.9-r10 does not compile with clang-3.6.1-r100
Product: Gentoo Linux Reporter: Julian Ospald <hasufell>
Component: Current packagesAssignee: Robin Johnson <robbat2>
Status: RESOLVED FIXED    
Severity: normal CC: mgorny, wizardedit, zerochaos
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 408963    
Attachments: 1436483297-install-app-crypt_johntheripper-1.7.9-r10:0::hasufell-overlay.out
cave-info.john.txt
johntheripper-1.7.9-fix-clang-intrinsics.patch

Description Julian Ospald 2015-07-09 23:16:16 UTC
Created attachment 406444 [details]
1436483297-install-app-crypt_johntheripper-1.7.9-r10:0::hasufell-overlay.out

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]
cave-info.john.txt
Comment 2 Ted Tanberry 2015-10-13 18:59:44 UTC
Created attachment 414524 [details, diff]
johntheripper-1.7.9-fix-clang-intrinsics.patch

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:
https://github.com/gentoo/gentoo/pull/1584
Comment 4 Austin English (RETIRED) gentoo-dev 2016-06-15 00:35:30 UTC
Robbin/Mgorny, please review/ack/merge
https://github.com/gentoo/gentoo/pull/1584
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2016-06-15 02:56:25 UTC
<hat project="crypto@gentoo.org">
wizardedit:
why does this drop the libressl DEPEND?
Other than that, +1 to merge it yourself.
</hat>
Comment 6 Austin English (RETIRED) gentoo-dev 2016-06-15 03:45:16 UTC
(In reply to Robin Johnson from comment #5)
> <hat project="crypto@gentoo.org">
> 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 https://github.com/gentoo/gentoo/commit/f44215bc85605856c871874d5dd3837be93838cf