Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 729074 - sys-devel/crossdev: emerging gcc-10.1.0 on x86_64-multilib-linux-gnu fails
Summary: sys-devel/crossdev: emerging gcc-10.1.0 on x86_64-multilib-linux-gnu fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: https://gcc.gnu.org/PR95811
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-22 02:11 UTC by Aisha Tammy
Modified: 2020-07-04 08:16 UTC (History)
0 users

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


Attachments
build.log (build.log,36.44 KB, text/x-log)
2020-06-22 02:11 UTC, Aisha Tammy
Details
config.log (config.log,41.76 KB, text/x-log)
2020-06-22 02:12 UTC, Aisha Tammy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aisha Tammy 2020-06-22 02:11:18 UTC
Created attachment 645592 [details]
build.log

reproducible: always

crossdev has been built with the following command and output

crossdev --stable -t x86_64-multilib-linux-gnu -oO /var/db/repos/ryzen7-2700u-vega10

 * crossdev version:      20200131
 * Host Portage ARCH:     amd64
 * Host Portage System:   x86_64-pc-linux-gnu (i686-pc-linux-gnu x86_64-pc-linux-gnu)
 * Target Portage ARCH:   amd64
 * Target System:         x86_64-multilib-linux-gnu
 * Stage:                 4 (C/C++ compiler)
 * USE=multilib:          no
 * Target ABIs:           amd64

 * binutils:              binutils-[stable]
 * gcc:                   gcc-[stable]
 * headers:               linux-headers-[stable]
 * libc:                  glibc-[stable]

 * CROSSDEV_OVERLAY:      /var/db/repos/ryzen7-2700u-vega10
 * PORT_LOGDIR:           /var/log/portage
 * PORTAGE_CONFIGROOT:    /
 * Portage flags:

 * leaving metadata/layout.conf alone in /var/db/repos/ryzen7-2700u-vega10

have attached build.log and config.log for the command

EXTRA_ECONF=--disable-cet x86_64-multilib-linux-gnu-emerge -1av --keep-going gcc
Comment 1 Aisha Tammy 2020-06-22 02:12:14 UTC
Created attachment 645594 [details]
config.log
Comment 2 Sergei Trofimovich (RETIRED) gentoo-dev 2020-06-22 08:45:26 UTC
Filed upstream bug report as https://gcc.gnu.org/PR95811.

The problem here stems from lack of $build != $host case handling:

"""
checking for CET support... configure: error: in `/tmp/portage-tmpdir/portage/sys-devel/gcc-10.1.0-r1/work/build/libiberty':
configure: error: cannot run test program while cross compiling
See `config.log' for more details
"""

config/cet.m4 has a single AC_TRY_RUN call:

https://gcc.gnu.org/git/?p=gcc.git;a=blob;f=config/cet.m4;h=911fbd4647577dd2adae4dcee316ea58eaf0cc8f;hb=HEAD#l117

It's strange because it's supposed to be under '$cross_compiling = no' case:

 117 if test x$may_have_cet = xyes; then
 118   if test x$cross_compiling = xno; then
 119     AC_TRY_RUN([
Comment 3 Sergei Trofimovich (RETIRED) gentoo-dev 2020-06-22 08:51:32 UTC
Ah, it was fixed in master in https://gcc.gnu.org/PR94998. We need a backport or workaround of https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=d17cdc17c90ce77cb90c569322c1f241d3530cec.
Comment 4 Larry the Git Cow gentoo-dev 2020-06-23 06:34:38 UTC
The bug has been referenced in the following commit(s):

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

commit a0cceb035aac865eec1676a80ce04812cb83d4a2
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-06-23 06:33:30 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-06-23 06:33:30 +0000

    10.1.0: backport CET cross-compiler detection, PR95811
    
    Reported-by: Aisha Tammy
    Bug: https://bugs.gentoo.org/729074
    Bug: https://gcc.gnu.org/94998
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 10.1.0/gentoo/34_all_cet-cross-x86.patch | 149 +++++++++++++++++++++++++++++++
 10.1.0/gentoo/README.history             |   1 +
 2 files changed, 150 insertions(+)
Comment 5 Sergei Trofimovich (RETIRED) gentoo-dev 2020-06-23 06:37:31 UTC
Queued patch for next gcc-10.1.0 patch release. Release should be cut in ~a month.

Meanwhile you can drop the patch
    https://gitweb.gentoo.org/proj/gcc-patches.git/plain/10.1.0/gentoo/34_all_cet-cross-x86.patch
to
    /etc/portage/patches/
and/or
    /usr/{CTARGET}/etc/portage/patches/
to test it.

Please check if patch works for you.
Comment 6 Larry the Git Cow gentoo-dev 2020-07-04 07:56:04 UTC
The bug has been referenced in the following commit(s):

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

commit ad32bf914e7dda8709a7adb8197bc43917be4f41
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-07-04 07:44:32 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-07-04 07:44:32 +0000

    10.1.0: cut 3 patchset
    
    Four new patches:
    + 33_all_avx512-scalar-PR95528.patch: fix ICE on small avx512 unpack
    + 34_all_cet-cross-x86.patch: backport CET cross-compilation fix
    + 35_all_ICE-array-subscript-PR95508.patch: fix ICE on some C++ array
      subscripts
    + 36_all_fno-delayed-branch.patch: disable -fdelayed-branch to
      to fix python mis-compilation.
    
    Bug: https://gcc.gnu.org/PR95528
    Bug: https://bugs.gentoo.org/727028
    Bug: https://gcc.gnu.org/94998
    Bug: https://bugs.gentoo.org/729074
    Bug: https://gcc.gnu.org/PR95508
    Bug: https://bugs.gentoo.org/729434
    Reported-by: Jeroen Roovers
    Bug: https://gcc.gnu.org/PR96015
    Bug: https://bugs.gentoo.org/729570.
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 10.1.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Comment 7 Larry the Git Cow gentoo-dev 2020-07-04 08:09:33 UTC
The bug has been referenced in the following commit(s):

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

commit 9a478857e97c4a4d2769ded41b859c5dcfc3cbf9
Author:     Sergei Trofimovich <slyfox@gentoo.org>
AuthorDate: 2020-07-04 07:54:40 +0000
Commit:     Sergei Trofimovich <slyfox@gentoo.org>
CommitDate: 2020-07-04 08:09:16 +0000

    sys-devel/gcc: 10.1.0: cut 3 patchset
    
    Four new patches:
    + 33_all_avx512-scalar-PR95528.patch: fix ICE on small avx512 unpack
    + 34_all_cet-cross-x86.patch: backport CET cross-compilation fix
    + 35_all_ICE-array-subscript-PR95508.patch: fix ICE on some C++ array
      subscripts
    + 36_all_fno-delayed-branch.patch: disable -fdelayed-branch to
      to fix python mis-compilation.
    
    Bug: https://gcc.gnu.org/PR95528
    Bug: https://bugs.gentoo.org/727028
    Bug: https://gcc.gnu.org/94998
    Bug: https://bugs.gentoo.org/729074
    Bug: https://gcc.gnu.org/PR95508
    Bug: https://bugs.gentoo.org/729434
    Reported-by: Jeroen Roovers
    Bug: https://gcc.gnu.org/PR96015
    Bug: https://bugs.gentoo.org/729570.
    Package-Manager: Portage-2.3.103, Repoman-2.3.23
    Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>

 sys-devel/gcc/Manifest             |  1 +
 sys-devel/gcc/gcc-10.1.0-r2.ebuild | 13 +++++++++++++
 2 files changed, 14 insertions(+)
Comment 8 Sergei Trofimovich (RETIRED) gentoo-dev 2020-07-04 08:16:37 UTC
Should be fixed by gcc-10.1.0-r2 in https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9a478857e97c4a4d2769ded41b859c5dcfc3cbf9