As in summary build failure with blake2 module with certain -march set: System uname: Linux-4.9.6-1-ARCH-x86_64-AMD_FX-tm-9370_Eight-Core_Processor-with-gentoo-2.3 CFLAGS="-march=bdver2 -O2 -pipe" when using moderate CFLAGS, build passed: CFLAGS="-mtune=generic -O2 -pipe" Reproducible: Always Actual Results: lang/python-3.6.0/work/Python-3.6.0/Modules/_sqlite/microprotocols.o In file included from [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-round.h:70:0[m[K, from [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:40[m[K, from [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/blake2s_impl.c:32[m[K: [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-load-xop.h:29:4:[m[K [01;31m[Kerror: [m[Kexpected identifier or '[01m[K([m[K' before '[01m[Kreturn[m[K' return _mm_blendv_epi8(t0, s1, mask); [01;32m[K ^[m[K [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-load-xop.h:30:1:[m[K [01;31m[Kerror: [m[Kexpected identifier or '[01m[K([m[K' before '[01m[K}[m[K' token }*/ [01;32m[K ^[m[K [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s-load-xop.h:30:3:[m[K [01;31m[Kerror: [m[Kexpected identifier or '[01m[K([m[K' before '[01m[K/[m[K' token }*/ [01;32m[K ^[m[K In file included from [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/blake2s_impl.c:32:0[m[K: [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:[m[K In function '[01m[Kblake2s_init0[m[K': [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:167:38:[m[K [01;31m[Kerror: [m[K'[01m[Kblake2s_IV[m[K' undeclared (first use in this function) for( i = 0; i < 8; ++i ) S->h[i] = blake2s_IV[i]; [01;32m[K ^[m[K [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:167:38:[m[K [01;36m[Knote: [m[Keach undeclared identifier is reported only once for each function it appears in [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:[m[K In function '[01m[KPyBlake2_blake2s_init_param[m[K': [01m[K/var/tmp/portage/dev-lang/python-3.6.0/work/Python-3.6.0/Modules/_blake2/impl/blake2s.c:176:44:[m[K [01;31m[Kerror: [m[K'[01m[Kblake2s_IV[m[K' undeclared (first use in this function) const uint8_t * v = ( const uint8_t * )( blake2s_IV ); [01;32m[K ^[m[K
Created attachment 462840 [details] build.log
Reported upstream.
Created attachment 465354 [details, diff] remove nested comments in blake2s-load-xop.h simple patch that removes the nested comments and make python-3.6.0 compile on my system with -march=bdver4
here the same: System: Linux-4.9.4 x86_64 AMD A8-7600 Radeon R7 CFLAGS="-march=native -mno-tbm -O2 -pipe" gcc --version gcc (Gentoo 5.4.0-r3 p1.3, pie-0.6.5) 5.4.0 and compile with the patch provided by johannes as well.
*** Bug 611730 has been marked as a duplicate of this bug. ***
Same problem with python-3.6.1. The patch fixes it there too.
*** Bug 620296 has been marked as a duplicate of this bug. ***
I confirm that the patch attached here as attachment #465354 [details, diff] works to get dev-lang/python-3.6.1 to compile. I would suggest to p-mask dev-lang/python:3.6 until this is resolved.
(In reply to Dennis Schridde from comment #8) A build failure that is easy to work around does not warrant an entry in package.mask.
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=61958b88555c08f099c70d0b1989b86bcd3f2465 commit 61958b88555c08f099c70d0b1989b86bcd3f2465 Author: Mike Gilbert <floppym@gentoo.org> Date: Sun Jul 30 11:23:27 2017 -0400 dev-lang/python: fix build failure in blake2 module Thanks to Johannes Hirte for the simple solution. Bug: https://bugs.gentoo.org/608586 Package-Manager: Portage-2.3.6_p23, Repoman-2.3.3_p1 dev-lang/python/files/3.6-blake2.patch | 37 ++++++++++++++++++++++++++++++++++ dev-lang/python/python-3.6.1-r1.ebuild | 1 + 2 files changed, 38 insertions(+)