[core-updates] gcc-11 fails to cross-compile from x86_64-linux

  • Open
  • quality assurance status badge
Details
2 participants
  • Thiago Jung Bauermann
  • Sam James
Owner
unassigned
Submitted by
Thiago Jung Bauermann
Severity
normal
T
T
Thiago Jung Bauermann wrote on 17 Jul 2021 02:04
(address . bug-guix@gnu.org)
5098239.b5oAXHIL8O@popigai
Hello,

On core-updates (at least as of commit 8456581375cf), the gcc package fails
to cross-compile. This can be seen in the following CI jobs:

gcc-11.1.0, arm-linux-gnueabihf.gcc.x86_64-linux
gcc-11.1.0, aarch64-linux-gnu.gcc.x86_64-linux
gcc-11.1.0, powerpc64le-linux-gnu.gcc.x86_64-linux
gcc-11.1.0, riscv64-linux-gnu.gcc.x86_64-linux
gcc-11.1.0, mips64el-linux-gnu.gcc.x86_64-linux
gcc-11.1.0, powerpc-linux-gnu.gcc.x86_64-linux

They all fail with a similar error:

Toggle snippet (19 lines)
In file included from /tmp/guix-build-gcc-11.1.0.drv-0/build/arm-linux-gnueabihf/libstdc++-v3/include/bits/move.h:57,
from /tmp/guix-build-gcc-11.1.0.drv-0/build/arm-linux-gnueabihf/libstdc++-v3/include/bits/nested_exception.h:40,
from ../../../../gcc-11.1.0/libstdc++-v3/libsupc++/exception:148,
from ../../../../gcc-11.1.0/libstdc++-v3/libsupc++/eh_exception.cc:26:
/tmp/guix-build-gcc-11.1.0.drv-0/build/arm-linux-gnueabihf/libstdc++-v3/include/type_traits:971:25: error: there are no arguments to ?__is_nothrow_constructible? that depend on a template parameter, so a declaration of ?__is_nothrow_constructible? must be available [-fpermissive]
971 | = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
| ^~~~~~~~~~~~~~~~~~~~~~~~~~
/tmp/guix-build-gcc-11.1.0.drv-0/build/arm-linux-gnueabihf/libstdc++-v3/include/type_traits:971:25: note: (if you use ?-fpermissive?, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/tmp/guix-build-gcc-11.1.0.drv-0/build/arm-linux-gnueabihf/libstdc++-v3/include/type_traits:971:66: error: template argument 1 is invalid
971 | = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
| ^
/tmp/guix-build-gcc-11.1.0.drv-0/build/arm-linux-gnueabihf/libstdc++-v3/include/type_traits:976:45: error: expected template-name before ?<? token
976 | : public __is_nothrow_constructible_impl<_Tp, _Args...>::type
| ^
/tmp/guix-build-gcc-11.1.0.drv-0/build/arm-linux-gnueabihf/libstdc++-v3/include/type_traits:976:45: error: expected ?{? before ?<? token

In addition to that, arm-linux-gnueabihf.gcc.x86_64-linux has the following
error which doesn’t appear on the other arches:

no include path in which to search for stdc-predef.h

As a side note, gcc-11.1.0 also fails to build on
i586-pc-gnu.gcc.x86_64-linux¹, but with a very different error message,
so it appears to be an unrelated problem.

gcc-8.5.0 also fails to cross-compile on several arches, but with a
different error message as well, so it also appears to be a separate
problem.

--
Thanks,
Thiago

T
T
Thiago Jung Bauermann wrote on 17 Jul 2021 02:20
(address . 49600@debbugs.gnu.org)
4050292.s6a4WW2XOq@popigai
Hi,

There were several commits added to GCC’s ‘releases/gcc-11’ branch since
the 11.1.0 release, so I wanted to check whether this problem was fixed by
any of them.

I applied the patch containing those commits to the gcc-11 package,
obtained by running the following on a git checkout of the GCC repo:

```
$ git diff releases/gcc-11.1.0..origin/releases/gcc-11 \
> gcc-11-branch-update.patch
```

At the time, origin/releases/gcc-11 was:

419201f566bb libstdc++: Use function object for __decay_copy helper

Unfortunately it didn’t make a difference.

--
Thanks,
Thiago
S
T
T
Thiago Jung Bauermann wrote on 26 Nov 2021 20:07
(name . Sam James)(address . sam@gentoo.org)(address . 49600@debbugs.gnu.org)
2738209.ljgP1WKL5Z@popigai
Hello Sam,

Sorry, I missed your message when you sent it originally and just found it
now.

Em terça-feira, 31 de agosto de 2021, às 23:02:04 -03, Sam James escreveu:
Toggle quote (5 lines)
> Seem to have hit the same thing in Gentoo (reported as
> https://bugs.gentoo.org/811294).
>
> Has Guix found a workaround since?

No, our cross gcc-11 builds are still hitting this issue. E.g.:

aarch64-linux-gnu.gcc.x86_64-linux:

powerpc64le-linux-gnu.gcc.x86_64-linux:

riscv64-linux-gnu.gcc.x86_64-linux:

Though I haven’t worked on this issue since I last reported on it.

--
Thanks,
Thiago
?