emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#63079: closed (coreutils-9.3: build failure with -mno-ssse3)


From: GNU bug Tracking System
Subject: bug#63079: closed (coreutils-9.3: build failure with -mno-ssse3)
Date: Wed, 26 Apr 2023 15:24:02 +0000

Your message dated Wed, 26 Apr 2023 16:23:21 +0100
with message-id <f534ce4b-4826-d6cf-86a8-d1d08cfbbc67@draigBrady.com>
and subject line Re: bug#63079: coreutils-9.3: build failure with -mno-ssse3
has caused the debbugs.gnu.org bug report #63079,
regarding coreutils-9.3: build failure with -mno-ssse3
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
63079: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=63079
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: coreutils-9.3: build failure with -mno-ssse3 Date: Wed, 26 Apr 2023 01:22:05 +0200
Hi,

building with the -mno-ssse3 causes build failure, e.g.:
CFLAGS="-O2 -march=bonnell -mtune=bonnell -mno-ssse3"
...
gcc  -I. -I./lib  -Ilib -I./lib -Isrc -I./src  -mavx -mpclmul   -O2
-march=bonnell -mtune=bonnell -mno-ssse3 -c -o
src/libcksum_pclmul_a-cksum_pclmul.o `test -f 'src/cksum_pclmul.c' ||
echo './'`src/cksum_pclmul.c
In file included from /usr/lib/gcc/i686-pc-linux-gnu/12/include/immintrin.h:37,
                 from /usr/lib/gcc/i686-pc-linux-gnu/12/include/x86intrin.h:32,
                 from src/cksum_pclmul.c:22:
/usr/lib/gcc/i686-pc-linux-gnu/12/include/tmmintrin.h: In function
'cksum_pclmul':
/usr/lib/gcc/i686-pc-linux-gnu/12/include/tmmintrin.h:136:1: error:
inlining failed in call to 'always_inline' '_mm_shuffle_epi8': target
specific option mismatch
  136 | _mm_shuffle_epi8 (__m128i __X, __m128i __Y)
      | ^~~~~~~~~~~~~~~~
src/cksum_pclmul.c:103:19: note: called from here
  103 |           data7 = _mm_shuffle_epi8 (data7, shuffle_constant);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/tmmintrin.h:136:1: error:
inlining failed in call to 'always_inline' '_mm_shuffle_epi8': target
specific option mismatch

The problem is in the pclmul optimization. The configure.ac autodetect
script checks for the pclmul, but not for the ssse3 instructions which
are later utilized in the pclmul optimized code. Unfortunately, it
also seems there is no way to override the configure.ac check result
(e.g. by the ./configure --without-pclmul option). The attached patch
added the ssse3 detection and fixed the problem for me. Maybe it would
be better to split it into two checks - pclmul and ssse3, but I didn't
want to complicate it. The patch was initially created for
coreutils-9.1 where the problem initially manifested, but it also
applies to coreutils-9.3 which is also affected

thanks & regards

Jaroslav

Attachment: coreutils-9.1-pclmul-detect-no-ssse3-fix.patch
Description: Text Data


--- End Message ---
--- Begin Message --- Subject: Re: bug#63079: coreutils-9.3: build failure with -mno-ssse3 Date: Wed, 26 Apr 2023 16:23:21 +0100 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0
On 26/04/2023 00:22, Jaroslav Skarvada wrote:
Hi,

building with the -mno-ssse3 causes build failure, e.g.:
CFLAGS="-O2 -march=bonnell -mtune=bonnell -mno-ssse3"
...
gcc  -I. -I./lib  -Ilib -I./lib -Isrc -I./src  -mavx -mpclmul   -O2
-march=bonnell -mtune=bonnell -mno-ssse3 -c -o
src/libcksum_pclmul_a-cksum_pclmul.o `test -f 'src/cksum_pclmul.c' ||
echo './'`src/cksum_pclmul.c
In file included from /usr/lib/gcc/i686-pc-linux-gnu/12/include/immintrin.h:37,
                  from /usr/lib/gcc/i686-pc-linux-gnu/12/include/x86intrin.h:32,
                  from src/cksum_pclmul.c:22:
/usr/lib/gcc/i686-pc-linux-gnu/12/include/tmmintrin.h: In function
'cksum_pclmul':
/usr/lib/gcc/i686-pc-linux-gnu/12/include/tmmintrin.h:136:1: error:
inlining failed in call to 'always_inline' '_mm_shuffle_epi8': target
specific option mismatch
   136 | _mm_shuffle_epi8 (__m128i __X, __m128i __Y)
       | ^~~~~~~~~~~~~~~~
src/cksum_pclmul.c:103:19: note: called from here
   103 |           data7 = _mm_shuffle_epi8 (data7, shuffle_constant);
       |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/tmmintrin.h:136:1: error:
inlining failed in call to 'always_inline' '_mm_shuffle_epi8': target
specific option mismatch

The problem is in the pclmul optimization. The configure.ac autodetect
script checks for the pclmul, but not for the ssse3 instructions which
are later utilized in the pclmul optimized code. Unfortunately, it
also seems there is no way to override the configure.ac check result
(e.g. by the ./configure --without-pclmul option). The attached patch
added the ssse3 detection and fixed the problem for me. Maybe it would
be better to split it into two checks - pclmul and ssse3, but I didn't
want to complicate it. The patch was initially created for
coreutils-9.1 where the problem initially manifested, but it also
applies to coreutils-9.3 which is also affected

Pushed.

Marking this as done.

thanks!
Pádraig



--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]