GNU bug report logs - #60056
cross-compilation doesn't honor gcc native input

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix; Reported by: Maxim Cournoyer <maxim.cournoyer@HIDDEN>; dated Wed, 14 Dec 2022 02:17:02 UTC; Maintainer for guix is bug-guix@HIDDEN.
Added blocking bug(s) 59885 Request was from Maxim Cournoyer <maxim.cournoyer@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 14 Dec 2022 02:16:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Dec 13 21:16:26 2022
Received: from localhost ([127.0.0.1]:35992 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1p5HJq-0000LI-9t
	for submit <at> debbugs.gnu.org; Tue, 13 Dec 2022 21:16:26 -0500
Received: from lists.gnu.org ([209.51.188.17]:54194)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1p5HJp-0000LC-31
 for submit <at> debbugs.gnu.org; Tue, 13 Dec 2022 21:16:25 -0500
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1p5HJo-00078a-MQ
 for bug-guix@HIDDEN; Tue, 13 Dec 2022 21:16:24 -0500
Received: from mail-qt1-x835.google.com ([2607:f8b0:4864:20::835])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <maxim.cournoyer@HIDDEN>)
 id 1p5HJm-0003Fp-Rw
 for bug-guix@HIDDEN; Tue, 13 Dec 2022 21:16:24 -0500
Received: by mail-qt1-x835.google.com with SMTP id cg5so1463485qtb.12
 for <bug-guix@HIDDEN>; Tue, 13 Dec 2022 18:16:22 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:subject:to
 :from:from:to:cc:subject:date:message-id:reply-to;
 bh=fU6RoiWA6ZFkX2sOfDO/a4M3ffCSRvqtJ8hlFtEu828=;
 b=JZLF2hFZujXhokL7A9E7ppUKprltd3QOt1Kbs3eXgi6m88oPZR0VI1t3aEaviFRC4Y
 0ohhYqBR8MAhA8NOt+e/kCTp7xAdKkI9knYH7U+A1bNLr4/HYQn2hkoRhbvK+EOus5UD
 wdE7D4Ncq3G6pTxoKwUuWv6j8YQPiqlqEyzA01PvftOuvgWmYAdVBIJkyquui/mjrvaQ
 jvzINDv710Q9qHA44/hilwFbkVzStN4uiJxxNV9WZgHzuWGzMQvcNwwsQBXdJI75XWOs
 p0Ff3jxa7qhnwAsikUhil8pRCtN5usYZbYEYaLOSWoUEKFXhdtZIZeCF6Rz++a426OXV
 ChXg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=content-transfer-encoding:mime-version:message-id:date:subject:to
 :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to;
 bh=fU6RoiWA6ZFkX2sOfDO/a4M3ffCSRvqtJ8hlFtEu828=;
 b=hLChLfHheaVjBptu+KoL6Ljm8CTDNw0hi3+sIdW7/jPsK+dAap098p8+28k8G51wgh
 HydqXAMVEAckH5pYVYu9bmn0su4bU7FdYHDnbvVL8d37FTlh1hXf6U2wig1fAVlRG/O/
 AbQWTvNGr6WFOj0sUeQMUyiFJkhTgXkaPjr/077ea4toPX4/HZY5L/XXYHTjxVHOGS9w
 tCjIWMQnaliNiSSHtgbx5PTbxPDNwKsYL5WbFS+LRV1rfSLCwBDhZouxJrwmqGRZmfYR
 ZY36jDVYSbzimllQQyWPTIJoNLgMT9DDuGpwZ2T9jSonQ1oVPiAU2FjH/MZXK8kGLcNG
 48nA==
X-Gm-Message-State: ANoB5pksCJxEdSZvUa2Q5SR2ReI7V27fiK3Wk6kDKAtFKOoYRl8K7CxR
 bWAIdNqbhYfo5xz/a+AMViDhzDo7mtFd0A==
X-Google-Smtp-Source: AA0mqf7D1udWcp7k5teClwro3mMRVkB/5DGBkEJZZQjpkgo820ydOjlgtS4cPA1Y/DgxKaJD1JaazQ==
X-Received: by 2002:ac8:4a8e:0:b0:3a6:9535:cc9f with SMTP id
 l14-20020ac84a8e000000b003a69535cc9fmr29686590qtq.45.1670984181504; 
 Tue, 13 Dec 2022 18:16:21 -0800 (PST)
Received: from hurd ([2607:fad8:4:3::1006]) by smtp.gmail.com with ESMTPSA id
 bq17-20020a05620a469100b006ff8dfded9csm6408797qkb.38.2022.12.13.18.16.20
 for <bug-guix@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 13 Dec 2022 18:16:21 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: bug-guix <bug-guix@HIDDEN>
Subject: cross-compilation doesn't honor gcc native input
Date: Tue, 13 Dec 2022 21:16:20 -0500
Message-ID: <87h6xy4tmz.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Received-SPF: pass client-ip=2607:f8b0:4864:20::835;
 envelope-from=maxim.cournoyer@HIDDEN; helo=mail-qt1-x835.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

Hello Guix,

I've recently noticed that cross-compiling with a different GCC was not
possible by simply adding them as native inputs the same way we can
already do when compiling natively.

Here's an example in our package collection that fails to cross-compile
for that reason:

--8<---------------cut here---------------start------------->8---
$ guix build --target=3Darm-linux-gnueabihf --no-offload glibc@HIDDEN

[...]

arm-linux-gnueabihf-gcc ../sysdeps/arm/aeabi_lcsts.c -c -std=3Dgnu11 -fgnu8=
9-inline  -g -O2 -Wall -Wwrite-strings -Wundef -Werror -fmerge-all-constant=
s -frounding-math -fno-stack-protector -Wstrict-prototypes -Wold-style-defi=
nition -fmath-errno    -fno-stack-protector -DSTACK_PROTECTOR_LEVEL=3D0   -=
ftls-model=3Dinitial-exec      -I../include -I/tmp/guix-build-glibc-2.30.dr=
v-0/build/csu  -I/tmp/guix-build-glibc-2.30.drv-0/build  -I../sysdeps/unix/=
sysv/linux/arm  -I../sysdeps/arm/nptl  -I../sysdeps/unix/sysv/linux/include=
 -I../sysdeps/unix/sysv/linux  -I../sysdeps/nptl  -I../sysdeps/pthread  -I.=
./sysdeps/gnu  -I../sysdeps/unix/inet  -I../sysdeps/unix/sysv  -I../sysdeps=
/unix/arm  -I../sysdeps/unix  -I../sysdeps/posix  -I../sysdeps/arm/armv7/mu=
ltiarch  -I../sysdeps/arm/armv7  -I../sysdeps/arm/armv6t2  -I../sysdeps/arm=
/armv6  -I../sysdeps/arm/include -I../sysdeps/arm  -I../sysdeps/wordsize-32=
  -I../sysdeps/ieee754/flt-32  -I../sysdeps/ieee754/dbl-64  -I../sysdeps/ie=
ee754  -I../sysdeps/generic  -I.. -I../libio -I. -nostdinc -isystem /gnu/st=
ore/qxiyl966akwfj44vkswams3db61r45m7-gcc-cross-arm-linux-gnueabihf-10.3.0-l=
ib/lib/gcc/arm-linux-gnueabihf/10.3.0/include -isystem /gnu/store/qxiyl966a=
kwfj44vkswams3db61r45m7-gcc-cross-arm-linux-gnueabihf-10.3.0-lib/lib/gcc/ar=
m-linux-gnueabihf/10.3.0/include-fixed -isystem /gnu/store/k4lzn762cpwwznxc=
2gvcyidfjnx3yw7b-linux-libre-headers-5.10.35/include -D_LIBC_REENTRANT -inc=
lude /tmp/guix-build-glibc-2.30.drv-0/build/libc-modules.h -DMODULE_NAME=3D=
libc -include ../include/libc-symbols.h       -DTOP_NAMESPACE=3Dglibc -o /t=
mp/guix-build-glibc-2.30.drv-0/build/csu/aeabi_lcsts.o -MD -MP -MF /tmp/gui=
x-build-glibc-2.30.drv-0/build/csu/aeabi_lcsts.o.dt -MT /tmp/guix-build-gli=
bc-2.30.drv-0/build/csu/aeabi_lcsts.o
In file included from ../sysdeps/arm/libc-tls.c:19:
../csu/libc-tls.c: In function =E2=80=98__libc_setup_tls=E2=80=99:
../csu/libc-tls.c:209:30: error: array subscript 1 is outside the bounds of=
 an interior zero-length array =E2=80=98struct dtv_slotinfo[0]=E2=80=99 [-W=
error=3Dzero-length-bounds]
  209 |   static_slotinfo.si.slotinfo[1].map =3D main_map;
      |   ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from ../sysdeps/arm/ldsodefs.h:38,
                 from ../sysdeps/gnu/ldsodefs.h:46,
                 from ../sysdeps/unix/sysv/linux/ldsodefs.h:25,
                 from ../sysdeps/unix/sysv/linux/arm/ldsodefs.h:22,
                 from ../csu/libc-tls.c:21,
                 from ../sysdeps/arm/libc-tls.c:19:
../sysdeps/generic/ldsodefs.h:406:7: note: while referencing =E2=80=98sloti=
nfo=E2=80=99
  406 |     } slotinfo[0];
      |       ^~~~~~~~
arm-linux-gnueabihf-gcc ../sysdeps/arm/aeabi_sighandlers.S -c     -I../incl=
ude -I/tmp/guix-build-glibc-2.30.drv-0/build/csu  -I/tmp/guix-build-glibc-2=
.30.drv-0/build  -I../sysdeps/unix/sysv/linux/arm  -I../sysdeps/arm/nptl  -=
I../sysdeps/unix/sysv/linux/include -I../sysdeps/unix/sysv/linux  -I../sysd=
eps/nptl  -I../sysdeps/pthread  -I../sysdeps/gnu  -I../sysdeps/unix/inet  -=
I../sysdeps/unix/sysv  -I../sysdeps/unix/arm  -I../sysdeps/unix  -I../sysde=
ps/posix  -I../sysdeps/arm/armv7/multiarch  -I../sysdeps/arm/armv7  -I../sy=
sdeps/arm/armv6t2  -I../sysdeps/arm/armv6  -I../sysdeps/arm/include -I../sy=
sdeps/arm  -I../sysdeps/wordsize-32  -I../sysdeps/ieee754/flt-32  -I../sysd=
eps/ieee754/dbl-64  -I../sysdeps/ieee754  -I../sysdeps/generic  -I.. -I../l=
ibio -I. -nostdinc -isystem /gnu/store/qxiyl966akwfj44vkswams3db61r45m7-gcc=
-cross-arm-linux-gnueabihf-10.3.0-lib/lib/gcc/arm-linux-gnueabihf/10.3.0/in=
clude -isystem /gnu/store/qxiyl966akwfj44vkswams3db61r45m7-gcc-cross-arm-li=
nux-gnueabihf-10.3.0-lib/lib/gcc/arm-linux-gnueabihf/10.3.0/include-fixed -=
isystem /gnu/store/k4lzn762cpwwznxc2gvcyidfjnx3yw7b-linux-libre-headers-5.1=
0.35/include -D_LIBC_REENTRANT -include /tmp/guix-build-glibc-2.30.drv-0/bu=
ild/libc-modules.h -DMODULE_NAME=3Dlibc -include ../include/libc-symbols.h =
      -DTOP_NAMESPACE=3Dglibc -DASSEMBLER -I/tmp/guix-build-glibc-2.30.drv-=
0/build/csu/. -g -Werror=3Dundef -Wa,--noexecstack   -o /tmp/guix-build-gli=
bc-2.30.drv-0/build/csu/aeabi_sighandlers.o -MD -MP -MF /tmp/guix-build-gli=
bc-2.30.drv-0/build/csu/aeabi_sighandlers.o.dt -MT /tmp/guix-build-glibc-2.=
30.drv-0/build/csu/aeabi_sighandlers.o
cc1: all warnings being treated as errors
make[2]: *** [/tmp/guix-build-glibc-2.30.drv-0/build/sysd-rules:519: /tmp/g=
uix-build-glibc-2.30.drv-0/build/csu/libc-tls.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory '/tmp/guix-build-glibc-2.30.drv-0/glibc-2.30/csu'
make[1]: *** [Makefile:259: csu/subdir_lib] Error 2
make[1]: Leaving directory '/tmp/guix-build-glibc-2.30.drv-0/glibc-2.30'
make: *** [Makefile:9: all] Error 2
error: in phase 'build': uncaught exception:
%exception #<&invoke-error program: "make" arguments: ("-j" "4") exit-statu=
s: 2 term-signal: #f stop-signal: #f>=20
phase `build' failed after 8.5 seconds
command "make" "-j" "4" failed with status 2
builder for `/gnu/store/cpabyq7ly2sf1jxxbn8srbqkd9chz9w1-glibc-2.30.drv' fa=
iled with exit code 1
build of /gnu/store/cpabyq7ly2sf1jxxbn8srbqkd9chz9w1-glibc-2.30.drv failed
--8<---------------cut here---------------end--------------->8---

--=20
Thanks,
Maxim




Acknowledgement sent to Maxim Cournoyer <maxim.cournoyer@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#60056; Package guix. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 14 Dec 2022 20:45:02 UTC

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