From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ODSuMEEr9198QAAA0tVLHw (envelope-from ) for ; Thu, 07 Jan 2021 15:39:45 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 6OKyLEEr919tHwAAB5/wlQ (envelope-from ) for ; Thu, 07 Jan 2021 15:39:45 +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 EA5469403C8 for ; Thu, 7 Jan 2021 15:39:44 +0000 (UTC) Received: from localhost ([::1]:51072 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kxXO3-00025R-Fr for larch@yhetil.org; Thu, 07 Jan 2021 10:39:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46992) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxXNQ-00021q-Vb for bug-guix@gnu.org; Thu, 07 Jan 2021 10:39:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:36796) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kxXNN-0006sh-Sg for bug-guix@gnu.org; Thu, 07 Jan 2021 10:39:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kxXNN-0008FH-QZ for bug-guix@gnu.org; Thu, 07 Jan 2021 10:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: bug#45716: Bug in =?UTF-8?Q?=E2=80=98network-interface-names=E2=80=99?= when building guix for aarch64 on x86_64. Resent-From: Stefan Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Thu, 07 Jan 2021 15:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 45716 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 45716@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.161003388831629 (code B ref -1); Thu, 07 Jan 2021 15:39:01 +0000 Received: (at submit) by debbugs.gnu.org; 7 Jan 2021 15:38:08 +0000 Received: from localhost ([127.0.0.1]:48342 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxXMW-0008E5-HU for submit@debbugs.gnu.org; Thu, 07 Jan 2021 10:38:08 -0500 Received: from lists.gnu.org ([209.51.188.17]:44688) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kxXMU-0008Dy-UB for submit@debbugs.gnu.org; Thu, 07 Jan 2021 10:38:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46634) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxXMU-0001ni-Ef for bug-guix@gnu.org; Thu, 07 Jan 2021 10:38:06 -0500 Received: from smtpout2.vodafonemail.de ([145.253.239.133]:32988) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kxXMR-0006ZD-EM for bug-guix@gnu.org; Thu, 07 Jan 2021 10:38:06 -0500 Received: from smtp.vodafone.de (unknown [10.2.0.33]) by smtpout2.vodafonemail.de (Postfix) with ESMTP id 1BC9F1237CF for ; Thu, 7 Jan 2021 16:37:57 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vodafonemail.de; s=vfde-smtpout-mb-15sep; t=1610033877; bh=k9FRlVM8I7eUw7SD4N6LeUOWVes/vw/UhVXSCaGDdmQ=; h=From:Subject:Date:To; b=JyXBZVQyPoLkMmGBtOxqOM6hQhzxhd3v3+3ZOz4YG39idURBEribRF4ItIme9RpP1 HnLPwgLQIiNQKTF4Nl0+f4NpeGPAJZhyg140H1ZGmBpEa810S/0R3bLeA7gwZJ7/zf CzB0urigpEufOB9c5FfbXDtqQ46gJ5q9O1km8TvU= Received: from macbook-pro.kuh-wiese.my-router.de (dslb-002-206-141-230.002.206.pools.vodafone-ip.de [2.206.141.230]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.vodafone.de (Postfix) with ESMTPSA id D2FAD1420F8 for ; Thu, 7 Jan 2021 15:37:56 +0000 (UTC) From: Stefan Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: <19CC6F6C-98CA-4218-A9E7-FE7AC751E924@vodafonemail.de> Date: Thu, 7 Jan 2021 16:37:56 +0100 Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) X-Mailer: Apple Mail (2.3124) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 4918 X-purgate-ID: 155817::1610033876-00005EB2-F1200950/0/0 Received-SPF: pass client-ip=145.253.239.133; envelope-from=stefan-guix@vodafonemail.de; helo=smtpout2.vodafonemail.de X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -0.85 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=vodafonemail.de header.s=vfde-smtpout-mb-15sep header.b=JyXBZVQy; dmarc=none; 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-Migadu-Queue-Id: EA5469403C8 X-Spam-Score: -0.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: xZ58F8tUJ6qm Hi! When building for aarch64 on a x86=E2=80=A664 system, then the = =E2=80=98network-interface-names=E2=80=99 function produces an error. Because of this building guix for aarch64 fails during the test with = this: test-name: network-interface-names location: = /tmp/guix-build-guix-1.2.0-8.7624ebb.drv-0/source/tests/syscalls.scm:387 source: + (test-assert + "network-interface-names" + (match (remove + (lambda (interface) + (string-contains interface ":")) + (network-interface-names)) + (((? string? names) ..1) + (lset<=3D + string=3D? + names + (all-network-interface-names))))) actual-value: #f actual-error: + (wrong-type-arg + "list-tail" + "Wrong type argument in position ~A (expecting ~A): ~S" + (1 "pair" ()) + (())) result: FAIL I created a little reproducer for this problem: stefan@guix ~$ cat test.scm=20 (use-modules (guix gexp) (gnu packages admin)) (with-imported-modules '((guix build syscalls) (guix build utils)) (computed-file "insterface-names" #~(begin (use-modules (guix build syscalls) (guix build utils) (ice-9 popen) (ice-9 rdelim)) (mkdir-p #$output) (chdir #$output) (with-output-to-file "interface-names" (lambda () (display (string-join (all-network-interface-names) ", ")) (newline) (let* ((port (open-input-pipe #$(file-append inetutils = "/bin/ifconfig")))) (display (string-join=20 (let loop ((output '())) (let ((line (read-line port))) (if (eof-object? line) (reverse output) (loop (cons line output))))) "\n")) (close-pipe port)) (display (string-join (network-interface-names) ", ")) (newline)))))) stefan@guix ~$ guix build --system=3Daarch64-linux -f test.scm=20 Folgende Ableitung wird erstellt: /gnu/store/l7sypckaywl3djrhagywwzsb2c3984wf-insterface-names.drv /gnu/store/l7sypckaywl3djrhagywwzsb2c3984wf-insterface-names.drv wird = erstellt =E2=80=A6 Backtrace: 7 (primitive-load "/gnu/store/a37szh4h151v66xyl874qfcbm6x?") In ice-9/ports.scm: 463:17 6 (call-with-output-file _ _ #:binary _ #:encoding _) 474:4 5 (_ _) In ice-9/eval.scm: 619:8 4 (_ #(#(#))) 155:9 3 (_ #(#(#))) 159:9 2 (_ #(#(#))) In guix/build/syscalls.scm: 1476:13 1 (bytevector->string-list _ 40 _) In unknown file: 0 (list-tail (108 111 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 ?) ?) ERROR: In procedure list-tail: In procedure list-tail: Wrong type argument in position 1 (expecting = pair): () builder for = `/gnu/store/l7sypckaywl3djrhagywwzsb2c3984wf-insterface-names.drv' = failed with exit code 1 Erstellung von = /gnu/store/l7sypckaywl3djrhagywwzsb2c3984wf-insterface-names.drv = fehlgeschlagen Das Erstellungsprotokoll kann unter = =E2=80=9E/var/log/guix/drvs/l7/sypckaywl3djrhagywwzsb2c3984wf-insterface-n= ames.drv.bz2=E2=80=9C eingesehen werden. guix build: error: build of = `/gnu/store/l7sypckaywl3djrhagywwzsb2c3984wf-insterface-names.drv' = failed When the line containing "(display (string-join = (network-interface-names) ", "))" is removed, the output looks as = follows: stefan@guix ~$ cat = /gnu/store/q7m7dxp4pn7jrw4f6hkwfsiga5zj43x1-insterface-names/interface-nam= es=20 lo lo Link encap:Local Loopback inet addr:127.0.0.1 Bcast:0.0.0.0 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 TX bytes:0 I think the problem happens in guix/build/syscalls.scm in = =E2=80=98bytevector->string-list=E2=80=99, which is used by = =E2=80=98network-interface-name=E2=80=99, certainly in (drop bytes = stride) more bytes than available should be dropped, probably because = stride is bigger than len: (define (bytevector->string-list bv stride len) "Return the null-terminated strings found in BV every STRIDE bytes. = Read at most LEN bytes from BV." (let loop ((bytes (take (bytevector->u8-list bv) (min len (bytevector-length bv)))) (result '())) (match bytes (() (reverse result)) (_ =3D> (loop (drop bytes stride) (cons (bytes->string bytes) result)))))) Bye Stefan=