From unknown Sun Jun 22 00:26:57 2025 X-Loop: help-debbugs@gnu.org Subject: bug#63079: coreutils-9.3: build failure with -mno-ssse3 Resent-From: Jaroslav Skarvada Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Tue, 25 Apr 2023 23:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 63079 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: 63079@debbugs.gnu.org X-Debbugs-Original-To: bug-coreutils@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.168246501527254 (code B ref -1); Tue, 25 Apr 2023 23:24:02 +0000 Received: (at submit) by debbugs.gnu.org; 25 Apr 2023 23:23:35 +0000 Received: from localhost ([127.0.0.1]:53761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prS0U-00075W-H7 for submit@debbugs.gnu.org; Tue, 25 Apr 2023 19:23:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:48478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prS0Q-00075N-Va for submit@debbugs.gnu.org; Tue, 25 Apr 2023 19:23:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prS0Q-0005oN-N8 for bug-coreutils@gnu.org; Tue, 25 Apr 2023 19:23:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prS0O-0001hz-MA for bug-coreutils@gnu.org; Tue, 25 Apr 2023 19:23:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682465007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=nRyyZkagBfTcXAigvLo2saQ177v0LidIgbkTmQrisWM=; b=eEumdBaAunrHNyOb3kHMixWjACECMZGAAEXUjQHzIgA7V+67G2PUSm2FhIGqMh14X1LYux DcNKvRhkQkuH2gertYUd3ur1sLDQE9YR1J95qSdZAbmSKqXNKno/cle3mUFyLc6qZoDjzQ eEyfkNEI38FYzkGY8Gl9NhRlVjZMpjE= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-570-wnf-MgpFO9CesfbGrIJJGw-1; Tue, 25 Apr 2023 19:22:19 -0400 X-MC-Unique: wnf-MgpFO9CesfbGrIJJGw-1 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1a93865ff6dso37129215ad.3 for ; Tue, 25 Apr 2023 16:22:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682464938; x=1685056938; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=nRyyZkagBfTcXAigvLo2saQ177v0LidIgbkTmQrisWM=; b=lGQELnZMg9UqrTCDhl7ep5rfXOMeNlS+lkGbWALc5Xf+KwQHXCGkcv/CqKwoXr+upx kCJlrRmOCuEZZjPYkiKsXQ/6NSOJTRz3mE5sxRQ/xMDrhrrHD1J73eDZ/9EY4u7NJtxW kSzgVaBIhyMMBlKLy1nNXaotqtoot8V7b7WXYWo0CV2zHSNaTXbYLQ1PSMA1UWU7E2fL GgiHDg9NVb9kh+6J6uy56MXk6paCRKvVFdPWQlfFI4j/inYz3DVwvE99rOzzZ/1QjtJM UQmTTds5Swzp9nOm2/EmXJhHWziPE0VuLC7vo4OuhqVBGMyQEcKQJRbL33EAWs9wKCGM ZzFA== X-Gm-Message-State: AAQBX9e0nqB63Ebr10OZloAG988H477a8t1+bmILpwIBno6qU/8oLcNz O+xKC6enTDiupLHKdPAJzP7u33EuGItduzT62h2G9dm/0L77ameO4QRA/bpLL9jExkpQr9pR7By qx9U+cd7ZGcYkDziTn/Tia+SgiujWJsdDriKwY9oA6Q== X-Received: by 2002:a17:902:7c17:b0:1a6:4b60:3195 with SMTP id x23-20020a1709027c1700b001a64b603195mr17477490pll.66.1682464937766; Tue, 25 Apr 2023 16:22:17 -0700 (PDT) X-Google-Smtp-Source: AKy350ZawPll3FvepKHxpwj4KlkDoqUFF7nUSiMGGQiBBECPAcOWDMm7Pmcg+JHRSZipfu5JyC+MnQ1pvl0nNQlQmkU= X-Received: by 2002:a17:902:7c17:b0:1a6:4b60:3195 with SMTP id x23-20020a1709027c1700b001a64b603195mr17477468pll.66.1682464937198; Tue, 25 Apr 2023 16:22:17 -0700 (PDT) MIME-Version: 1.0 From: Jaroslav Skarvada Date: Wed, 26 Apr 2023 01:22:05 +0200 Message-ID: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="000000000000ee013d05fa3164a7" Received-SPF: pass client-ip=170.10.133.124; envelope-from=jskarvad@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.171, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --000000000000ee013d05fa3164a7 Content-Type: text/plain; charset="UTF-8" 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 --000000000000ee013d05fa3164a7 Content-Type: text/x-patch; charset="US-ASCII"; name="coreutils-9.1-pclmul-detect-no-ssse3-fix.patch" Content-Disposition: attachment; filename="coreutils-9.1-pclmul-detect-no-ssse3-fix.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lgww48sw0 LS0tIC4vY29uZmlndXJlLmFjLm9sZAkyMDIzLTA0LTI2IDAwOjQyOjM3Ljg0MDAzNDkxMyArMDIw MAorKysgLi9jb25maWd1cmUuYWMJMjAyMy0wNC0yNiAwMDo0MzoxMy44Mjg3MzA3MzEgKzAyMDAK QEAgLTU3Nyw2ICs1NzcsNyBAQAogICAgIHsKICAgICAgIF9fbTEyOGkgYSwgYjsKICAgICAgIGEg PSBfbW1fY2xtdWxlcGk2NF9zaTEyOCAoYSwgYiwgMHgwMCk7CisgICAgICBhID0gX21tX3NodWZm bGVfZXBpOCAoYSwgYik7CiAgICAgICByZXR1cm4gMTsKICAgICB9CiAgIF1dKQo= --000000000000ee013d05fa3164a7-- From unknown Sun Jun 22 00:26:57 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Jaroslav Skarvada Subject: bug#63079: closed (Re: bug#63079: coreutils-9.3: build failure with -mno-ssse3) Message-ID: References: X-Gnu-PR-Message: they-closed 63079 X-Gnu-PR-Package: coreutils Reply-To: 63079@debbugs.gnu.org Date: Wed, 26 Apr 2023 15:24:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1682522642-27137-1" This is a multi-part message in MIME format... ------------=_1682522642-27137-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #63079: coreutils-9.3: build failure with -mno-ssse3 which was filed against the coreutils package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 63079@debbugs.gnu.org. --=20 63079: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D63079 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1682522642-27137-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 63079-done) by debbugs.gnu.org; 26 Apr 2023 15:23:34 +0000 Received: from localhost ([127.0.0.1]:56798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prgzV-00072z-Jw for submit@debbugs.gnu.org; Wed, 26 Apr 2023 11:23:33 -0400 Received: from mail-wm1-f42.google.com ([209.85.128.42]:46091) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prgzQ-00072i-Ac for 63079-done@debbugs.gnu.org; Wed, 26 Apr 2023 11:23:32 -0400 Received: by mail-wm1-f42.google.com with SMTP id 5b1f17b1804b1-3f182d745deso72525625e9.0 for <63079-done@debbugs.gnu.org>; Wed, 26 Apr 2023 08:23:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682522602; x=1685114602; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=xvdu31DUpuY4NOHKWeMCI33tWrOEZCICYq53EMFjSZs=; b=MmVw1uYoPAO8cNsryngFVqDKV1urXFbsbdmsBc8ELvJ3//OmhVKSWK9k9ACXmVXUdj b8wrvERXXj8f+fKrOM1SlJ+WFF5K/woWI3WvTNSMqugfM45i+8n7gQI+bLMz/VLDazlR 7zFRzITYR9bw6ljP0svG1ZY0u9I6nUbp7+Lj74GNWo+esb7HoEbU5YVL6f/pcyTmQuax behuhfnVloojTXBpyduZvUhVO4CmON8PdgErnKhbl5gS9qsivkRjpBekmFop2aiTQJve tLwWepDuFjTcwl2Vr/Z/R/QGqOL36VU685ghz0syR7dIMysQdE7VnNvSygHyp6PxmOCU m2Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682522602; x=1685114602; h=content-transfer-encoding:in-reply-to:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xvdu31DUpuY4NOHKWeMCI33tWrOEZCICYq53EMFjSZs=; b=TOVbJxZ93zRg8LZsbfhuQIXo7t2TYydOts8KBD9qaN8I6JknScyPsyoPD/NXSnjkNi r+6qHySf5363zCShjiPYgyhwSBBcwbvzPMWWDG0p595sHF8VoAsg0JCy0dBSmjV28Lz7 guBfk3UWw04hP/TMgo+rOK5Eeh6vUrjiWcWglO1VEd6T1wRha328k9jN9y8I6gtIh9jV OBXA8dRZ9nBcWTKQb70BBO7wFNmtEvS1EeOtfEc+F76QhthuJI4MB4yUcfbcXS8h6HZ3 5zi2RfEmVu6uQhqh1U2tXI6SRL9YV9PE2a2f67/txhQtX8A9k3kAmyyKlUL2Rqi7PYxs BZzQ== X-Gm-Message-State: AAQBX9cUVE/2VuERVFsDIdOn0+Q983U/g80/dD1aq76tE0U85VyQ2+te WqcZ8RvM11IInXHNzVwUorY= X-Google-Smtp-Source: AKy350Z7YpWWls0pf9+pEIyJ2L7RQ3EfVu0QTmGT/AlbNvNAW8RIDStDb/Bdfl7UtrhXu8kY3Li43Q== X-Received: by 2002:a1c:7716:0:b0:3ef:622c:26d3 with SMTP id t22-20020a1c7716000000b003ef622c26d3mr13165323wmi.35.1682522602256; Wed, 26 Apr 2023 08:23:22 -0700 (PDT) Received: from [192.168.1.9] (95-44-90-175-dynamic.agg2.lod.rsl-rtd.eircom.net. [95.44.90.175]) by smtp.googlemail.com with ESMTPSA id l2-20020a05600c4f0200b003ee74c25f12sm21990276wmq.35.2023.04.26.08.23.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 26 Apr 2023 08:23:21 -0700 (PDT) Message-ID: Date: Wed, 26 Apr 2023 16:23:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Thunderbird/109.0 Subject: Re: bug#63079: coreutils-9.3: build failure with -mno-ssse3 Content-Language: en-US To: Jaroslav Skarvada , 63079-done@debbugs.gnu.org References: From: =?UTF-8?Q?P=C3=A1draig_Brady?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Score: -0.9 (/) X-Debbugs-Envelope-To: 63079-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.9 (-) 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 ------------=_1682522642-27137-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 25 Apr 2023 23:23:35 +0000 Received: from localhost ([127.0.0.1]:53761 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prS0U-00075W-H7 for submit@debbugs.gnu.org; Tue, 25 Apr 2023 19:23:34 -0400 Received: from lists.gnu.org ([209.51.188.17]:48478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1prS0Q-00075N-Va for submit@debbugs.gnu.org; Tue, 25 Apr 2023 19:23:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prS0Q-0005oN-N8 for bug-coreutils@gnu.org; Tue, 25 Apr 2023 19:23:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1prS0O-0001hz-MA for bug-coreutils@gnu.org; Tue, 25 Apr 2023 19:23:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682465007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=nRyyZkagBfTcXAigvLo2saQ177v0LidIgbkTmQrisWM=; b=eEumdBaAunrHNyOb3kHMixWjACECMZGAAEXUjQHzIgA7V+67G2PUSm2FhIGqMh14X1LYux DcNKvRhkQkuH2gertYUd3ur1sLDQE9YR1J95qSdZAbmSKqXNKno/cle3mUFyLc6qZoDjzQ eEyfkNEI38FYzkGY8Gl9NhRlVjZMpjE= Received: from mail-pl1-f197.google.com (mail-pl1-f197.google.com [209.85.214.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-570-wnf-MgpFO9CesfbGrIJJGw-1; Tue, 25 Apr 2023 19:22:19 -0400 X-MC-Unique: wnf-MgpFO9CesfbGrIJJGw-1 Received: by mail-pl1-f197.google.com with SMTP id d9443c01a7336-1a93865ff6dso37129215ad.3 for ; Tue, 25 Apr 2023 16:22:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682464938; x=1685056938; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=nRyyZkagBfTcXAigvLo2saQ177v0LidIgbkTmQrisWM=; b=lGQELnZMg9UqrTCDhl7ep5rfXOMeNlS+lkGbWALc5Xf+KwQHXCGkcv/CqKwoXr+upx kCJlrRmOCuEZZjPYkiKsXQ/6NSOJTRz3mE5sxRQ/xMDrhrrHD1J73eDZ/9EY4u7NJtxW kSzgVaBIhyMMBlKLy1nNXaotqtoot8V7b7WXYWo0CV2zHSNaTXbYLQ1PSMA1UWU7E2fL GgiHDg9NVb9kh+6J6uy56MXk6paCRKvVFdPWQlfFI4j/inYz3DVwvE99rOzzZ/1QjtJM UQmTTds5Swzp9nOm2/EmXJhHWziPE0VuLC7vo4OuhqVBGMyQEcKQJRbL33EAWs9wKCGM ZzFA== X-Gm-Message-State: AAQBX9e0nqB63Ebr10OZloAG988H477a8t1+bmILpwIBno6qU/8oLcNz O+xKC6enTDiupLHKdPAJzP7u33EuGItduzT62h2G9dm/0L77ameO4QRA/bpLL9jExkpQr9pR7By qx9U+cd7ZGcYkDziTn/Tia+SgiujWJsdDriKwY9oA6Q== X-Received: by 2002:a17:902:7c17:b0:1a6:4b60:3195 with SMTP id x23-20020a1709027c1700b001a64b603195mr17477490pll.66.1682464937766; Tue, 25 Apr 2023 16:22:17 -0700 (PDT) X-Google-Smtp-Source: AKy350ZawPll3FvepKHxpwj4KlkDoqUFF7nUSiMGGQiBBECPAcOWDMm7Pmcg+JHRSZipfu5JyC+MnQ1pvl0nNQlQmkU= X-Received: by 2002:a17:902:7c17:b0:1a6:4b60:3195 with SMTP id x23-20020a1709027c1700b001a64b603195mr17477468pll.66.1682464937198; Tue, 25 Apr 2023 16:22:17 -0700 (PDT) MIME-Version: 1.0 From: Jaroslav Skarvada Date: Wed, 26 Apr 2023 01:22:05 +0200 Message-ID: Subject: coreutils-9.3: build failure with -mno-ssse3 To: bug-coreutils@gnu.org X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: multipart/mixed; boundary="000000000000ee013d05fa3164a7" Received-SPF: pass client-ip=170.10.133.124; envelope-from=jskarvad@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -22 X-Spam_score: -2.3 X-Spam_bar: -- X-Spam_report: (-2.3 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.171, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) --000000000000ee013d05fa3164a7 Content-Type: text/plain; charset="UTF-8" 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 --000000000000ee013d05fa3164a7 Content-Type: text/x-patch; charset="US-ASCII"; name="coreutils-9.1-pclmul-detect-no-ssse3-fix.patch" Content-Disposition: attachment; filename="coreutils-9.1-pclmul-detect-no-ssse3-fix.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_lgww48sw0 LS0tIC4vY29uZmlndXJlLmFjLm9sZAkyMDIzLTA0LTI2IDAwOjQyOjM3Ljg0MDAzNDkxMyArMDIw MAorKysgLi9jb25maWd1cmUuYWMJMjAyMy0wNC0yNiAwMDo0MzoxMy44Mjg3MzA3MzEgKzAyMDAK QEAgLTU3Nyw2ICs1NzcsNyBAQAogICAgIHsKICAgICAgIF9fbTEyOGkgYSwgYjsKICAgICAgIGEg PSBfbW1fY2xtdWxlcGk2NF9zaTEyOCAoYSwgYiwgMHgwMCk7CisgICAgICBhID0gX21tX3NodWZm bGVfZXBpOCAoYSwgYik7CiAgICAgICByZXR1cm4gMTsKICAgICB9CiAgIF1dKQo= --000000000000ee013d05fa3164a7-- ------------=_1682522642-27137-1--