GNU bug report logs - #55665
GCC fails to cross-compile

Previous Next

Package: guix;

Reported by: Pavel Shlyak <p.shlyak <at> pantherx.org>

Date: Thu, 26 May 2022 20:03:04 UTC

Severity: normal

To reply to this bug, email your comments to 55665 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#55665; Package guix. (Thu, 26 May 2022 20:03:12 GMT) Full text and rfc822 format available.

Acknowledgement sent to Pavel Shlyak <p.shlyak <at> pantherx.org>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Thu, 26 May 2022 20:03:17 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Pavel Shlyak <p.shlyak <at> pantherx.org>
To: bug-guix <at> gnu.org
Subject: GCC fails to cross-compile
Date: Thu, 26 May 2022 20:21:19 +0300
[Message part 1 (text/plain, inline)]
GCC fails to cross-compile. X86_64 host, aarch64 target.
Reproducer:
guix build gcc-toolchain --target=aarch64-linux-gnu
Log:
../../../gcc-12.1.0/libgcc/libgcc2.c: In function ‘__divsc3’:
../../../gcc-12.1.0/libgcc/libgcc2.c:1874:16: error: ‘__LIBGCC_SF_MAX__’ undeclared (first use in this function)
 1874 | # define RBIG (__LIBGCC_SF_MAX__ / 2)
      |                ^~~~~~~~~~~~~~~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:2063:23: note: in expansion of macro ‘RBIG’
 2063 |       if (FABS (d) >= RBIG)
      |                       ^~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:1874:16: note: each undeclared identifier is reported only once for each function it appears in
 1874 | # define RBIG (__LIBGCC_SF_MAX__ / 2)
      |                ^~~~~~~~~~~~~~~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:2063:23: note: in expansion of macro ‘RBIG’
 2063 |       if (FABS (d) >= RBIG)
      |                       ^~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:1876:17: error: ‘__LIBGCC_SF_EPSILON__’ undeclared (first use in this function)
 1876 | # define RMIN2 (__LIBGCC_SF_EPSILON__)
      |                 ^~~~~~~~~~~~~~~~~~~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:2073:22: note: in expansion of macro ‘RMIN2’
 2073 |       if (FABS (d) < RMIN2)
      |                      ^~~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:1875:16: error: ‘__LIBGCC_SF_MIN__’ undeclared (first use in this function)
 1875 | # define RMIN (__LIBGCC_SF_MIN__)
      |                ^~~~~~~~~~~~~~~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:2082:21: note: in expansion of macro ‘RMIN’
 2082 |    if (((FABS (a) < RMIN) && (FABS (b) < RMAX2) && (FABS (d) < RMAX2))
      |                     ^~~~
make[2]: *** [Makefile:501: _divsc3.o] Error 1
../../../gcc-12.1.0/libgcc/libgcc2.c: In function ‘__divdc3’:
make[2]: *** Waiting for unfinished jobs....
../../../gcc-12.1.0/libgcc/libgcc2.c:1885:16: error: ‘__LIBGCC_DF_MAX__’ undeclared (first use in this function)
 1885 | # define RBIG (__LIBGCC_DF_MAX__ / 2)
      |                ^~~~~~~~~~~~~~~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:2063:23: note: in expansion of macro ‘RBIG’
 2063 |       if (FABS (d) >= RBIG)
      |                       ^~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:1885:16: note: each undeclared identifier is reported only once for each function it appears in
 1885 | # define RBIG (__LIBGCC_DF_MAX__ / 2)
      |                ^~~~~~~~~~~~~~~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:2063:23: note: in expansion of macro ‘RBIG’
 2063 |       if (FABS (d) >= RBIG)
      |                       ^~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:1887:17: error: ‘__LIBGCC_DF_EPSILON__’ undeclared (first use in this function)
 1887 | # define RMIN2 (__LIBGCC_DF_EPSILON__)
      |                 ^~~~~~~~~~~~~~~~~~~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:2073:22: note: in expansion of macro ‘RMIN2’
 2073 |       if (FABS (d) < RMIN2)
      |                      ^~~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:1886:16: error: ‘__LIBGCC_DF_MIN__’ undeclared (first use in this function)
 1886 | # define RMIN (__LIBGCC_DF_MIN__)
      |                ^~~~~~~~~~~~~~~~~
../../../gcc-12.1.0/libgcc/libgcc2.c:2082:21: note: in expansion of macro ‘RMIN’
 2082 |    if (((FABS (a) < RMIN) && (FABS (b) < RMAX2) && (FABS (d) < RMAX2))
      |                     ^~~~
make[2]: *** [Makefile:501: _divdc3.o] Error 1
make[2]: Leaving directory '/tmp/guix-build-gcc-12.1.0.drv-0/build/aarch64-linux-gnu/libgcc'
make[1]: *** [Makefile:14447: all-target-libgcc] Error 2
[616mihnk6697dqvl3aq3bq5qqy15j0-gcc-12.1.0.drv (application/octet-stream, attachment)]

Information forwarded to bug-guix <at> gnu.org:
bug#55665; Package guix. (Mon, 30 May 2022 10:21:01 GMT) Full text and rfc822 format available.

Message #8 received at 55665 <at> debbugs.gnu.org (full text, mbox):

From: Pavel Shlyak <p.shlyak <at> pantherx.org>
To: 55665 <at> debbugs.gnu.org
Subject: GCC fails to cross-compile
Date: Mon, 30 May 2022 13:20:46 +0300
Related?
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100341




Information forwarded to bug-guix <at> gnu.org:
bug#55665; Package guix. (Thu, 11 Aug 2022 18:58:01 GMT) Full text and rfc822 format available.

Message #11 received at 55665 <at> debbugs.gnu.org (full text, mbox):

From: Pavel Shlyak <p.shlyak <at> pantherx.org>
To: 55665 <at> debbugs.gnu.org
Subject: GCC fails to cross-compile
Date: Thu, 11 Aug 2022 21:57:12 +0300
[Message part 1 (text/plain, inline)]
It seems to be still there, even after dfda2cc5f6a57a0b89b98f389a2f28bf1e94eaa4
[Message part 2 (text/html, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#55665; Package guix. (Fri, 10 Mar 2023 20:18:03 GMT) Full text and rfc822 format available.

Message #14 received at 55665 <at> debbugs.gnu.org (full text, mbox):

From: Josselin Poiret <dev <at> jpoiret.xyz>
To: Pavel Shlyak <p.shlyak <at> pantherx.org>, 55665 <at> debbugs.gnu.org
Subject: Re: bug#55665: GCC fails to cross-compile
Date: Fri, 10 Mar 2023 21:17:16 +0100
[Message part 1 (text/plain, inline)]
Hi Pavel,

Pavel Shlyak <p.shlyak <at> pantherx.org> writes:

> It seems to be still there, even after dfda2cc5f6a57a0b89b98f389a2f28bf1e94eaa4

Now that we're working on the core-updates branch, the issue is still
there.  Roughly, libgcc relies on defines that were introduced in GCC
12, so libgcc has to be compiled with GCC 12, but we have no immediate
way of doing that since we have a GCC 11 cross-compiler that built a GCC
12 host compiler which isn't usable by the builder.

It seems like the proper (but annoying) option would instead be to build
a GCC 12 cross-compiler for the builder using the builder GCC 11, then
use that to build a host GCC 12 and libgcc.  That is at odds with how
we do cross-compilation in general though :( We'll keep poking at it.

Best,
-- 
Josselin Poiret
[signature.asc (application/pgp-signature, inline)]

This bug report was last modified 2 years and 102 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.