Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 777117 - sys-devel/gcc-10.2.0-r5: configure: error: Intel CET must be enabled on Intel CET enabled host
Summary: sys-devel/gcc-10.2.0-r5: configure: error: Intel CET must be enabled on Inte...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/PR99703
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-18 21:46 UTC by Worx
Modified: 2021-09-12 16:27 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info (emerge.info,5.20 KB, text/plain)
2021-03-18 21:56 UTC, Worx
Details
emerge pqv (emerge.pqv,285 bytes, text/plain)
2021-03-18 21:56 UTC, Worx
Details
gcc build logs (gcc-build-logs.tar.bz2,17.62 KB, application/x-bzip)
2021-03-18 21:57 UTC, Worx
Details
0002-GCC_CET_HOST_FLAGS-Check-if-host-supports-multi-byte.patch (0002-GCC_CET_HOST_FLAGS-Check-if-host-supports-multi-byte.patch,2.74 KB, patch)
2021-03-19 07:58 UTC, Sergei Trofimovich (RETIRED)
Details | Diff
Build Logs with the patch. (gcc-build-logs.tar.v2.bz2,17.69 KB, application/x-bzip)
2021-03-19 12:45 UTC, Worx
Details
Build logs with the patch 44 in /etc/portage/patches/sys-devel/gcc-10.2.0/ (gcc-build-logs.tar.V3.bz2,17.70 KB, application/x-bzip)
2021-03-19 17:58 UTC, Worx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Worx 2021-03-18 21:46:30 UTC
Hi, 

When I tried to emerge --sync on my Via C3 Samuel 2, I have this error : 

make[2]: *** [Makefile:13472: configure-stage1-lto-plugin] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/build'
make[1]: *** [Makefile:22557: stage1-bubble] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/build'
make: *** [Makefile:22889: bootstrap-lean] Error 2
 * ERROR: sys-devel/gcc-10.2.0-r5::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-10.2.0-r5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-10.2.0-r5::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/build'
 * S: '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/gcc-10.2.0'
 *
 * Please include /var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/gcc-build-logs.tar.bz2 in your bug report.

I had the same issue with Binutils : https://bugs.gentoo.org/771765



Reproducible: Always

Steps to Reproduce:
1.emerge --ask --verbose --newuse --update --deep @world

Actual Results:  
make[2]: *** [Makefile:13472: configure-stage1-lto-plugin] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/build'
make[1]: *** [Makefile:22557: stage1-bubble] Error 2
make[1]: Leaving directory '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/build'
make: *** [Makefile:22889: bootstrap-lean] Error 2
 * ERROR: sys-devel/gcc-10.2.0-r5::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-10.2.0-r5::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-10.2.0-r5::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/build'
 * S: '/var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/gcc-10.2.0'
 *
 * Please include /var/tmp/portage/sys-devel/gcc-10.2.0-r5/work/gcc-build-logs.tar.bz2 in your bug report.


I had the same issue with Binutils : https://bugs.gentoo.org/771765
Comment 1 Worx 2021-03-18 21:56:34 UTC
Created attachment 692322 [details]
emerge --info
Comment 2 Worx 2021-03-18 21:56:48 UTC
Created attachment 692325 [details]
emerge pqv
Comment 3 Worx 2021-03-18 21:57:05 UTC
Created attachment 692328 [details]
gcc build logs
Comment 4 Sergei Trofimovich (RETIRED) gentoo-dev 2021-03-19 07:33:05 UTC
Yeah, cet.m4 will need to be synced ti gcc's upstream as well.
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2021-03-19 07:51:45 UTC
Patch proposed upstream as http://gcc.1065356.n8.nabble.com/PATCH-GCC-CET-HOST-FLAGS-Check-if-host-supports-multi-byte-NOPs-td1836828.html
Comment 6 Sergei Trofimovich (RETIRED) gentoo-dev 2021-03-19 07:58:31 UTC
Created attachment 692367 [details, diff]
0002-GCC_CET_HOST_FLAGS-Check-if-host-supports-multi-byte.patch

Can you give 0002-GCC_CET_HOST_FLAGS-Check-if-host-supports-multi-byte.patch a try?
Comment 7 Larry the Git Cow gentoo-dev 2021-03-19 08:02:36 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=5600e4343f36e2a4925b09388d3ffe7400143b9f

commit 5600e4343f36e2a4925b09388d3ffe7400143b9f
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-03-19 08:01:22 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-03-19 08:01:22 +0000

    10.2.0: port binutils fix for CET detection on i486
    
    Reported-by: Worx
    Bug: https://bugs.gentoo.org/777117
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 10.2.0/gentoo/44_all_cet-i486.patch | 109 ++++++++++++++++++++++++++++++++++++
 10.2.0/gentoo/README.history        |   1 +
 2 files changed, 110 insertions(+)
Comment 8 Worx 2021-03-19 12:25:19 UTC
I applied the patch, but still the same error
Comment 9 Worx 2021-03-19 12:45:15 UTC
Created attachment 692421 [details]
Build Logs with the patch.
Comment 10 Worx 2021-03-19 16:49:27 UTC
I applied manually the patch after ebuild configure, and before ebuild compile. Let me know, If i have done something bad.
Comment 11 tt_1 2021-03-19 17:09:49 UTC
I think its common practice to drop a patch into /etc/portage/patches/sys-devel/gcc-10.2.0/ ; could be worth a try for you?
Comment 12 Worx 2021-03-19 17:56:05 UTC
Ok, same issue with the previous approach. And i see the patch application in the logs.
Comment 13 Worx 2021-03-19 17:58:55 UTC
Created attachment 692460 [details]
Build logs with the patch 44 in /etc/portage/patches/sys-devel/gcc-10.2.0/
Comment 14 Sergei Trofimovich (RETIRED) gentoo-dev 2021-03-21 13:08:54 UTC
If you try to build gcc with EXTRA_ECONF=--disable-cet does it help?
Comment 15 Worx 2021-03-21 23:46:15 UTC
Same issue with gcc 10.2.0 compilation : 
checking for CET support... configure: error: Intel CET must be enabled on Intel CET enabled host
make[2]: *** [Makefile:14350 : configure-stage1-lto-plugin] Erreur 1
make[2] : on quitte le répertoire « /opt/gcc-10.2.0 »
make[1]: *** [Makefile:24483 : stage1-bubble] Erreur 2
make[1] : on quitte le répertoire « /opt/gcc-10.2.0 »
make: *** [Makefile:24820 : bootstrap] Erreur 2


Could you confirme my make command:  make BOOT_CFLAGS='-march=c3 -m3dnow -O2 -pipe -fomit-frame-pointer' CHOST="i586-pc-linux-gnu" CFLAGS="-march=c3 -m3dnow -O2 -pipe -fomit-frame-pointer" EXTRA_ECONF=--disable-cet bootstrap


Cmdline : 
c3eden# wget https://ftp.gnu.org/gnu/gcc/gcc-10.2.0/gcc-10.2.0.tar.gz
c3eden# tar xvzf gcc-10.2.0.tar.gz
c3eden# cd gcc-10.2.0
c3eden# ./configure
c3eden# make BOOT_CFLAGS='-march=c3 -m3dnow -O2 -pipe -fomit-frame-pointer' CHOST="i586-pc-linux-gnu" CFLAGS="-march=c3 -m3dnow -O2 -pipe -fomit-frame-pointer" EXTRA_ECONF=--disable-cet bootstrap
Comment 16 Worx 2021-03-21 23:58:09 UTC
Portage 3.0.13 (python 3.8.8-final-0, default/linux/x86/17.0, gcc-9.3.0, glibc-2.32-r7, 5.4.97-gentoo-x86 i686)
=================================================================
System uname: Linux-5.4.97-gentoo-x86-i686-VIA_Samuel_2-with-glibc2.1.3
KiB Mem:      890504 total,     37404 free
KiB Swap:    2097148 total,   2096884 free
Timestamp of repository gentoo: Thu, 18 Mar 2021 08:30:01 +0000
Head commit of repository gentoo: b65ee261731f99a2601ac71395d0fe4068b64a70
sh bash 5.0_p18
ld GNU ld (Gentoo 2.35.1 p2) 2.35.1
app-shells/bash:          5.0_p18::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          3.8.8::gentoo, 3.9.2::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/openrc:          0.42.1-r1::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.69-r5::gentoo
sys-devel/automake:       1.16.2-r1::gentoo
sys-devel/binutils:       2.35.1-r1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.3::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-extra-opts:
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes

ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-march=c3 -m3dnow -O2 -pipe -fomit-frame-pointer"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/php/apache2-php7.4/ext-active/ /etc/php/cgi-php7.4/ext-active/ /etc/php/cli-php7.4/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=c3 -m3dnow -O2 -pipe -fomit-frame-pointer"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-march=c3 -m3dnow -O2 -pipe -fomit-frame-pointer"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-march=c3 -m3dnow -O2 -pipe -fomit-frame-pointer"
GENTOO_MIRRORS="http://gentoo.mirrors.ovh.net/gentoo-distfiles/"
LANG="fr_FR.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/var/cache/binpkgs"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
USE="acl berkdb bzip2 cet cli crypt dri fortran gdbm iconv ipv6 libglvnd libtirpc ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl tcpd unicode x86 xattr zlib" ABI_X86="32" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow mmx" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 17 Sergei Trofimovich (RETIRED) gentoo-dev 2021-03-22 10:52:48 UTC
It should be a ./configure-time option:
    $ EXTRA_ECONF=--disable-cet bootstrap emerge -v1 gcc
Comment 18 Sergei Trofimovich (RETIRED) gentoo-dev 2021-03-22 10:53:11 UTC
(In reply to Sergei Trofimovich from comment #17)
> It should be a ./configure-time option:
>     $ EXTRA_ECONF=--disable-cet bootstrap emerge -v1 gcc

Sorry, trying again:
    $ EXTRA_ECONF=--disable-cet emerge -v1 gcc
Comment 19 Worx 2021-03-22 12:46:26 UTC
(In reply to Sergei Trofimovich from comment #18)
> (In reply to Sergei Trofimovich from comment #17)
> > It should be a ./configure-time option:
> >     $ EXTRA_ECONF=--disable-cet bootstrap emerge -v1 gcc
> 
> Sorry, trying again:
>     $ EXTRA_ECONF=--disable-cet emerge -v1 gcc

Thanks.

Same issue ...
Comment 20 Worx 2021-03-22 17:35:08 UTC
I created a GCC bug : https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99703
Comment 21 Sergei Trofimovich (RETIRED) gentoo-dev 2021-03-22 18:27:16 UTC
Thank you! Yeah, it will help understanding why gcc is different from binutils (I still got no time to look at it in more detail, sorry).
Comment 22 Worx 2021-03-27 21:21:23 UTC
They add a patch in my gcc case, and it fix the CET detection issue. I was able to apply it to the GCC master branch.
Comment 23 Larry the Git Cow gentoo-dev 2021-04-08 19:36:52 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=50322c7c5fb8f869f45f8dd23a89f4a7c4b8ba2d

commit 50322c7c5fb8f869f45f8dd23a89f4a7c4b8ba2d
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-04-08 19:36:03 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-04-08 19:36:03 +0000

    10.2.0: revert "port binutils fix for CET detection on i486"
    
    The patch is not ready for prime time. Le't pull newer upstream
    version a bit later.
    
    This reverts commit 5600e4343f36e2a4925b09388d3ffe7400143b9f.
    
    Reported-by: Worx
    Bug: https://bugs.gentoo.org/777117
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 10.2.0/gentoo/44_all_cet-i486.patch | 109 ------------------------------------
 10.2.0/gentoo/README.history        |   1 -
 2 files changed, 110 deletions(-)
Comment 24 Worx 2021-05-03 13:45:54 UTC
Fixed in GCC 12

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99703
Comment 25 Sergei Trofimovich (RETIRED) gentoo-dev 2021-05-04 21:58:07 UTC
Let's mark it as resolved upsrtream. We'd prefer not to backport big ./configure changes to avoid future patch conflicts.
Comment 26 tt_1 2021-05-05 09:02:48 UTC
Would you accept an upstream backport from gcc-10.x or gcc-11.x branch for the patchset, given that there will be one?
Comment 27 Sergei Trofimovich (RETIRED) gentoo-dev 2021-05-05 18:33:25 UTC
I'd prefer pulling it in along with gcc release and not as a separate patch.
Comment 28 Thomas Capricelli 2021-09-12 08:57:40 UTC
That means waiting for months before being able to update gcc on via targets ? gcc 12 is still not released.
Comment 29 Thomas Capricelli 2021-09-12 16:27:59 UTC
For the record, i tried the patch on 
 https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=fd7eb4bc94cafa745eba75c64fa483a1689a5aad
(put it in /etc/portage/patches/sys-devel/gcc/fix-cet-detection-on-via.patch)

It applies cleanly, but i still got the error.

...
 [ ok ]
 * Applying fix-cet-detection-on-via.patch ...
 [ ok ]
...
checking for CET support... configure: error: Intel CET must be enabled on Intel CET enabled host
make[2]: *** [Makefile:14842: configure-stage1-lto-plugin] Error 1
make[2]: Leaving directory '/tmp/portage/sys-devel/gcc-11.2.0/work/build'
...