bug-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#45716: Bug in ‘network-interface-names’ when building guix for aarch


From: Stefan
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

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 via email to

[Prev in Thread] Current Thread [Next in Thread]