GNU bug report logs - #44000
Guile-Git cross-compiled to i586-pc-gnu gets bytestructures wrong

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: Ludovic Courtès <ludo@HIDDEN>; dated Wed, 14 Oct 2020 22:27:02 UTC; Maintainer for guix is bug-guix@HIDDEN.

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


Received: (at 44000) by debbugs.gnu.org; 16 Nov 2020 22:01:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 16 17:01:26 2020
Received: from localhost ([127.0.0.1]:57575 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kemYv-0007KF-Rj
	for submit <at> debbugs.gnu.org; Mon, 16 Nov 2020 17:01:26 -0500
Received: from eggs.gnu.org ([209.51.188.92]:35490)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kemYs-0007K1-Gg
 for 44000 <at> debbugs.gnu.org; Mon, 16 Nov 2020 17:01:24 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:43396)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1kemYn-0003rb-7Z
 for 44000 <at> debbugs.gnu.org; Mon, 16 Nov 2020 17:01:17 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49670 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1kemYl-000115-Mu
 for 44000 <at> debbugs.gnu.org; Mon, 16 Nov 2020 17:01:16 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 44000 <at> debbugs.gnu.org
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
References: <87v9fccuml.fsf@HIDDEN> <871ri0c4u8.fsf@HIDDEN>
 <1325d1c4-e047-76e5-2180-672fef7238b9@HIDDEN>
 <87mu0kn3wh.fsf@HIDDEN> <87blgy39q7.fsf@HIDDEN>
 <87ft66umhj.fsf@HIDDEN> <87o8jxuvsy.fsf@HIDDEN>
Date: Mon, 16 Nov 2020 23:01:14 +0100
In-Reply-To: <87o8jxuvsy.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Mon, 16 Nov 2020 17:10:37 +0100")
Message-ID: <875z65ufkl.fsf@HIDDEN>
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-Debbugs-Envelope-To: 44000
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: -3.3 (---)

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> 1.0.9 seems to help my rather involved use case (Guix cross-compiled to
> GNU/Hurd from x86_64-linux, then running =E2=80=98guix pull=E2=80=99, whi=
ch depends on
> Guile-Git, which uses Bytestructures) but it still eventually crashes:
>
> ludo@childhurd ~$ /gnu/store/mxi1za8gdq77438ywgzdzy2zywb9nk76-guix-1.2.0r=
c1-1.3ba6ffd/bin/guix pull
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.=
org/git/guix.git'...
> receiving objects  25% [#############                                    =
     ]Illegal instruction

Most likely, this crash is due to the use of new progress report feature
in (guix git).  If I arrange to not use it, clone the whole repo
proceeds without crashing.

Unfortunately I=E2=80=99m unable to get a usable backtrace once SIGILL has =
been
raised, be it by attaching to it (using
CRASHSERVER=3D/servers/crash-suspend), spawning it and crashing it from
gdb, or inspecting its core file.  At best I can see the backtrace of
the msg thread, nothing more:

--8<---------------cut here---------------start------------->8---
(gdb) thread 1
[Switching to thread 1 (process 310)]
#0  0x080f08c0 in ?? ()
(gdb) bt
#0  0x080f08c0 in ?? ()
#1  0x00000000 in ?? ()
(gdb) thread 2
[Switching to thread 2 (process 1)]
#0  0x0159282c in mach_msg_trap () at /tmp/guix-build-glibc-cross-i586-pc-g=
nu-2.31.drv-0/build/mach/mach_msg_trap.S:2
2       /tmp/guix-build-glibc-cross-i586-pc-gnu-2.31.drv-0/build/mach/mach_=
msg_trap.S: No such file or directory.
(gdb) bt
#0  0x0159282c in mach_msg_trap () at /tmp/guix-build-glibc-cross-i586-pc-g=
nu-2.31.drv-0/build/mach/mach_msg_trap.S:2
#1  0x01592f2a in __GI___mach_msg (msg=3D0x2802aa0, option=3D3, send_size=
=3D96, rcv_size=3D32, rcv_name=3D109, timeout=3D0, notify=3D0) at msg.c:111
#2  0x017dc8ab in __crash_dump_task (crashserver=3D132, task=3D1, file=3D13=
3, signo=3D11, sigcode=3D2, sigerror=3D2, exc=3D1, code=3D2, subcode=3D2109=
86494, cttyid_port=3D102, cttyid_portPoly=3D19)
    at /tmp/guix-build-glibc-cross-i586-pc-gnu-2.31.drv-0/build/hurd/RPC_cr=
ash_dump_task.c:254
#3  0x015b248c in write_corefile (detail=3D<optimized out>, signo=3D<optimi=
zed out>) at hurdsig.c:296
#4  post_signal (untraced=3D<optimized out>) at hurdsig.c:947
#5  0x015b274b in _hurd_internal_post_signal (ss=3D0x1800808, signo=3D11, d=
etail=3D0x2802e5c, reply_port=3D0, reply_port_type=3D17, untraced=3D0) at h=
urdsig.c:1235
#6  0x015b3fc1 in _S_catch_exception_raise (port=3D96, thread=3D39, task=3D=
1, exception=3D1, code=3D2, subcode=3D210986494) at catch-exc.c:88
#7  0x017c09b4 in _Xexception_raise (InHeadP=3D0x2802f20, OutHeadP=3D0x2803=
f30) at /tmp/guix-build-glibc-cross-i586-pc-gnu-2.31.drv-0/build/mach/mach/=
exc_server.c:155
#8  0x017c0a52 in _S_exc_server (InHeadP=3D0x2802f20, OutHeadP=3D0x2803f30)=
 at /tmp/guix-build-glibc-cross-i586-pc-gnu-2.31.drv-0/build/mach/mach/exc_=
server.c:208
#9  0x015a7a09 in msgport_server (inp=3D0x2802f20, outp=3D0x2803f30) at msg=
portdemux.c:49
#10 0x015934c3 in __mach_msg_server_timeout (demux=3D0x15a79b0 <msgport_ser=
ver>, max_size=3D4096, rcv_name=3D96, option=3D0, timeout=3D0) at msgserver=
.c:108
#11 0x01593607 in __mach_msg_server (demux=3D0x15a79b0 <msgport_server>, ma=
x_size=3D4096, rcv_name=3D96) at msgserver.c:195
#12 0x015a7a86 in _hurd_msgport_receive () at msgportdemux.c:67
#13 0x011eda50 in entry_point (self=3D0x804ac20, start_routine=3D0x15a7a30 =
<_hurd_msgport_receive>, arg=3D0x0) at pt-create.c:62
#14 0x00000000 in ?? ()
--8<---------------cut here---------------end--------------->8---

(Would be nice to fix this debugging issue.  It looks like GDB fails to
interpret the thread state of suspended threads or something.)

Anyway, this crash could be due to a GC issue, in which case it would
not be Hurd-specific.  I could not reproduce it with i686-linux =E2=80=98gu=
ix=E2=80=99
though, and obviously not with x86_64 binaries either.

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at 44000) by debbugs.gnu.org; 16 Nov 2020 17:38:09 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 16 12:38:09 2020
Received: from localhost ([127.0.0.1]:57095 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1keiS9-0006xW-1P
	for submit <at> debbugs.gnu.org; Mon, 16 Nov 2020 12:38:09 -0500
Received: from eggs.gnu.org ([209.51.188.92]:52742)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1keiS8-0006xK-1l
 for 44000 <at> debbugs.gnu.org; Mon, 16 Nov 2020 12:38:08 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:37675)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1keiS2-0004tr-Or; Mon, 16 Nov 2020 12:38:02 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49092 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1keiRy-0003m3-6D; Mon, 16 Nov 2020 12:37:59 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Taylan Kammer <taylan.kammer@HIDDEN>
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
References: <87v9fccuml.fsf@HIDDEN> <871ri0c4u8.fsf@HIDDEN>
 <1325d1c4-e047-76e5-2180-672fef7238b9@HIDDEN>
 <87mu0kn3wh.fsf@HIDDEN> <87blgy39q7.fsf@HIDDEN>
 <87ft66umhj.fsf@HIDDEN> <87o8jxuvsy.fsf@HIDDEN>
 <0d2d91d0-c335-ad6a-6249-8090837f16ff@HIDDEN>
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 26 Brumaire an 229 de la =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Mon, 16 Nov 2020 18:37:56 +0100
In-Reply-To: <0d2d91d0-c335-ad6a-6249-8090837f16ff@HIDDEN> (Taylan Kammer's
 message of "Mon, 16 Nov 2020 18:07:06 +0100")
Message-ID: <87blfxurrf.fsf@HIDDEN>
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-Debbugs-Envelope-To: 44000
Cc: 44000 <at> debbugs.gnu.org
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: -3.3 (---)

Hi,

Taylan Kammer <taylan.kammer@HIDDEN> skribis:

> The module (bytestructures guile numeric) ought to work, although it
> doesn't contain the binding 'arch32bit?'.  Do you actually need that=20
> predicate, or was that just for demonstration?  The "right" way to
> test whether the predicate works correctly would be to check whether
> e.g. intptr_t equals int32 or int64 as per 'eq?'.

Oh right, that makes sense.  Apparently, all is good:

--8<---------------cut here---------------start------------->8---
scheme@(guix-user)> ,m (bytestructures guile numeric)=20=20=20=20=20=20=20=
=20=20=20
scheme@(bytestructures guile numeric)> intptr_t
$2 =3D #<bytestructure-descriptor 0x5600e60>
scheme@(bytestructures guile numeric)> (eq? intptr_t int32)
$3 =3D #t
scheme@(bytestructures guile numeric)> (eq? intptr_t int64)
$4 =3D #f
--8<---------------cut here---------------end--------------->8---

I=E2=80=99ll get more debugging info about the crash and will let you know =
if
Bytestructures is the culprit.  ;-)

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at 44000) by debbugs.gnu.org; 16 Nov 2020 17:07:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 16 12:07:17 2020
Received: from localhost ([127.0.0.1]:57027 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kehyH-00069f-LM
	for submit <at> debbugs.gnu.org; Mon, 16 Nov 2020 12:07:17 -0500
Received: from mail-ed1-f54.google.com ([209.85.208.54]:37885)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <taylan.kammer@HIDDEN>) id 1kehyF-00069R-G5
 for 44000 <at> debbugs.gnu.org; Mon, 16 Nov 2020 12:07:16 -0500
Received: by mail-ed1-f54.google.com with SMTP id cq7so19471746edb.4
 for <44000 <at> debbugs.gnu.org>; Mon, 16 Nov 2020 09:07:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:cc:references:from:message-id:date:user-agent
 :mime-version:in-reply-to:content-language:content-transfer-encoding;
 bh=vCQMX1MJULw5agbgBO9CCqcBjk8Ec7SCTRUAq2/Fp8A=;
 b=Zot2RFZLBliYmZUUd/vGo3YqFMoIibun7Eo2rXqfU6rRjIheTojgr9KG4JiA4XVCXi
 21sJTrBYptjeonG+XDikWSp1cmUVMzOjKw1TyN3vshCUUD3o1ZII3NrN+yf/NK/Jk6yl
 k+MrxQYQxuUPIa9mq/3BMpySy/1AEi4Jba/pNMirzDa4B4Poq1suiubDlwkb3M45Y1WO
 rOICzaJNMbt6prHK6SNI19AEvGs68xmfhwA+rp3/tfxa5DeEuIudX/c0kVuoeXhdfsfl
 2yfEVXhuWZmqdFYZqDfjjOUG8zht4duXs0Jmoudg9QAqPwNhLLCqCmdVTV3Ejwh423ux
 JYJA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:cc:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=vCQMX1MJULw5agbgBO9CCqcBjk8Ec7SCTRUAq2/Fp8A=;
 b=cVmzD7+T4mbBt3EyqvutXUUpOlqqm78ym6xpWRBpgHfQ/ByXTQfZSBkw52/jZDbdch
 wYnu9jy4uPw2DYGdSkBXthR94Z7niap0TPB/K5qWGC/41AWJ20wY9nrlIkSGkRUjWw22
 C/gP7wgywKGObftoVg86Yes2le2Cmaf9vEN+j4gLE/zpH+JiMZsNv1Z8s6jKWI1B1ZRQ
 92RN1wUWEe73GMuCJKiDmy/K0BOZX8HyCmt/gTJ/C05+iBE0Ee8dWWXN2Qdd5irx+c/1
 o+jIwLwXUwFRlRyLkO1V6MRy5DoFPc7/4QambhSR3Vqe1ENNsnPPa2W5vhvkSSb4fHkN
 8oKg==
X-Gm-Message-State: AOAM530vn5/T80sNvWTDFIkqDNIC8Nsl/kQ4F6my7UM93uZlDeBbiYfh
 nCvYY9at8P2Q+rhG9Bcoi+HdG+MBYa0=
X-Google-Smtp-Source: ABdhPJwi6B44KgFTG46ZL4uB2pCCJ2uxARy5Jkp22Ztj4m13/TTcHfvg7XVjE8nGVEp76oY15AfOaA==
X-Received: by 2002:aa7:c704:: with SMTP id i4mr16395051edq.51.1605546428264; 
 Mon, 16 Nov 2020 09:07:08 -0800 (PST)
Received: from [192.168.178.20] ([109.90.125.150])
 by smtp.gmail.com with ESMTPSA id k23sm10653910ejs.100.2020.11.16.09.07.07
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Mon, 16 Nov 2020 09:07:07 -0800 (PST)
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= <ludo@HIDDEN>
References: <87v9fccuml.fsf@HIDDEN> <871ri0c4u8.fsf@HIDDEN>
 <1325d1c4-e047-76e5-2180-672fef7238b9@HIDDEN> <87mu0kn3wh.fsf@HIDDEN>
 <87blgy39q7.fsf@HIDDEN> <87ft66umhj.fsf@HIDDEN> <87o8jxuvsy.fsf@HIDDEN>
From: Taylan Kammer <taylan.kammer@HIDDEN>
Message-ID: <0d2d91d0-c335-ad6a-6249-8090837f16ff@HIDDEN>
Date: Mon, 16 Nov 2020 18:07:06 +0100
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101
 Thunderbird/78.4.3
MIME-Version: 1.0
In-Reply-To: <87o8jxuvsy.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 44000
Cc: 44000 <at> debbugs.gnu.org
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: -1.0 (-)

On 16.11.2020 17:10, Ludovic Courtès wrote:
>
> 1.0.9 seems to help my rather involved use case (Guix cross-compiled to
> GNU/Hurd from x86_64-linux, then running ‘guix pull’, which depends on
> Guile-Git, which uses Bytestructures) but it still eventually crashes:
> 
> --8<---------------cut here---------------start------------->8---
> ludo@childhurd ~$ /gnu/store/mxi1za8gdq77438ywgzdzy2zywb9nk76-guix-1.2.0rc1-1.3ba6ffd/bin/guix pull
> Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.org/git/guix.git'...
> receiving objects  25% [#############                                         ]Illegal instruction
> --8<---------------cut here---------------end--------------->8---
> 
> The problem may well be elsewhere though.

Had you tested the same with your patch?  If it worked with your patch 
but doesn't work with 1.0.9 then I'll have to take another look I guess.

> However, at the REPL I can no longer access the ‘numeric’ module:
> 
> --8<---------------cut here---------------start------------->8---
> ludo@childhurd ~$ /gnu/store/mxi1za8gdq77438ywgzdzy2zywb9nk76-guix-1.2.0rc1-1.3ba6ffd/bin/guix repl
> GNU Guile 3.0.4
> Copyright (C) 1995-2020 Free Software Foundation, Inc.
> 
> Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
> This program is free software, and you are welcome to redistribute it
> under certain conditions; type `,show c' for details.
> 
> Enter `,help' for help.
> scheme@(guix-user)> ,m(bytestructures body numeric)
> While executing meta-command:
> error: environment: unbound variable
> scheme@(guix-user)> (@@ (bytestructures body numeric) arch-32bit?)
> While compiling expression:
> error: environment: unbound variable
> --8<---------------cut here---------------end--------------->8---

One shouldn't try to use (bytestructures body ...) as modules.  The 
files in that directory contain no module-related boilerplate at all, 
including imports, which is why in this case it complains about the lack 
of the binding 'environment'.

The module (bytestructures guile numeric) ought to work, although it 
doesn't contain the binding 'arch32bit?'.  Do you actually need that 
predicate, or was that just for demonstration?  The "right" way to test 
whether the predicate works correctly would be to check whether e.g. 
intptr_t equals int32 or int64 as per 'eq?'.

> Thanks,
> Ludo’.
> 

Hope I was able to help!

Taylan




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at 44000) by debbugs.gnu.org; 16 Nov 2020 16:10:47 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 16 11:10:47 2020
Received: from localhost ([127.0.0.1]:56832 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1keh5b-0001xx-8c
	for submit <at> debbugs.gnu.org; Mon, 16 Nov 2020 11:10:47 -0500
Received: from eggs.gnu.org ([209.51.188.92]:58992)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1keh5Z-0001xL-7A
 for 44000 <at> debbugs.gnu.org; Mon, 16 Nov 2020 11:10:46 -0500
Received: from fencepost.gnu.org ([2001:470:142:3::e]:35884)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1keh5T-000083-Nw; Mon, 16 Nov 2020 11:10:39 -0500
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=48920 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1keh5T-000471-9W; Mon, 16 Nov 2020 11:10:39 -0500
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Taylan Kammer <taylan.kammer@HIDDEN>
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
References: <87v9fccuml.fsf@HIDDEN> <871ri0c4u8.fsf@HIDDEN>
 <1325d1c4-e047-76e5-2180-672fef7238b9@HIDDEN>
 <87mu0kn3wh.fsf@HIDDEN> <87blgy39q7.fsf@HIDDEN>
 <87ft66umhj.fsf@HIDDEN>
Date: Mon, 16 Nov 2020 17:10:37 +0100
In-Reply-To: <87ft66umhj.fsf@HIDDEN> (Taylan Kammer's message of "Thu, 22
 Oct 2020 20:47:04 +0200")
Message-ID: <87o8jxuvsy.fsf@HIDDEN>
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-Debbugs-Envelope-To: 44000
Cc: 44000 <at> debbugs.gnu.org
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: -3.3 (---)

Hi Taylan,

Apologies for the delay, it seems I hadn=E2=80=99t noticed your reply.

Taylan Kammer <taylan.kammer@HIDDEN> skribis:

> Yes, you're right.  I've made another release (1.0.9), where I use
>
>   (environment '(guile) '(bytestructures guile numeric-data-model))
>
> for the 'base-environment' binding in case we're running on Guile.
>
> It now gives me correct results locally (woe on me for not having
> properly tested the previous one) so I think it should definitely work
> when cross-compiling too, since the 'eval' is sure to be executed at
> run-time and not compile-time...

1.0.9 seems to help my rather involved use case (Guix cross-compiled to
GNU/Hurd from x86_64-linux, then running =E2=80=98guix pull=E2=80=99, which=
 depends on
Guile-Git, which uses Bytestructures) but it still eventually crashes:

--8<---------------cut here---------------start------------->8---
ludo@childhurd ~$ /gnu/store/mxi1za8gdq77438ywgzdzy2zywb9nk76-guix-1.2.0rc1=
-1.3ba6ffd/bin/guix pull
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.or=
g/git/guix.git'...
receiving objects  25% [#############                                      =
   ]Illegal instruction
--8<---------------cut here---------------end--------------->8---

The problem may well be elsewhere though.

However, at the REPL I can no longer access the =E2=80=98numeric=E2=80=99 m=
odule:

--8<---------------cut here---------------start------------->8---
ludo@childhurd ~$ /gnu/store/mxi1za8gdq77438ywgzdzy2zywb9nk76-guix-1.2.0rc1=
-1.3ba6ffd/bin/guix repl
GNU Guile 3.0.4
Copyright (C) 1995-2020 Free Software Foundation, Inc.

Guile comes with ABSOLUTELY NO WARRANTY; for details type `,show w'.
This program is free software, and you are welcome to redistribute it
under certain conditions; type `,show c' for details.

Enter `,help' for help.
scheme@(guix-user)> ,m(bytestructures body numeric)
While executing meta-command:
error: environment: unbound variable
scheme@(guix-user)> (@@ (bytestructures body numeric) arch-32bit?)
While compiling expression:
error: environment: unbound variable
--8<---------------cut here---------------end--------------->8---

Thoughts?

Thanks,
Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at 44000) by debbugs.gnu.org; 22 Oct 2020 18:47:14 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 22 14:47:14 2020
Received: from localhost ([127.0.0.1]:53815 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kVfcH-0006B0-S6
	for submit <at> debbugs.gnu.org; Thu, 22 Oct 2020 14:47:14 -0400
Received: from mail-ed1-f48.google.com ([209.85.208.48]:38841)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <taylan.kammer@HIDDEN>) id 1kVfcG-0006Am-ID
 for 44000 <at> debbugs.gnu.org; Thu, 22 Oct 2020 14:47:12 -0400
Received: by mail-ed1-f48.google.com with SMTP id bc23so2778246edb.5
 for <44000 <at> debbugs.gnu.org>; Thu, 22 Oct 2020 11:47:12 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=rcfvNIwTyEf4+cCbRw1fHkpmc/NI1d0Ts6mEkXQrPMw=;
 b=eDdxgMAnk2dW7jqdtEn7lfKUN9ivccOtyvoOGCdx9cDh1mP2pUqcKe7XfuyjtOGARA
 Nr5Hz3em07jwiXE3ZuX0hOdDW9KtfhCZEjOjWKS0lTN38L5z+Xmp0N8V/HOLNHvUXCwQ
 4++O21nu/BbVOYRVNWD9CWulyYBXYyG8zLOxQnQcFIcx8EQ2nD+I7yxj99kJHqTMr8Ud
 Gi5eoBeJ75xWNhbxkWi3xfCXnEt228P7hAhkDHVIqCndDBaGMUh2WUv0DGb+FjktrVRq
 K9/Cc/W6ypVvDz0zZPVWltzbvpXenfBMrijIpFMi+RSvi4ZoERYmao2EZL+ty2oAPnDz
 W13g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=rcfvNIwTyEf4+cCbRw1fHkpmc/NI1d0Ts6mEkXQrPMw=;
 b=SGKAPQCYXlEPTDwHTTHMmzl1fZDRHR8Pm4k2FWoCf+ef/9u/6ZtbQz5dWjeJw8Xl2e
 YGORAcquR/HegeTyz8R2yj7E5fFRVpIzEZLEXYwjAMg3QqzFuWSZ0x/xsRKFYzuxhaHn
 w97fEQg8RZZwq9nW9svmu4kPlWvaHqEA9FJSaSLcg7ML6t24xSeiyOjpWtG6f6ExMTHb
 gqZqAQvH54M7+JczVQznfrFK4Q1iQetOXC/1D31SFw7MnWhiXI4+K2C+3E57SpcB6qPj
 CY4eI7UIaPaYnQYTJf4eGwvBOfZoGmkuTTsb80sUF/naByBT2McUK26QCcdGnMdm8ehG
 Fifg==
X-Gm-Message-State: AOAM533JH+18S8gGEvKfzRIFFeoTB5LxmNqSt3A8HLtK8bk+p1XaK+Cz
 d4CGLhFp9EAGHtKmCW52aPHN6PJAxMs=
X-Google-Smtp-Source: ABdhPJyKmFQ0z+Lktdu2izscOh0VN+6W2T+738UfeB1o4nGrop16c9SgcfF0hlm51M/ZMIxClhyWiw==
X-Received: by 2002:a50:e40c:: with SMTP id d12mr3467733edm.35.1603392426371; 
 Thu, 22 Oct 2020 11:47:06 -0700 (PDT)
Received: from guixsd ([2a02:908:c71:ba60::993e])
 by smtp.gmail.com with ESMTPSA id k23sm1298588ejs.100.2020.10.22.11.47.05
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 22 Oct 2020 11:47:05 -0700 (PDT)
From: Taylan Kammer <taylan.kammer@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
References: <87v9fccuml.fsf@HIDDEN> <871ri0c4u8.fsf@HIDDEN>
 <1325d1c4-e047-76e5-2180-672fef7238b9@HIDDEN>
 <87mu0kn3wh.fsf@HIDDEN> <87blgy39q7.fsf@HIDDEN>
Date: Thu, 22 Oct 2020 20:47:04 +0200
In-Reply-To: <87blgy39q7.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Mon, 19 Oct 2020 10:23:28 +0200")
Message-ID: <87ft66umhj.fsf@HIDDEN>
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: 0.0 (/)
X-Debbugs-Envelope-To: 44000
Cc: 44000 <at> debbugs.gnu.org
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: -1.0 (-)

Ludovic Court=C3=A8s <ludo@HIDDEN> writes:

> Hi,
>
> Taylan Kammer <taylan.kammer@HIDDEN> skribis:
>
>> Could you please test whether bytestructures 1.0.8 fixes the issue?
>
> Thanks for the prompt reply!  I tested 1.0.8 and it does not fix the
> problem.
>
> I think the problem might be that the =E2=80=98cond-expand-provide=E2=80=
=99 call might
> affect a module that=E2=80=99s not the one tested in (eval '(cond-expand =
=E2=80=A6) =E2=80=A6).
>
> Does that make sense?

Yes, you're right.  I've made another release (1.0.9), where I use

  (environment '(guile) '(bytestructures guile numeric-data-model))

for the 'base-environment' binding in case we're running on Guile.

It now gives me correct results locally (woe on me for not having
properly tested the previous one) so I think it should definitely work
when cross-compiling too, since the 'eval' is sure to be executed at
run-time and not compile-time...

Fingers crossed, I hope I don't waste your time this time!

- Taylan




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at 44000) by debbugs.gnu.org; 19 Oct 2020 08:23:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 19 04:23:39 2020
Received: from localhost ([127.0.0.1]:39900 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kUQSA-0003GZ-Tl
	for submit <at> debbugs.gnu.org; Mon, 19 Oct 2020 04:23:39 -0400
Received: from eggs.gnu.org ([209.51.188.92]:54344)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kUQS9-0003GN-7Q
 for 44000 <at> debbugs.gnu.org; Mon, 19 Oct 2020 04:23:37 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:58535)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>)
 id 1kUQS3-0002EF-Um; Mon, 19 Oct 2020 04:23:31 -0400
Received: from [2001:660:6102:320:e120:2c8f:8909:cdfe] (port=58712 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>)
 id 1kUQS3-0005IE-Bs; Mon, 19 Oct 2020 04:23:31 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: Taylan Kammer <taylan.kammer@HIDDEN>
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
References: <87v9fccuml.fsf@HIDDEN> <871ri0c4u8.fsf@HIDDEN>
 <1325d1c4-e047-76e5-2180-672fef7238b9@HIDDEN>
 <87mu0kn3wh.fsf@HIDDEN>
Date: Mon, 19 Oct 2020 10:23:28 +0200
In-Reply-To: <87mu0kn3wh.fsf@HIDDEN> (Taylan Kammer's message of "Sat, 17
 Oct 2020 19:44:30 +0200")
Message-ID: <87blgy39q7.fsf@HIDDEN>
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-Debbugs-Envelope-To: 44000
Cc: 44000 <at> debbugs.gnu.org
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: -3.3 (---)

Hi,

Taylan Kammer <taylan.kammer@HIDDEN> skribis:

> Could you please test whether bytestructures 1.0.8 fixes the issue?

Thanks for the prompt reply!  I tested 1.0.8 and it does not fix the
problem.

I think the problem might be that the =E2=80=98cond-expand-provide=E2=80=99=
 call might
affect a module that=E2=80=99s not the one tested in (eval '(cond-expand =
=E2=80=A6) =E2=80=A6).

Does that make sense?

Ludo=E2=80=99.




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at 44000) by debbugs.gnu.org; 17 Oct 2020 17:44:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 17 13:44:39 2020
Received: from localhost ([127.0.0.1]:35477 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kTqFz-0001zx-4O
	for submit <at> debbugs.gnu.org; Sat, 17 Oct 2020 13:44:39 -0400
Received: from mail-ed1-f45.google.com ([209.85.208.45]:39423)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <taylan.kammer@HIDDEN>) id 1kTqFx-0001zi-El
 for 44000 <at> debbugs.gnu.org; Sat, 17 Oct 2020 13:44:37 -0400
Received: by mail-ed1-f45.google.com with SMTP id t21so5969032eds.6
 for <44000 <at> debbugs.gnu.org>; Sat, 17 Oct 2020 10:44:37 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version:content-transfer-encoding;
 bh=IN8YRFNH2dwqANw7N30bV+wa+wz1YVHk0FsIHGxXEPg=;
 b=C8/3ZXLBhGhw4c4ZBKDs/krQmzhjpaCGLCwp3xTrcYfd2fBuiHGTtvkAxKjI3Yvas6
 g+KdlJRQg4aFWE/q8oyaqYKunCu6npb3qeMYW+/yeZfFjp8EF0EKxlR4i/s0kot04IXB
 g9HCOJmEpnlDKP1mYUWdvxn3KgxbaDDp5lbDZl6TnRjS0ZxpRpiwfAIxZyerBDGmLyot
 roBdQB5KZVmFhB1EE1GdEONBADlPycQS9MB4qcsXVy8cwgs9g99fAtntN72rXfwFQ75G
 uSTJMGrrP50gZA6o79m3o3O0DhDQGt0WHEwwxwWPwyRcikDWvVVPdt5s8Qn/f8HNxLhH
 Y49g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version:content-transfer-encoding;
 bh=IN8YRFNH2dwqANw7N30bV+wa+wz1YVHk0FsIHGxXEPg=;
 b=qNHmcl+nQqkRne/1BQamsTyP2du3Vn4eZhnPtMBlfZI5sBNR2AbgZJqMRksCm8nOig
 t/fRvvWgkHZQnGhC3KlRg4Ubdyq2b0NRr0+K4kr9nh/BoRa/s1Gh3Dxia8hT6Ujg76ZD
 t7uwYEKX+w7EvBg0KCI5mqDuHenEPxbicolxLWlnXd9YaxrtfZlNBxkgI+rYLEd+OQz7
 KyXvHPbz0JcUbiEEN2J1xSqiyneGeMZP326HhAtJ95MvktWaoeuhvNQrfInHX9Pl5IyS
 RkuaJQZTsOc030qTX34QhznVRKVD77e45nRGLrYpJyIz7Sa1f0EJzAe6ygnfcpDxAZ19
 1P9Q==
X-Gm-Message-State: AOAM531WvXBUcjUUzs6htYpZuZiNHY4qQD4DyIKTdU4BK/w/JKJ3+ICD
 IC7jbT955Yc9ecaTfj2IgDM3LQmX91A=
X-Google-Smtp-Source: ABdhPJw14PZodQ7vewy+6T9t6d+EbgIOaxUxx+fzJXpWmuD0+/reN48F1pKOautvzabvChveNW7lwg==
X-Received: by 2002:a05:6402:392:: with SMTP id
 o18mr10365560edv.283.1602956671365; 
 Sat, 17 Oct 2020 10:44:31 -0700 (PDT)
Received: from guixsd ([2a02:908:c71:ba60::5de7])
 by smtp.gmail.com with ESMTPSA id h17sm5751629ejf.98.2020.10.17.10.44.30
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Sat, 17 Oct 2020 10:44:30 -0700 (PDT)
From: Taylan Kammer <taylan.kammer@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
References: <87v9fccuml.fsf@HIDDEN> <871ri0c4u8.fsf@HIDDEN>
 <1325d1c4-e047-76e5-2180-672fef7238b9@HIDDEN>
Date: Sat, 17 Oct 2020 19:44:30 +0200
In-Reply-To: <1325d1c4-e047-76e5-2180-672fef7238b9@HIDDEN> (Taylan Kammer's
 message of "Fri, 16 Oct 2020 17:58:11 +0200")
Message-ID: <87mu0kn3wh.fsf@HIDDEN>
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: 0.0 (/)
X-Debbugs-Envelope-To: 44000
Cc: 44000 <at> debbugs.gnu.org
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: -1.0 (-)

Taylan Kammer <taylan.kammer@HIDDEN> writes:

> On 15.10.2020 09:42, Ludovic Court=C3=A8s wrote:
>> Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:
>>=20
>>> The problem is that the =E2=80=98cond-expand=E2=80=99 used to define =
=E2=80=98arch32bit?=E2=80=99 is a
>>> expansion-time thing when (cross-)building Bytestructures itself, so
>>> it=E2=80=99s incorrect from cross-building from 64-bit to 32-bit.
>>>
>>> I believe that changing it to:
>>>
>>>   (define arch32bit? (memq data-model '(ilp32 lp32)))
>>>
>>> would fix it because then the test would happen at run time.
>>=20
>> I confirm that the attached patch for Bytestructures solves the problem
>> (running =E2=80=98guix pull=E2=80=99 in my childhurd :-)).
>>=20
>> Let=E2=80=99s see whether it needs to be adapted for inclusion upstream.
>
> Hi Ludo,
>
> Thanks for finding finding this bug and for the patch.
>
> I'll try to include a portable version of the fix ASAP.  I should have
> time for it tomorrow.

Hi again,

Could you please test whether bytestructures 1.0.8 fixes the issue?

Thank you!


- Taylan




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at 44000) by debbugs.gnu.org; 16 Oct 2020 15:58:21 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Oct 16 11:58:21 2020
Received: from localhost ([127.0.0.1]:60640 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kTS7Y-0003NB-Oz
	for submit <at> debbugs.gnu.org; Fri, 16 Oct 2020 11:58:20 -0400
Received: from mail-ed1-f43.google.com ([209.85.208.43]:41356)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <taylan.kammer@HIDDEN>) id 1kTS7X-0003Mx-G3
 for 44000 <at> debbugs.gnu.org; Fri, 16 Oct 2020 11:58:19 -0400
Received: by mail-ed1-f43.google.com with SMTP id l24so2964841edj.8
 for <44000 <at> debbugs.gnu.org>; Fri, 16 Oct 2020 08:58:19 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=subject:to:references:from:message-id:date:user-agent:mime-version
 :in-reply-to:content-language:content-transfer-encoding;
 bh=Q6z0uGm9neZHrv0y/iofyxEVDJ95xz1c5oDatrONhNg=;
 b=cuzjiK8w8G2C84tkMqn8HCKtxRG7y4O59fsGDwmVavrCpb0mzx9AgtxK6MTdW8W7x6
 oB7L35uxGP8saAAwotOFtgnjEGR17EsFBBjooqX2Buvh3c2sw+6548uns4xgSKBtiNN/
 dn0cDOr3eHgriY81GHQF8/6cuzduKJHtUbzRp2ju2vKO18e+0RvFAOeM8oPp/qLw8frl
 HGokIiTNrsnmMxKIHcES5ctjzSrjzGO3DO7BYpwqwGkcAaNPIHAUiQclBnxE1Z/KixB0
 YZViW0RLf0+2M3/KOwkEGDHw3SrZnWUqvwKMS5ByYLpvvpAp28WedXjLrxkOh5w0xAE+
 SSBg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:subject:to:references:from:message-id:date
 :user-agent:mime-version:in-reply-to:content-language
 :content-transfer-encoding;
 bh=Q6z0uGm9neZHrv0y/iofyxEVDJ95xz1c5oDatrONhNg=;
 b=RQ7uMUCfQlMpdctRpnhVelytK1gzYS7ISdOEom1TUKVh+V50Ew3lKS6BXogT/i+lsO
 /r8TClNgp3recNtwvWmbWjLDhSWk41OZ2gf6kwblUEniQU0PzA/9J/uVgewR6pntOL+H
 6x6bRiKgSc3c7ZyAR2qb3kdqQFSB45BH6KxHav/PFG9h/GJYXxKZXVbXU+lOykrhagZx
 u/EZCP9hZCsnUnebnVL1QU0gy62ruq9CPkJJHv0v+lT6cRhqpb+L6bTn96FUg8ihuuNx
 Z4jjuiue4JdFlV6FW4sV4S7hzk9QaJ88op+purGT2JhHTDQ52i8Tl6DsVEVhrG6aK7/S
 XmRg==
X-Gm-Message-State: AOAM5332E6rzv0Rna/itnfxPryFluatFnz0MQdNP08g9cf2y7qJWY2YT
 gr1JfHba7CZPZpFxqrRkr9gtDiIBh5E=
X-Google-Smtp-Source: ABdhPJw/UJspAfAaQIc0sMb2O5TDZ+OwckdYczSdXkefcyW4TmfLiK2v0trhE2WjZB5fbLOAlVaT7w==
X-Received: by 2002:a05:6402:1c04:: with SMTP id
 ck4mr4907642edb.274.1602863893083; 
 Fri, 16 Oct 2020 08:58:13 -0700 (PDT)
Received: from [192.168.16.145] (mail2.compnetgmbh.de. [37.24.177.210])
 by smtp.gmail.com with ESMTPSA id i18sm1972603ejr.59.2020.10.16.08.58.12
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Fri, 16 Oct 2020 08:58:12 -0700 (PDT)
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
To: =?UTF-8?Q?Ludovic_Court=c3=a8s?= <ludo@HIDDEN>, 44000 <at> debbugs.gnu.org
References: <87v9fccuml.fsf@HIDDEN> <871ri0c4u8.fsf@HIDDEN>
From: Taylan Kammer <taylan.kammer@HIDDEN>
Message-ID: <1325d1c4-e047-76e5-2180-672fef7238b9@HIDDEN>
Date: Fri, 16 Oct 2020 17:58:11 +0200
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101
 Thunderbird/68.12.1
MIME-Version: 1.0
In-Reply-To: <871ri0c4u8.fsf@HIDDEN>
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.3 (/)
X-Debbugs-Envelope-To: 44000
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: -1.3 (-)

On 15.10.2020 09:42, Ludovic Courtès wrote:
> Ludovic Courtès <ludo@HIDDEN> skribis:
> 
>> The problem is that the ‘cond-expand’ used to define ‘arch32bit?’ is a
>> expansion-time thing when (cross-)building Bytestructures itself, so
>> it’s incorrect from cross-building from 64-bit to 32-bit.
>>
>> I believe that changing it to:
>>
>>   (define arch32bit? (memq data-model '(ilp32 lp32)))
>>
>> would fix it because then the test would happen at run time.
> 
> I confirm that the attached patch for Bytestructures solves the problem
> (running ‘guix pull’ in my childhurd :-)).
> 
> Let’s see whether it needs to be adapted for inclusion upstream.

Hi Ludo,

Thanks for finding finding this bug and for the patch.

I'll try to include a portable version of the fix ASAP.  I should have
time for it tomorrow.

> 
> Ludo’.
> 


- Taylan




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at 44000) by debbugs.gnu.org; 15 Oct 2020 10:06:36 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 15 06:06:36 2020
Received: from localhost ([127.0.0.1]:54393 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kT09c-0006vF-5C
	for submit <at> debbugs.gnu.org; Thu, 15 Oct 2020 06:06:36 -0400
Received: from eggs.gnu.org ([209.51.188.92]:44856)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <janneke@HIDDEN>) id 1kT09a-0006v3-AP
 for 44000 <at> debbugs.gnu.org; Thu, 15 Oct 2020 06:06:34 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:47457)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <janneke@HIDDEN>)
 id 1kT09U-0004t7-80; Thu, 15 Oct 2020 06:06:28 -0400
Received: from [2001:980:1b4f:1:42d2:832d:bb59:862] (port=40146
 helo=dundal.janneke.lilypond.org)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <janneke@HIDDEN>)
 id 1kT09T-00017M-Jn; Thu, 15 Oct 2020 06:06:28 -0400
From: Jan Nieuwenhuizen <janneke@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
Organization: AvatarAcademy.nl
References: <87v9fccuml.fsf@HIDDEN> <871ri0c4u8.fsf@HIDDEN>
X-Url: http://AvatarAcademy.nl
Date: Thu, 15 Oct 2020 12:06:24 +0200
In-Reply-To: <871ri0c4u8.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Thu, 15 Oct 2020 09:42:55 +0200")
Message-ID: <87imbbls67.fsf@HIDDEN>
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-Debbugs-Envelope-To: 44000
Cc: 44000 <at> debbugs.gnu.org
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: -3.3 (---)

Ludovic Court=C3=A8s writes:

Hi,

> Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:
>
>> The problem is that the =E2=80=98cond-expand=E2=80=99 used to define =E2=
=80=98arch32bit?=E2=80=99 is a
>> expansion-time thing when (cross-)building Bytestructures itself, so
>> it=E2=80=99s incorrect from cross-building from 64-bit to 32-bit.
>>
>> I believe that changing it to:
>>
>>   (define arch32bit? (memq data-model '(ilp32 lp32)))
>>
>> would fix it because then the test would happen at run time.
>
> I confirm that the attached patch for Bytestructures solves the problem
> (running =E2=80=98guix pull=E2=80=99 in my childhurd :-)).

Wow, beautiful!

> Let=E2=80=99s see whether it needs to be adapted for inclusion upstream.

Yes, sure.

Greetings,
Janneke

--=20
Jan Nieuwenhuizen <janneke@HIDDEN> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar=C2=AE http://AvatarAcademy.com




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at 44000) by debbugs.gnu.org; 15 Oct 2020 08:48:49 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 15 04:48:49 2020
Received: from localhost ([127.0.0.1]:54224 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kSywK-0004zm-TM
	for submit <at> debbugs.gnu.org; Thu, 15 Oct 2020 04:48:49 -0400
Received: from eggs.gnu.org ([209.51.188.92]:46950)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <othacehe@HIDDEN>) id 1kSywJ-0004za-B0
 for 44000 <at> debbugs.gnu.org; Thu, 15 Oct 2020 04:48:48 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46605)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <othacehe@HIDDEN>)
 id 1kSywD-0001dm-Mw; Thu, 15 Oct 2020 04:48:41 -0400
Received: from [2a01:cb18:832e:5f00:1013:8f9a:f686:d929] (port=44032
 helo=cervin)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <othacehe@HIDDEN>)
 id 1kSywD-0002k4-AC; Thu, 15 Oct 2020 04:48:41 -0400
From: Mathieu Othacehe <othacehe@HIDDEN>
To: Ludovic =?utf-8?Q?Court=C3=A8s?= <ludo@HIDDEN>
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
References: <87v9fccuml.fsf@HIDDEN> <871ri0c4u8.fsf@HIDDEN>
Date: Thu, 15 Oct 2020 10:48:39 +0200
In-Reply-To: <871ri0c4u8.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Thu, 15 Oct 2020 09:42:55 +0200")
Message-ID: <87a6wnq3h4.fsf@HIDDEN>
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-Debbugs-Envelope-To: 44000
Cc: 44000 <at> debbugs.gnu.org
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: -3.3 (---)


Hey Ludo,

> I confirm that the attached patch for Bytestructures solves the problem
> (running =E2=80=98guix pull=E2=80=99 in my childhurd :-)).

Nice catch! I guess we had the same issue when cross-compiling for armhf
from x86_64.

Thanks,

Mathieu




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at 44000) by debbugs.gnu.org; 15 Oct 2020 08:09:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 15 04:09:52 2020
Received: from localhost ([127.0.0.1]:54162 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kSyKe-0001qQ-J2
	for submit <at> debbugs.gnu.org; Thu, 15 Oct 2020 04:09:52 -0400
Received: from eggs.gnu.org ([209.51.188.92]:38808)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kSyKc-0001qB-5H
 for 44000 <at> debbugs.gnu.org; Thu, 15 Oct 2020 04:09:51 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:46101)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1kSyKW-00052k-Vo
 for 44000 <at> debbugs.gnu.org; Thu, 15 Oct 2020 04:09:44 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=52882 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1kSyKW-0005QU-Jf
 for 44000 <at> debbugs.gnu.org; Thu, 15 Oct 2020 04:09:44 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 44000 <at> debbugs.gnu.org
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
References: <87v9fccuml.fsf@HIDDEN> <871ri0c4u8.fsf@HIDDEN>
Date: Thu, 15 Oct 2020 10:09:42 +0200
In-Reply-To: <871ri0c4u8.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?=
 =?utf-8?Q?s?= message of "Thu, 15 Oct 2020 09:42:55 +0200")
Message-ID: <87lfg7c3ll.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 44000
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: -3.3 (---)

Reported here:
<https://github.com/TaylanUB/scheme-bytestructures/issues/40>.




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at 44000) by debbugs.gnu.org; 15 Oct 2020 07:43:06 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Oct 15 03:43:06 2020
Received: from localhost ([127.0.0.1]:54063 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kSxuk-0005Jq-B5
	for submit <at> debbugs.gnu.org; Thu, 15 Oct 2020 03:43:06 -0400
Received: from eggs.gnu.org ([209.51.188.92]:33122)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kSxuj-0005JL-9N
 for 44000 <at> debbugs.gnu.org; Thu, 15 Oct 2020 03:43:05 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:45786)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1kSxud-000587-Vq
 for 44000 <at> debbugs.gnu.org; Thu, 15 Oct 2020 03:42:59 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=51800 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1kSxud-0000Id-93
 for 44000 <at> debbugs.gnu.org; Thu, 15 Oct 2020 03:42:59 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: 44000 <at> debbugs.gnu.org
Subject: Re: bug#44000: Guile-Git cross-compiled to i586-pc-gnu gets
 bytestructures wrong
References: <87v9fccuml.fsf@HIDDEN>
Date: Thu, 15 Oct 2020 09:42:55 +0200
In-Reply-To: <87v9fccuml.fsf@HIDDEN> ("Ludovic =?utf-8?Q?Court=C3=A8s=22?=
 =?utf-8?Q?'s?= message of "Thu, 15 Oct 2020 00:25:54 +0200")
Message-ID: <871ri0c4u8.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 44000
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: -3.3 (---)

--=-=-=
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

Ludovic Court=C3=A8s <ludo@HIDDEN> skribis:

> The problem is that the =E2=80=98cond-expand=E2=80=99 used to define =E2=
=80=98arch32bit?=E2=80=99 is a
> expansion-time thing when (cross-)building Bytestructures itself, so
> it=E2=80=99s incorrect from cross-building from 64-bit to 32-bit.
>
> I believe that changing it to:
>
>   (define arch32bit? (memq data-model '(ilp32 lp32)))
>
> would fix it because then the test would happen at run time.

I confirm that the attached patch for Bytestructures solves the problem
(running =E2=80=98guix pull=E2=80=99 in my childhurd :-)).

Let=E2=80=99s see whether it needs to be adapted for inclusion upstream.

Ludo=E2=80=99.


--=-=-=
Content-Type: text/x-patch
Content-Disposition: inline;
 filename=0001-Correctly-define-intptr_t-co.-when-cross-compiling.patch

From a44d04ed3f7031b4ab95b2f0da81c7ab020304d1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= <ludo@HIDDEN>
Date: Thu, 15 Oct 2020 08:47:06 +0200
Subject: [PATCH] Correctly define 'intptr_t' & co. when cross-compiling.

Fixes <https://issues.guix.gnu.org/44000>.

* bytestructures/guile/numeric-data-model.scm (data-model): Export.
* bytestructures/body/numeric.scm (arch32bit?): Check the value of
DATA-MODEL rather than use 'cond-expand'.
---
 bytestructures/body/numeric.scm             | 8 ++++----
 bytestructures/guile/numeric-data-model.scm | 3 ++-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/bytestructures/body/numeric.scm b/bytestructures/body/numeric.scm
index 842575d..e23cc24 100644
--- a/bytestructures/body/numeric.scm
+++ b/bytestructures/body/numeric.scm
@@ -282,10 +282,10 @@
 (define long-long int64)
 (define unsigned-long-long uint64)
 
-(define arch32bit? (cond-expand
-                    (lp32  #t)
-                    (ilp32 #t)
-                    (else  #f)))
+(define arch32bit? (case data-model
+                    ((lp32)  #t)
+                    ((ilp32) #t)
+                    (else    #f)))
 
 (define intptr_t (if arch32bit?
                      int32
diff --git a/bytestructures/guile/numeric-data-model.scm b/bytestructures/guile/numeric-data-model.scm
index 773b6cd..bd40c69 100644
--- a/bytestructures/guile/numeric-data-model.scm
+++ b/bytestructures/guile/numeric-data-model.scm
@@ -1,4 +1,5 @@
-(define-module (bytestructures guile numeric-data-model))
+(define-module (bytestructures guile numeric-data-model)
+  #:export (data-model))
 
 (import (system foreign))
 (import (system base target))
-- 
2.28.0


--=-=-=--




Information forwarded to bug-guix@HIDDEN:
bug#44000; Package guix. Full text available.

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


Received: (at submit) by debbugs.gnu.org; 14 Oct 2020 22:26:08 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Oct 14 18:26:08 2020
Received: from localhost ([127.0.0.1]:53375 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kSpDk-0006RY-8C
	for submit <at> debbugs.gnu.org; Wed, 14 Oct 2020 18:26:08 -0400
Received: from lists.gnu.org ([209.51.188.17]:45824)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <ludo@HIDDEN>) id 1kSpDg-0006RP-V1
 for submit <at> debbugs.gnu.org; Wed, 14 Oct 2020 18:26:06 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:50106)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ludo@HIDDEN>) id 1kSpDe-00033T-7w
 for bug-guix@HIDDEN; Wed, 14 Oct 2020 18:26:02 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:37712)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <ludo@HIDDEN>) id 1kSpDc-00086e-6b
 for bug-guix@HIDDEN; Wed, 14 Oct 2020 18:26:01 -0400
Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49766 helo=ribbon)
 by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256)
 (Exim 4.82) (envelope-from <ludo@HIDDEN>) id 1kSpDY-00012I-E9
 for bug-guix@HIDDEN; Wed, 14 Oct 2020 18:25:59 -0400
From: =?utf-8?Q?Ludovic_Court=C3=A8s?= <ludo@HIDDEN>
To: <bug-guix@HIDDEN>
Subject: Guile-Git cross-compiled to i586-pc-gnu gets bytestructures wrong
X-URL: http://www.fdn.fr/~lcourtes/
X-Revolutionary-Date: 23 =?utf-8?Q?Vend=C3=A9miaire?= an 229 de la
 =?utf-8?Q?R=C3=A9volution?=
X-PGP-Key-ID: 0x090B11993D9AEBB5
X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc
X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4  0CFB 090B 1199 3D9A EBB5
X-OS: x86_64-pc-linux-gnu
Date: Thu, 15 Oct 2020 00:25:54 +0200
Message-ID: <87v9fccuml.fsf@HIDDEN>
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-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: -3.3 (---)

Hello!

You might have seen that =E2=80=98guix pull=E2=80=99 doesn=E2=80=99t work i=
n your childhurd:

--8<---------------cut here---------------start------------->8---
Updating channel 'guix' from Git repository at 'https://git.savannah.gnu.or=
g/git/guix.git'...
guix pull: error: Git error: invalid version 0 on git_proxy_options
--8<---------------cut here---------------end--------------->8---

This is due to an ABI breakage whereby the Guile-Git code
(cross-compiled from x86_64-linux) fills in the =E2=80=98fetch_opts=E2=80=
=99 member of
=E2=80=98git_clone=C2=A0options=E2=80=99 offset by one word.

On closer inspection, the problem is:

--8<---------------cut here---------------start------------->8---
scheme@(git structs)> (bytestructure-descriptor-size (bs:struct `(("x" ,(bs=
:pointer uint8)) ("y" ,size_t))))
$20 =3D 12
scheme@(git structs)> %host-type
$21 =3D "i586-pc-gnu"
--8<---------------cut here---------------end--------------->8---

Compare with the correct answer:

--8<---------------cut here---------------start------------->8---
$ guix environment --ad-hoc -C -s i686-linux guile guile-bytestructures  --=
 guile

[...]

scheme@(guile-user)> ,use(bytestructures guile)
scheme@(guile-user)> %host-type
$1 =3D "i686-unknown-linux-gnu"
scheme@(guile-user)> (bytestructure-descriptor-size (bs:struct `(("x" ,(bs:=
pointer uint8))("y" ,size_t))))
$2 =3D 8
--8<---------------cut here---------------end--------------->8---

More specifically, the size of =E2=80=98size_t=E2=80=99 is wrong, but point=
er size is
right:

--8<---------------cut here---------------start------------->8---
scheme@(git structs)>  (bytestructure-descriptor-size size_t)
$27 =3D 8
scheme@(git structs)>  (bytestructure-descriptor-size uintptr_t )
$28 =3D 8
scheme@(git structs)>  (bytestructure-descriptor-size (bs:pointer uint8))
$29 =3D 4
--8<---------------cut here---------------end--------------->8---

=E2=80=98numeric.scm=E2=80=99 in bytestructures reads:

--8<---------------cut here---------------start------------->8---
(define arch32bit? (cond-expand
                    (lp32  #t)
                    (ilp32 #t)
                    (else  #f)))

;; =E2=80=A6

(define uintptr_t (if arch32bit?
                      uint32
                      uint64))

(define size_t uintptr_t)
--8<---------------cut here---------------end--------------->8---

But (bytestructures guile numeric-data-model) has this:

--8<---------------cut here---------------start------------->8---
(define data-model
  (if (=3D 4 (sizeof '*))
      (if (=3D 2 (sizeof int))
          'lp32
          'ilp32)
      (cond
       ((=3D 8 (sizeof int))  'ilp64)
       ((=3D 4 (sizeof long)) 'llp64)
       (else                'lp64))))

(cond-expand-provide
 (current-module)
 (list architecture data-model))
--8<---------------cut here---------------end--------------->8---

The problem is that the =E2=80=98cond-expand=E2=80=99 used to define =E2=80=
=98arch32bit?=E2=80=99 is a
expansion-time thing when (cross-)building Bytestructures itself, so
it=E2=80=99s incorrect from cross-building from 64-bit to 32-bit.

I believe that changing it to:

  (define arch32bit? (memq data-model '(ilp32 lp32)))

would fix it because then the test would happen at run time.

(Note that Guile-Git uses only the procedural layer of Bytestructures.
The syntactic layer is likely not cross-compilation-capable for similar
reasons.)

To be continued=E2=80=A6

Thanks,
Ludo=E2=80=99.




Acknowledgement sent to Ludovic Courtès <ludo@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-guix@HIDDEN. Full text available.
Report forwarded to bug-guix@HIDDEN:
bug#44000; 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: Mon, 16 Nov 2020 22:15:02 UTC

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