GNU bug report logs

#78404 [PATCH 0/2] Go: Module aware build system

PackageSource(s)Maintainer(s)
guix-patches PTS Buildd Popcon
Full log

Message #23 received at 78404@debbugs.gnu.org (full text, mbox, reply):

Received: (at 78404) by debbugs.gnu.org; 15 May 2025 08:17:43 +0000
From debbugs-submit-bounces@debbugs.gnu.org Thu May 15 04:17:43 2025
Received: from localhost ([127.0.0.1]:50796 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces@debbugs.gnu.org>)
	id 1uFTmg-0004qS-V0
	for submit@debbugs.gnu.org; Thu, 15 May 2025 04:17:43 -0400
Received: from mx.kolabnow.com ([212.103.80.154]:55428)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <j@lambda.is>) id 1uFTlp-0004nc-Vr
 for 78404@debbugs.gnu.org; Thu, 15 May 2025 04:16:53 -0400
Received: from localhost (unknown [127.0.0.1])
 by mx.kolabnow.com (Postfix) with ESMTP id 52E2420B2770
 for <78404@debbugs.gnu.org>; Thu, 15 May 2025 10:16:43 +0200 (CEST)
Authentication-Results: ext-mx-out011.mykolab.com (amavis); dkim=pass
 reason="pass (just generated, assumed good)" header.d=lambda.is
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lambda.is; h=
 content-transfer-encoding:content-type:content-type:mime-version
 :message-id:date:date:subject:subject:from:from:received
 :received:received; s=dkim2; t=1747297000; x=1749111401; bh=00V7
 o43Lj18ypYuGLabg9QeehfjCQkXzgp+BU6YOQ7E=; b=iigwQeL8Jt2HB/eKaVTP
 hNhFuHbcdznYCajh6Nsq1TNV6PRyUazOgAemFmLWO1u5q06WoGkmlV9CB4evAIjx
 RAp/9ABP0Z/FpVk+sCW4pmp6ZQLnRc4T/8fZiE5GUaoIAQebFDk8BGaZrf9Z9KVz
 cJQqODrSJEvRsaLYMt1ADayUyBUuznzNxWVFZQtymvtjp6g7IVSI9KginxZk5P6v
 yczX60EwuPOPHbYiAh6qlFe55hYkBVv8jN0MKX19k6rhN2xXBABeXaCNrwAyXmD1
 NvXBtSFAgXkDMQWY7M1fkol/wKzh7n+5TSOKNqkIe7aWlCdJJxhBqof/2WB5l8rC
 RQ==
X-Virus-Scanned: amavis at mykolab.com
X-Spam-Flag: NO
X-Spam-Score: 0.001
X-Spam-Level: 
X-Spam-Status: No, score=0.001 tagged_above=-10 required=5
 tests=[URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Received: from mx.kolabnow.com ([127.0.0.1])
 by localhost (ext-mx-out011.mykolab.com [127.0.0.1]) (amavis, port 10024)
 with ESMTP id DGuM5RDszxDK for <78404@debbugs.gnu.org>;
 Thu, 15 May 2025 10:16:40 +0200 (CEST)
Received: from int-mx011.mykolab.com (unknown [10.9.13.11])
 by mx.kolabnow.com (Postfix) with ESMTPS id 554D820B2764
 for <78404@debbugs.gnu.org>; Thu, 15 May 2025 10:16:40 +0200 (CEST)
Received: from ext-subm010.mykolab.com (unknown [10.9.6.10])
 by int-mx011.mykolab.com (Postfix) with ESMTPS id 02402323EF18
 for <78404@debbugs.gnu.org>; Thu, 15 May 2025 10:16:39 +0200 (CEST)
From: Jørgen Kvalsvik <j@lambda.is>
To: 78404@debbugs.gnu.org
Subject: [PATCH 0/4] Go module aware build system
Date: Thu, 15 May 2025 10:16:31 +0200
Message-Id: <20250515081635.575459-1-j@lambda.is>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 78404
Cc: Jørgen Kvalsvik <j@lambda.is>
X-BeenThere: debbugs-submit@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@debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit@debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request@debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request@debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces@debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org>
X-Spam-Score: -1.0 (-)
Hi,

Here's a slightly revised patch series which fixes a couple of issues.

`go build` is now invoked in a loop, which allows specifying both patterns and
specific binaries. I needed this for a test case where a project built
internal/echo-plugin for use in tests. There is no real downside to doing this
in a loop as far as I am aware, and install is uses a loop.

I also fixed cross compiling. I did not test it extensively, but cross
compiling using the go-build-system doesn't seem to work well, because it sets
the GOBIN env var, which makes the compiler error out.

From my x86_64-linux system:

    ~$ file $(guix build go-ulid --target=x86_64-linux-gnu)/bin/ulid
    /gnu/store/i258kcbn5g8s97bz26q2rkic7ar5667d-go-ulid-2.1.0/bin/ulid:
    ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked,
    Go BuildID=_VaiUxKWsiIAlkWq7ODq/4GeipEcLMBNQHuHSA3kh/kxL5wZXJ8V0hvXEoJaF4/hO3bq-ZKZ51CEH4uY7rc, stripped

    ~$ file $(guix build go-ulid --target=aarch64-linux-gnu)/bin/ulid
    /gnu/store/f4yzrwd198xhk4194xrfvqdk5yqz0nac-go-ulid-2.1.0/bin/ulid:
    ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked,
    Go BuildID=Z_1o0etV-eeUchVexa3A/bUxxm0FmCf6iLc1enI_T/ET4MK0HAx8OyRYBFV73n/j-RubHuPPW1R02OqsNu9, stripped

    ~$ file $(guix build go-ulid --target=arm-linux-gnueabihf)/bin/ulid
    /gnu/store/q6f1l82bl1lpvrciibkiffjfsxn8vz0x-go-ulid-2.1.0/bin/ulid: ELF
    32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked,
    Go BuildID=NVoNI56N4Ri60CnAR78t/9bQS_Y8jZabn5Y1v80w-/D1_8mW1gwE0Bdtx-heU-/aU1ZqDUxXoi_ToBSeHUL, stripped


I also added two demos, so it would be easier for you to try and to show the
compatibility between packages using the two build systems.  One is an
executable, and one where is a library.

~$ guix build go-github-com-burntsushi-toml go-ulid

Jørgen Kvalsvik (4):
  guix: Add downloader for go modules from GOPROXY
  guix: Add module-aware build system for go
  gnu: Build go-ulid with go-module-build system
  gnu: Build with go-module-build-system

 Makefile.am                           |   3 +
 gnu/packages/golang-xyz.scm           |  13 +-
 guix/build-system/go-module.scm       | 267 +++++++++++++++
 guix/build-system/zig.scm             |   4 +-
 guix/build/go-module-build-system.scm | 473 ++++++++++++++++++++++++++
 guix/go-mod-download.scm              | 126 +++++++
 6 files changed, 877 insertions(+), 9 deletions(-)
 create mode 100644 guix/build-system/go-module.scm
 create mode 100644 guix/build/go-module-build-system.scm
 create mode 100644 guix/go-mod-download.scm

-- 
2.39.5





Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Wed Sep 10 07:02:57 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.