From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 1uQJIu65OmFHOQAAgWs5BA (envelope-from ) for ; Fri, 10 Sep 2021 03:50:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id gGzxHO65OmFGVQAAB5/wlQ (envelope-from ) for ; Fri, 10 Sep 2021 01:50:38 +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 883731D2E6 for ; Fri, 10 Sep 2021 03:50:37 +0200 (CEST) Received: from localhost ([::1]:59454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mOVgZ-0000iP-Rx for larch@yhetil.org; Thu, 09 Sep 2021 21:50:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38552) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mOVg2-0000gS-8r for bug-guix@gnu.org; Thu, 09 Sep 2021 21:50:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53211) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mOVg2-0005j8-1I for bug-guix@gnu.org; Thu, 09 Sep 2021 21:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mOVg1-0002h1-UP for bug-guix@gnu.org; Thu, 09 Sep 2021 21:50:01 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#49921: go-1.16 build failing on aarch64: "fatal error: runtime.newosproc" Resent-From: Sarah Morgensen Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 10 Sep 2021 01:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49921 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 49921@debbugs.gnu.org Received: via spool by 49921-submit@debbugs.gnu.org id=B49921.163123855110288 (code B ref 49921); Fri, 10 Sep 2021 01:50:01 +0000 Received: (at 49921) by debbugs.gnu.org; 10 Sep 2021 01:49:11 +0000 Received: from localhost ([127.0.0.1]:36524 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOVfD-0002fs-9K for submit@debbugs.gnu.org; Thu, 09 Sep 2021 21:49:11 -0400 Received: from out0.migadu.com ([94.23.1.103]:26815) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mOVfB-0002fj-7C for 49921@debbugs.gnu.org; Thu, 09 Sep 2021 21:49:10 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mgsn.dev; s=key1; t=1631238547; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=DM9JWXJxdBKvMUrzyT4A8u651/i71jhFzc00eYcRxcU=; b=f3Fx91jGbXjFvxc/9NvCQVZUFM8w+csYFvT2iXYMFUrNfo2Ox9fSt+JL23no/RgYnR3FB9 eQA1tOsZtOfNslOsvRvlU0U8sY6ceovEtyirHtMpaCaCVf1iQFs5FfkK+u403oMH+MWjXM DxF8i3qmh+isERZoGQIJ6q+4UxuW77g= From: Sarah Morgensen References: <861r75j164.fsf@mgsn.dev> <86v93izufn.fsf@mgsn.dev> Date: Thu, 09 Sep 2021 18:49:04 -0700 In-Reply-To: <86v93izufn.fsf@mgsn.dev> (Sarah Morgensen's message of "Thu, 02 Sep 2021 11:47:08 -0700 (1 week, 6 hours, 48 minutes ago)") Message-ID: <86v939kxnz.fsf@mgsn.dev> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Migadu-Auth-User: iskarian@mgsn.dev 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1631238638; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=DM9JWXJxdBKvMUrzyT4A8u651/i71jhFzc00eYcRxcU=; b=eX3R4pNvTGVRlZFqCb8f99uAs2ZNURvy9uBmSz5lnNJWI5HyXSJ/75Wr//cARA+FhrC8yq WuJflV42Nr1TEmp8lK6Os0pNGSdAAJydBaM5dy3MhaRhEf1vw3XSg1BaKULW3WjF5r4ddA I3r5dv5yc1yHv6IZTU+VkIVP1hVqqf8DXHtsQi+CiUGd1JPUTb+aUkAIEr7Lf9cXkn9Iot YTqtnxSILjQFpwXbNZdf4+K6MJKfg0ArLdxd/Kay0jxtZBr1qCH2O6yUfjQ5a1BDGMYxmo hy6nJ6B35k8aEcsx8S295/rxzgV0SO11IHaK7DIdiNn1+6FiZYMF7JTw2CStmA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1631238638; a=rsa-sha256; cv=none; b=rWoLBjLvLFU18kLRPLLxkyOkMRVmA4YddbZABBV+OJokKGpGxIwH/+lfaQbaspQpXm79gm Rz2+EAsUe92rbdVeB2ByU8nexW4Jjk8/GcqRx7x67aL6r6cc9L9rAFQioPxYpirc6lr/Ho uRZdPBJYZ3h5sDySk/fA4LEgo5/5qOvRiBKAx9PSccpAgMdBDd67mm7CmZp8Em+3OhkGRY DgCCMAajv0391kNK4PacVj6bmpxImF+KnfUdfMA6Ndq5YNvjpzbB+KySmU6Pi4Vm6I+dD+ VwnOgGcIt6OeJdaXNEX/Ec+zBAfS3S1mnownbacs5J58ksFq8Jg2tTmPX8rtBw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=f3Fx91jG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=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-Spam-Score: -1.31 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=mgsn.dev header.s=key1 header.b=f3Fx91jG; dmarc=fail reason="SPF not aligned (relaxed)" header.from=mgsn.dev (policy=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: 883731D2E6 X-Spam-Score: -1.31 X-Migadu-Scanner: scn0.migadu.com X-TUID: OXFgIQuXo7cH --=-=-= Content-Type: text/plain Sarah Morgensen writes: > Sarah Morgensen writes: > >> Hello Guix, >> >> I just noticed go-1.16 is failing on aarch64 [0]. I am not having any >> success tracking down the cause. It looks like the error is the same as >> was happening for go-1.14 circa 11 Mar [1], which was fixed by 9 Apr >> [2], but I cannot tell what resolved the issue. I've attached the >> relevant part of the build log; the full log is available at [0]. >> >> Any ideas? >> >> [0] https://ci.guix.gnu.org/build/949823/details >> [1] https://ci.guix.gnu.org/build/71004/details >> [2] https://ci.guix.gnu.org/build/19478/details >> >> starting phase `build' >> runtime: failed to create new OS thread (have 2 already; errno=22) >> fatal error: runtime.newosproc > > I think this might be related to [0], although if it's true that CI uses > native builders for aarch64 now, I have no idea. > > I've been able to reproduce this with both go-1.14 and go-1.16 when > building with --system=aarch64-linux from an amd64 system. I tried to > apply the patch in the thread I mentioned, but go-1.4 won't build at all > with QEMU. > > [0] runtime: cannot run > cross compiled ARM binary on QEMU > > -- > Sarah I've written this up into a patch (attached below); I don't think there's much of a way to test this other than just letting CI build it. It's a backport, so it shouldn't hurt even if it doesn't fix it. -- Sarah --=-=-= Content-Type: text/x-patch; charset=utf-8 Content-Disposition: inline; filename=0001-gnu-go-1.4-Fix-running-with-qemu-aarch64.patch Content-Transfer-Encoding: quoted-printable Content-Description: 0001-gnu-go-1.4-Fix-running-with-qemu-aarch64.patch >From a5824c2495f5a547499ab200cd5b270b38f571d6 Mon Sep 17 00:00:00 2001 Message-Id: From: Sarah Morgensen Date: Thu, 9 Sep 2021 18:23:10 -0700 Subject: [PATCH core-updates] gnu: go-1.4: Fix running with qemu-aarch64. Backport the fix for running go with qemu-aarch64. * gnu/packages/patches/go-1.4-fix-running-with-qemu.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/golang.scm (go-1.4)[origin]: Apply patch. --- This might fix #49921, but I can't test it as there are a number of issues preventing go-1.4 from compiling on qemu-aarch64. It builds fine on x86_64, so it didn't break anything there. -- Sarah gnu/local.mk | 1 + gnu/packages/golang.scm | 4 +- .../go-1.4-fix-running-with-qemu.patch | 38 +++++++++++++++++++ 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/go-1.4-fix-running-with-qemu.patch diff --git a/gnu/local.mk b/gnu/local.mk index 20f0b8f081..39e17bb3bc 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1144,6 +1144,7 @@ dist_patch_DATA =3D \ %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \ %D%/packages/patches/gobject-introspection-cc.patch \ %D%/packages/patches/gobject-introspection-girepository.patch \ + %D%/packages/patches/go-1.4-fix-running-with-qemu.patch \ %D%/packages/patches/go-fix-script-tests.patch \ %D%/packages/patches/go-skip-gc-test.patch \ %D%/packages/patches/gpm-glibc-2.26.patch \ diff --git a/gnu/packages/golang.scm b/gnu/packages/golang.scm index d3ef39a2e6..33f3120a09 100644 --- a/gnu/packages/golang.scm +++ b/gnu/packages/golang.scm @@ -1035,7 +1035,9 @@ your Go binary to be later served from an http.FileSy= stem.") name version ".tar.gz")) (sha256 (base32 - "0liybk5z00hizsb5ypkbhqcawnwwa6mkwgvjjg4y3jm3ndg5pzzl")))) + "0liybk5z00hizsb5ypkbhqcawnwwa6mkwgvjjg4y3jm3ndg5pzzl")) + (patches + (search-patches "go-1.4-fix-running-with-qemu.patch")))) (build-system gnu-build-system) (outputs '("out" "doc" diff --git a/gnu/packages/patches/go-1.4-fix-running-with-qemu.patch b/gnu/= packages/patches/go-1.4-fix-running-with-qemu.patch new file mode 100644 index 0000000000..52914c71a5 --- /dev/null +++ b/gnu/packages/patches/go-1.4-fix-running-with-qemu.patch @@ -0,0 +1,38 @@ +Backport from upstream: https://github/golang/go/commit/2673f9ed + +Original header: + +From 2673f9ed23348c634f6331ee589d489e4d9c7a9b Mon Sep 17 00:00:00 2001 +From: Austin Clements +Date: Wed, 12 Jul 2017 10:12:50 -0600 +Subject: [PATCH] runtime: pass CLONE_SYSVSEM to clone + +SysV semaphore undo lists should be shared by threads, just like +several other resources listed in cloneFlags. Currently we don't do +this, but it probably doesn't affect anything because 1) probably +nobody uses SysV semaphores from Go and 2) Go-created threads never +exit until the process does. Beyond being the right thing to do, +user-level QEMU requires this flag because it depends on glibc to +create new threads and glibc uses this flag. + +Fixes #20763. + +--- + src/runtime/os_linux.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/runtime/os_linux.c b/src/runtime/os_linux.c +index 0d8ffc9..573be7c 100644 +--- a/src/runtime/os_linux.c ++++ b/src/runtime/os_linux.c +@@ -150,6 +150,7 @@ runtime=C2=B7newosproc(M *mp, void *stk) + | CLONE_FS /* share cwd, etc */ + | CLONE_FILES /* share fd table */ + | CLONE_SIGHAND /* share sig handler table */ ++ | CLONE_SYSVSEM /* share SysV semaphore undo lists (see issue #20763) */ + | CLONE_THREAD /* revisit - okay for now */ + ; +=20 +--=20 +2.31.1 + base-commit: 22f7d4bce1e694b7ac38e62410d76a6d46d96c5d --=20 2.33.0 --=-=-=--