Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 703828 - app-crypt/argon2-20190702: stablereq
Summary: app-crypt/argon2-20190702: stablereq
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Stabilization (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Simon Levermann (sonOfRa)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-26 10:57 UTC by Michał Górny
Modified: 2020-01-01 19:43 UTC (History)
3 users (show)

See Also:
Package list:
app-crypt/argon2-20190702
Runtime testing required: ---
stable-bot: sanity-check+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-26 10:57:58 UTC
Please stabilize.
Comment 1 Agostino Sarubbo gentoo-dev 2019-12-27 16:44:26 UTC
amd64 stable
Comment 2 Aaron Bauman (RETIRED) gentoo-dev 2019-12-27 22:41:02 UTC
arm64 stable
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2019-12-28 12:36:05 UTC
ia64 stable
Comment 4 Rolf Eike Beer archtester 2019-12-28 16:52:20 UTC
hppa/sparc stable
Comment 5 Mikle Kolyada (RETIRED) archtester Gentoo Infrastructure gentoo-dev Security 2019-12-29 09:00:11 UTC
alpha stable
Comment 6 Agostino Sarubbo gentoo-dev 2019-12-30 12:29:29 UTC
x86 stable
Comment 7 Agostino Sarubbo gentoo-dev 2019-12-30 15:31:12 UTC
s390 stable
Comment 8 Agostino Sarubbo gentoo-dev 2019-12-31 08:16:11 UTC
ppc stable
Comment 9 Agostino Sarubbo gentoo-dev 2019-12-31 08:19:10 UTC
ppc64 stable
Comment 10 Robert R. Richter 2019-12-31 12:34:04 UTC
FAILING on x86 !!

--

>>> Compiling source in /var/tmp/portage/app-crypt/argon2-20190702/work/phc-winner-argon2-20190702 ...
make -j2 OPTTEST=0 LIBRARY_REL=lib ARGON2_VERSION=0~20190702
Building with optimizations for native
i686-pc-linux-gnu-gcc -O2 -march=i686 -pipe -std=c89  -Wall  -Iinclude -Isrc -pthread  -Wl,-O1 -Wl,--as-needed src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c src/opt.c src/run.c -o argon2
i686-pc-linux-gnu-gcc -O2 -march=i686 -pipe -std=c89  -Wall  -Iinclude -Isrc -pthread  -shared -fPIC -fvisibility=hidden -DA2_VISCTL=1 -Wl,-O1 -Wl,--as-needed -Wl,-soname,libargon2.so.1 src/argon2.c src/core.c src/blake2/blake2b.c src/thread.c src/encoding.c src/opt.c -o libargon2.so.1
In file included from src/opt.c:26:
src/blake2/blamka-round-opt.h: In function ‘fBlaMka’:
src/blake2/blamka-round-opt.h:59:1: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
   59 | static BLAKE2_INLINE __m128i fBlaMka(__m128i x, __m128i y) {
      | ^~~~~~
In file included from src/opt.c:26:
src/blake2/blamka-round-opt.h: In function ‘fBlaMka’:
src/blake2/blamka-round-opt.h:59:1: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
   59 | static BLAKE2_INLINE __m128i fBlaMka(__m128i x, __m128i y) {
      | ^~~~~~
In file included from src/blake2/blamka-round-opt.h:23,
                 from src/opt.c:26:
/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/include/emmintrin.h:1046:1: error: inlining failed in call to always_inline ‘_mm_add_epi64’: target specific option mismatch
 1046 | _mm_add_epi64 (__m128i __A, __m128i __B)
      | ^~~~~~~~~~~~~
In file included from src/opt.c:26:
src/blake2/blamka-round-opt.h:61:12: note: called from here
   61 |     return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/blake2/blamka-round-opt.h:23,
                 from src/opt.c:26:
/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/include/emmintrin.h:1046:1: error: inlining failed in call to always_inline ‘_mm_add_epi64’: target specific option mismatch
 1046 | _mm_add_epi64 (__m128i __A, __m128i __B)
      | ^~~~~~~~~~~~~
In file included from src/opt.c:26:
src/blake2/blamka-round-opt.h:61:12: note: called from here
   61 |     return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/blake2/blamka-round-opt.h:23,
                 from src/opt.c:26:
/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/include/emmintrin.h:1046:1: error: inlining failed in call to always_inline ‘_mm_add_epi64’: target specific option mismatch
 1046 | _mm_add_epi64 (__m128i __A, __m128i __B)
      | ^~~~~~~~~~~~~
In file included from src/opt.c:26:
src/blake2/blamka-round-opt.h:61:12: note: called from here
   61 |     return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/blake2/blamka-round-opt.h:23,
                 from src/opt.c:26:
/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/include/emmintrin.h:1148:1: error: inlining failed in call to always_inline ‘_mm_mul_epu32’: target specific option mismatch
 1148 | _mm_mul_epu32 (__m128i __A, __m128i __B)
      | ^~~~~~~~~~~~~
In file included from src/opt.c:26:
src/blake2/blamka-round-opt.h:60:23: note: called from here
   60 |     const __m128i z = _mm_mul_epu32(x, y);
      |                       ^~~~~~~~~~~~~~~~~~~
In file included from src/blake2/blamka-round-opt.h:23,
                 from src/opt.c:26:
/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/include/emmintrin.h:1046:1: error: inlining failed in call to always_inline ‘_mm_add_epi64’: target specific option mismatch
 1046 | _mm_add_epi64 (__m128i __A, __m128i __B)
      | ^~~~~~~~~~~~~
In file included from src/opt.c:26:
src/blake2/blamka-round-opt.h:61:12: note: called from here
   61 |     return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/blake2/blamka-round-opt.h:23,
                 from src/opt.c:26:
/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/include/emmintrin.h:1046:1: error: inlining failed in call to always_inline ‘_mm_add_epi64’: target specific option mismatch
 1046 | _mm_add_epi64 (__m128i __A, __m128i __B)
      | ^~~~~~~~~~~~~
In file included from src/opt.c:26:
src/blake2/blamka-round-opt.h:61:12: note: called from here
   61 |     return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/blake2/blamka-round-opt.h:23,
                 from src/opt.c:26:
/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/include/emmintrin.h:1046:1: error: inlining failed in call to always_inline ‘_mm_add_epi64’: target specific option mismatch
 1046 | _mm_add_epi64 (__m128i __A, __m128i __B)
      | ^~~~~~~~~~~~~
In file included from src/opt.c:26:
src/blake2/blamka-round-opt.h:61:12: note: called from here
   61 |     return _mm_add_epi64(_mm_add_epi64(x, y), _mm_add_epi64(z, z));
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from src/blake2/blamka-round-opt.h:23,
                 from src/opt.c:26:
/usr/lib/gcc/i686-pc-linux-gnu/9.2.0/include/emmintrin.h:1148:1: error: inlining failed in call to always_inline ‘_mm_mul_epu32’: target specific option mismatch
 1148 | _mm_mul_epu32 (__m128i __A, __m128i __B)
      | ^~~~~~~~~~~~~
In file included from src/opt.c:26:
src/blake2/blamka-round-opt.h:60:23: note: called from here
   60 |     const __m128i z = _mm_mul_epu32(x, y);
      |                       ^~~~~~~~~~~~~~~~~~~
make: *** [Makefile:182: libargon2.so.1] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:173: argon2] Error 1
 * ERROR: app-crypt/argon2-20190702::gentoo failed (compile phase):
 *   emake failed
Comment 11 David Michael 2019-12-31 16:57:07 UTC
This also fails for me on a Geode chip that only has MMX and 3DNOW.  The blake2 code appears to require SSE2 to build.
Comment 12 David Michael 2019-12-31 17:16:00 UTC
Maybe the SIMD code could be toggled with an option like this?

--- app-crypt/argon2/argon2-20190702.ebuild
+++ app-crypt/argon2/argon2-20190702.ebuild
@@ -12,7 +12,7 @@
 LICENSE="|| ( Apache-2.0 CC0-1.0 )"
 SLOT="0/1"
 KEYWORDS="alpha amd64 ~arm arm64 hppa ia64 ~mips ~ppc ~ppc64 s390 sparc x86"
-IUSE="static-libs"
+IUSE="optimizations static-libs"
 
 S="${WORKDIR}/phc-winner-${P}"
 
@@ -31,11 +31,7 @@
 
 	tc-export CC
 
-	if use amd64 || use x86; then
-		OPTTEST=0
-	else
-		OPTTEST=1
-	fi
+	OPTTEST=$(usex optimizations 0 1)
 }
 
 src_compile() {
Comment 13 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2019-12-31 17:35:50 UTC
FWICS, the code requires SSE2, so I'm just gonna make OPTTEST conditional to that.
Comment 14 David Michael 2019-12-31 18:46:59 UTC
Thanks, that change works.
Comment 15 Robert R. Richter 2020-01-01 14:21:34 UTC
OK, works! Thank you.
Comment 16 Agostino Sarubbo gentoo-dev 2020-01-01 19:43:56 UTC
arm stable. Closing.