Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 771765 - sys-devel/binutils-2.35.1-r1[-cet]: configure: error: Intel CET must be enabled on Intel CET enabled host
Summary: sys-devel/binutils-2.35.1-r1[-cet]: configure: error: Intel CET must be enabl...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-02-20 20:11 UTC by Worx
Modified: 2021-03-18 22:02 UTC (History)
3 users (show)

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


Attachments
emerge info (info.log,5.29 KB, text/plain)
2021-02-20 20:13 UTC, Worx
Details
emerge pqv (pqv.log,147 bytes, text/plain)
2021-02-20 20:13 UTC, Worx
Details
Build Log (build.log.gz,3.87 KB, application/x-gzip)
2021-02-20 20:14 UTC, Worx
Details
config.log (config.log,27.62 KB, text/plain)
2021-02-22 01:00 UTC, Worx
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Worx 2021-02-20 20:11:29 UTC
Hi, 

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

checking for CET support... configure: error: Intel CET must be enabled on Intel CET enabled host
make[1]: *** [Makefile:8360: configure-libiberty] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-devel/binutils-2.35.1-r1/work/build'
make: *** [Makefile:854: all] Error 2
 * ERROR: sys-devel/binutils-2.35.1-r1::gentoo failed (compile phase):
 *   emake failed
 *
 * If you need support, post the output of `emerge --info '=sys-devel/binutils-2.35.1-r1::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/binutils-2.35.1-r1::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-devel/binutils-2.35.1-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-devel/binutils-2.35.1-r1/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-devel/binutils-2.35.1-r1/work/build'
 * S: '/var/tmp/portage/sys-devel/binutils-2.35.1-r1/work/binutils-2.35.1'

I tried both approach to setup explicitly cet in My USE and without it.

Reproducible: Always

Actual Results:  
Emerge Stoppped

I know, this is a known issue with in the binutils-2.35.1, with i485 and i586, but it was fixed with binutils-2.35.1-r1

But, I still have the issue with 2.35.1-r1 


I'm using an EPIA-M motherboard with integrated CPU. It works well, but only has this issue today.
Comment 1 Worx 2021-02-20 20:13:05 UTC
Created attachment 687783 [details]
emerge info
Comment 2 Worx 2021-02-20 20:13:24 UTC
Created attachment 687786 [details]
emerge pqv
Comment 3 Worx 2021-02-20 20:14:28 UTC
Created attachment 687789 [details]
Build Log
Comment 4 Ionen Wolkens gentoo-dev 2021-02-20 20:49:44 UTC
CET is now optional[1] (off by default), but if you happen to need it on your system you can re-enable with USE=cet (try that).

It sounds like there's a need to for a better way to handle this, but the ebuild comment states:
        # Allow user to opt into CET for host libraries.
        # Ideally we would like automagic-or-disabled here.
        # But the check does not quite work on i686: bug #760926.
        $(use_enable cet)

[1] https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cd833222cbaef1cd344f3b06c528b858c06dc04a
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2021-02-20 21:41:10 UTC
The failure is unexpected. Probably a misinterpretet configure failure on binutils side.

Can you also attach /var/tmp/portage/sys-devel/binutils-2.35.1-r1/work/build/configure-libiberty/config.log as well?
Comment 6 Worx 2021-02-22 00:56:01 UTC
(In reply to Ionen Wolkens from comment #4)
> CET is now optional[1] (off by default), but if you happen to need it on
> your system you can re-enable with USE=cet (try that).
> 
> It sounds like there's a need to for a better way to handle this, but the
> ebuild comment states:
>         # Allow user to opt into CET for host libraries.
>         # Ideally we would like automagic-or-disabled here.
>         # But the check does not quite work on i686: bug #760926.
>         $(use_enable cet)
> 
> [1]
> https://gitweb.gentoo.org/repo/gentoo.git/commit/
> ?id=cd833222cbaef1cd344f3b06c528b858c06dc04a

I tried both : 
USE = cet
and
USE = -cet

Same issue.
Comment 7 Worx 2021-02-22 01:00:47 UTC
Created attachment 687990 [details]
config.log
Comment 8 Ionen Wolkens gentoo-dev 2021-02-22 01:45:58 UTC
(In reply to Worx from comment #6)
> I tried both : 
Oh hadn't noticed flag is masked, so that won't do anything as-is, my bad.

Probably best wait to see what slyfox has to say about this now that have the config.log

Does look kind of identical to what was supposed to be fixed, --disable-cet prevents the asm test but doesn't affect the -fcf-protection=none test and then it complains cet is force-disabled.
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2021-02-25 22:04:01 UTC
"""
configure:5246: checking for CET support
configure:5331: i586-pc-linux-gnu-gcc -o conftest -march=c3 -O2 -pipe -fcf-protection=none   -Wl,-O1 -Wl,--as-needed -Wl,-z,ibt,-z,shstk conftest.c  >&5
configure:5331: $? = 0
configure:5378: i586-pc-linux-gnu-gcc -o conftest -march=c3 -O2 -pipe -fcf-protection=none   -Wl,-O1 -Wl,--as-needed -Wl,-z,ibt,-z,shstk conftest.c  >&5
configure:5378: $? = 0
configure:5378: ./conftest
/var/tmp/portage/sys-devel/binutils-2.35.1-r1/work/binutils-2.35.1/libiberty/configure: line 1624:   826 Illegal instruction     ./conftest$ac_exeext
"""

Yeah, that's an annoying case that will be fixed in https://sourceware.org/PR27397

Can you test the patch https://sourceware.org/bugzilla/attachment.cgi?id=13222 on your system? It should be a matter of placing it to /etc/portage/patches/sys-devel/binutils (I hope there will be no conflicts).
Comment 10 Worx 2021-02-26 02:07:53 UTC
No Conflict, it works with the patch.
Thanks
Comment 11 Larry the Git Cow gentoo-dev 2021-02-26 08:04:45 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=80732e30b491ef045fab6c0be2f8d4b7ac4ad3a4

commit 80732e30b491ef045fab6c0be2f8d4b7ac4ad3a4
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-02-26 08:02:23 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-02-26 08:04:39 +0000

    sys-devel/gdb: fix 'cet' detection on i586
    
    Reported-by: Worx
    Bug: https://bugs.gentoo.org/771765
    Package-Manager: Portage-3.0.15, Repoman-3.0.2
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/gdb/files/gdb-10.1-cet.patch | 103 +++++++++++++++++++++++++++++++++
 sys-devel/gdb/gdb-10.1.ebuild          |   1 +
 2 files changed, 104 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=67e60a7ca56eb474a4a911f0d77ccce097745d1c

commit 67e60a7ca56eb474a4a911f0d77ccce097745d1c
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-02-26 07:59:42 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-02-26 08:04:38 +0000

    sys-libs/binutils-libs: fix 'cet' detection on i586
    
    Reported-by: Worx
    Bug: https://bugs.gentoo.org/771765
    Package-Manager: Portage-3.0.15, Repoman-3.0.2
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 .../binutils-libs/binutils-libs-2.35.1-r1.ebuild   |   2 +
 sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild |   2 +
 sys-libs/binutils-libs/binutils-libs-2.36.1.ebuild |   2 +
 .../files/binutils-libs-2.35.1-cet.patch           | 103 +++++++++++++++++++++
 4 files changed, 109 insertions(+)

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4e8d909d36eae58cc8aa9e69259179d666b1458

commit c4e8d909d36eae58cc8aa9e69259179d666b1458
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2021-02-26 07:56:43 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2021-02-26 08:04:37 +0000

    sys-devel/binutils: fix 'cet' detection on i586
    
    Reported-by: Worx
    Bug: https://bugs.gentoo.org/771765
    Package-Manager: Portage-3.0.15, Repoman-3.0.2
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/binutils/binutils-2.35.1-r1.ebuild       |   2 +
 sys-devel/binutils/binutils-2.35.2.ebuild          |   2 +
 sys-devel/binutils/binutils-2.36.1.ebuild          |   2 +
 sys-devel/binutils/files/binutils-2.35.1-cet.patch | 103 +++++++++++++++++++++
 4 files changed, 109 insertions(+)
Comment 12 Sergei Trofimovich (RETIRED) gentoo-dev 2021-02-26 08:05:38 UTC
Should be fixed for binutils-2.35 and above.