From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sNemDV7FcV+rYwAA0tVLHw (envelope-from ) for ; Mon, 28 Sep 2020 11:13:34 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id aPamCV7FcV+kKAAA1q6Kng (envelope-from ) for ; Mon, 28 Sep 2020 11:13:34 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id B8F1494023B for ; Mon, 28 Sep 2020 11:13:33 +0000 (UTC) Received: from localhost ([::1]:37242 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMr64-0007E2-MB for larch@yhetil.org; Mon, 28 Sep 2020 07:13:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kMr5a-0006iW-DP for bug-guix@gnu.org; Mon, 28 Sep 2020 07:13:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:40084) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kMr5a-0001uU-3I for bug-guix@gnu.org; Mon, 28 Sep 2020 07:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kMr5Z-00007W-Vi for bug-guix@gnu.org; Mon, 28 Sep 2020 07:13:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#43668: Daemon tries to build GNU/Hurd derivations on GNU/Linux Resent-From: Jan Nieuwenhuizen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Mon, 28 Sep 2020 11:13:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43668 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 43668-submit@debbugs.gnu.org id=B43668.1601291546385 (code B ref 43668); Mon, 28 Sep 2020 11:13:01 +0000 Received: (at 43668) by debbugs.gnu.org; 28 Sep 2020 11:12:26 +0000 Received: from localhost ([127.0.0.1]:51623 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMr4z-000068-Qc for submit@debbugs.gnu.org; Mon, 28 Sep 2020 07:12:26 -0400 Received: from eggs.gnu.org ([209.51.188.92]:44340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kMr4x-00005w-E4 for 43668@debbugs.gnu.org; Mon, 28 Sep 2020 07:12:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:41235) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kMr4q-0001oT-0X; Mon, 28 Sep 2020 07:12:17 -0400 Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=58444 helo=dundal.janneke.lilypond.org) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kMr4f-0006YD-RW; Mon, 28 Sep 2020 07:12:11 -0400 From: Jan Nieuwenhuizen Organization: AvatarAcademy.nl References: <87a6xacmw5.fsf@inria.fr> <875z7ychvp.fsf@gnu.org> X-Url: http://AvatarAcademy.nl Date: Mon, 28 Sep 2020 13:11:09 +0200 In-Reply-To: <875z7ychvp.fsf@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Mon, 28 Sep 2020 12:31:22 +0200") Message-ID: <87lfgurwaa.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 43668@debbugs.gnu.org Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Spam-Score: -1.51 X-TUID: N+pEG5EQre/F Ludovic Court=C3=A8s writes: Hi! > Ludovic Court=C3=A8s skribis: > >> It=E2=80=99s no wonder that the GNU/Hurd executable fails to run on GNU/= Linux. >> The reason the daemon tries to run it anyway is because of the hack >> introduced in 7bf2a70a4ffd976d50638d3b9f2ec409763157df, in support of >> transparent emulation via binfmt_misc. > > The thing is that x86 GNU/Hurd and GNU/Linux ELF binaries are > indistinguishable AFAICS since they both use ELFOSABI_NONE: > > scheme@(guile-user)> ,use(guix elf) > scheme@(guile-user)> ,use(rnrs io ports) > scheme@(guile-user)> (define e (parse-elf (call-with-input-file "/gnu/sto= re/vq7zyb4hmlrafflmrcjbqccxp4dsx0s3-bash" get-bytevector-all))) > scheme@(guile-user)> (elf-abi e) > $6 =3D 0 > scheme@(guile-user)> ELFOSABI_GNU > $7 =3D 3 > scheme@(guile-user)> (define e2 (parse-elf (call-with-input-file "/bin/sh= " get-bytevector-all))) > scheme@(guile-user)> (elf-abi e2) > $8 =3D 0 > > (The =E2=80=98file=E2=80=99 command does manage to recognize GNU/Hurd bin= aries, but I > don=E2=80=99t know how it does it.) Looking at the file sources, it uses do_os_note, look: --8<---------------cut here---------------start------------->8--- $ readelf -a $(guix build --target=3Di586-pc-gnu hello)bin/hello Displaying notes found in: .note.ABI-tag Owner Data size Description GNU 0x00000010 NT_GNU_ABI_TAG (ABI version tag) OS: Hurd, ABI: 0.0.0 --8<---------------cut here---------------end--------------->8--- > So I think we can=E2=80=99t count on an =E2=80=98execve=E2=80=99 error an= d thus have to treat > this case (same architecture but different OS kernel) specially, as > shown below. > > Thoughts? If that really doesn't work...then yeah (yuck ;-) Greetigs, Janneke --=20 Jan Nieuwenhuizen | GNU LilyPond http://lilypond.org Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com