unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan <stefan-guix@vodafonemail.de>
To: 45716@debbugs.gnu.org, Danny Milosavljevic <dannym@scratchpost.org>
Subject: bug#45716: Bug in ‘network-interface-names’ when building guix for aarch64 on x86_64.
Date: Thu, 7 Jan 2021 23:17:51 +0100	[thread overview]
Message-ID: <5A46F4E0-9823-4614-A7BC-865F9D7C0FB7@vodafonemail.de> (raw)
In-Reply-To: <19CC6F6C-98CA-4218-A9E7-FE7AC751E924@vodafonemail.de>

Hi!

This change makes the reproducer working and prints some more values:

diff --git a/guix/build/syscalls.scm b/guix/build/syscalls.scm
index 85c1c45f81..250c577d33 100644
--- a/guix/build/syscalls.scm
+++ b/guix/build/syscalls.scm
@@ -1473,7 +1473,19 @@ most LEN bytes from BV."
        (()
         (reverse result))
        (_
-       (loop (drop bytes stride)
+       (display "bytes: ")
+       (display (length bytes))
+       (newline)
+       (display "stride: ")
+       (display stride)
+       (newline)
+       (display "ifreq-struct-size: ")
+       (display ifreq-struct-size)
+       (newline)
+       (display "sizeof '*: ")
+       (display (sizeof '*))
+       (newline)
+       (loop (drop bytes (min stride (length bytes)))
              (cons (bytes->string bytes) result))))))
 
  (define* (network-interface-names #:optional sock)


So indeed, the number of bytes is only 32, if build with ‘./pre-inst-env guix build --system=aarch64-linux -f ~/test.scm’:

bytes: 32
stride: 40
sizeof '*: 8

If this is instead build with just ‘./pre-inst-env guix build -f ~/test.scm’, the output is as expected:

bytes: 40
stride: 40
sizeof '*: 8
 
I have however no clue, why the number of bytes is only 32 in case of aarch64. This value is taken from the struct ifconf read via ioctl(SIOCGIFCONF).

Danny, does that maybe ring a bell?

To be precise this is all running in a virtual machine with virtio-net-pci. Both kernel and qemu on the host are rather old. However, building for x86_64 works just fine, so I think the host setup is unrelated.


Bye

Stefan



  reply	other threads:[~2021-01-07 22:19 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-07 15:37 bug#45716: Bug in ‘network-interface-names’ when building guix for aarch64 on x86_64 Stefan
2021-01-07 22:17 ` Stefan [this message]
2021-01-08  3:04   ` Danny Milosavljevic
2021-01-08 13:33     ` Stefan
2021-01-08 16:47     ` Stefan
2021-01-08 23:28       ` Stefan
2021-01-09 18:01         ` bug#45716: gnu: qemu: Fix ioclt(…, SIOCGIFCONF, …) for emulated 64 bit architectures Stefan
2021-01-11 13:28           ` Ludovic Courtès
2021-01-11 20:32             ` bug#45716: [PATCH 1/1] " Stefan
2021-01-14 13:39               ` Ludovic Courtès
2021-01-23 15:27                 ` bug#45716: Bug in ‘network-interface-names’ when building guix for aarch64 on x86_64 Stefan
2021-01-23 20:13                   ` Leo Famulari
2021-02-01 20:58                     ` Ludovic Courtès
2021-02-02  8:09                       ` Mathieu Othacehe
2021-02-06 12:59                         ` Stefan
2021-02-07 18:15                           ` Mathieu Othacehe
2021-02-08  7:44                             ` Stefan
2021-01-11 13:30     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5A46F4E0-9823-4614-A7BC-865F9D7C0FB7@vodafonemail.de \
    --to=stefan-guix@vodafonemail.de \
    --cc=45716@debbugs.gnu.org \
    --cc=dannym@scratchpost.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).