From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id cD9jH9Oqt2beTAAAqHPOHw:P1 (envelope-from ) for ; Sat, 10 Aug 2024 18:00:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id cD9jH9Oqt2beTAAAqHPOHw (envelope-from ) for ; Sat, 10 Aug 2024 20:00:51 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=EOApHQUy; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=fwD0L7wi; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1723312851; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: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=mUIKVaEHpYn2ajdqbD+zxpBdrLBaspTaC2uw7NXBEZU=; b=WnnJ6A8+wbud2SFMO6fA9udCdgBM86XJ9dXUmHyXDXEaiTt1d6Dytj1rQNMTSfdjHP9pcc zYKM/RFvpL4qLF5s/p+WkrVE1BAm3IlpdepibxzH2BTjOyRA3HRj20wj3PILwsbhPCiPR7 G6C29YSQ1nuUkAyTiY13RGnGY3r2hlqpOuM3SCOGDA9tDUp25ZWHo/2TG7c5AJoFXIEWlh UQWBHhhM9iMczNJ9WaqZSyfbppKn7bIer9lJzyEtuuRlPyE7B0u1Lp7gzHMnUu4ZGlafor e/AvhtU+8BwxRBfcaM7h8eDeuPlyfZPYCMU9JcvAgDWXcuKFjf6OU0ZrKN+rsA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=debbugs.gnu.org header.s=debbugs-gnu-org header.b=EOApHQUy; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=fwD0L7wi; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1723312851; a=rsa-sha256; cv=none; b=f4I2UeRSIZtm1uNgd9EXqZ8IU8xMhEXcpvc8gXt/ohFU7KrwiWiyz4koqT1yOPeLcBEZlh h7sghNV5a2S6X8P8nu6U+qMMKHXYljJpofvcp5WjyWaQPlG10yyqoPC6MsONwrG+BJQX52 10pegoQx/1BqOnaP/svv26T1/X55yAZKbhEOGDL0sooyTrrbnSg3cU1XmhQQHLNgweNhRf Ha2SHxmDsXrRe/M5TuXrcS3rIVLcX8uysjESjjJHaYESvpU/eA0d77RYhpCvc5IDfqxB+J B99fqnJEUnY88Fija22uS5EeSmNSd1UEKx7Y7/n3mVHgY2dEP02GtZax4rlVdA== 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 2082978E46 for ; Sat, 10 Aug 2024 20:00:50 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1scqOJ-0002Ul-1l; Sat, 10 Aug 2024 14:00:35 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1scqOG-0002Ub-VC for guix-patches@gnu.org; Sat, 10 Aug 2024 14:00:33 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1scqOG-0005Fp-M8 for guix-patches@gnu.org; Sat, 10 Aug 2024 14:00:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=mUIKVaEHpYn2ajdqbD+zxpBdrLBaspTaC2uw7NXBEZU=; b=EOApHQUynW0j9mOmZ+49sKrLIhS8JavSDXM+zJkcWbUaYLjvOFzO1Pz2XzZK38fhVqCKH2jTnXGZbm79BmYtAccwDqtWzviCErnlPEA2aA51fy6UZ4J2lBDP66/R7dsoWPcR0pKpWvMhYMRwsLwl5rCUBbHYz+QwTpXvYzs27fhjoAvX6UDTTuJF+vDraoZ2P87DpaMdYpohoL+eAbQaDaIrtHBMP37dXQ/aaY2neERJtYhMvpYLwZrE5CyCfy3OjC5xMoTvOVvEyJ/exVAyD3sCXMfHcn+zR7P5+el+XRTRIka7qil89YhANer1UEdv+xklz5gKTmSj3yEFMpRTzw==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1scqOj-00060Z-PD for guix-patches@gnu.org; Sat, 10 Aug 2024 14:01:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#72494] [PATCH v3] gnu: Add c3c-bootstrap. Resent-From: Ashvith Shetty Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 10 Aug 2024 18:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 72494 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 72494@debbugs.gnu.org Cc: adam.faiz@disroot.org Received: via spool by 72494-submit@debbugs.gnu.org id=B72494.172331285623076 (code B ref 72494); Sat, 10 Aug 2024 18:01:01 +0000 Received: (at 72494) by debbugs.gnu.org; 10 Aug 2024 18:00:56 +0000 Received: from localhost ([127.0.0.1]:40418 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scqOd-000608-IG for submit@debbugs.gnu.org; Sat, 10 Aug 2024 14:00:56 -0400 Received: from mail-lj1-f170.google.com ([209.85.208.170]:44402) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1scqOa-0005zr-3H for 72494@debbugs.gnu.org; Sat, 10 Aug 2024 14:00:54 -0400 Received: by mail-lj1-f170.google.com with SMTP id 38308e7fff4ca-2ef2fccca2cso32230961fa.1 for <72494@debbugs.gnu.org>; Sat, 10 Aug 2024 11:00:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723312756; x=1723917556; darn=debbugs.gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=mUIKVaEHpYn2ajdqbD+zxpBdrLBaspTaC2uw7NXBEZU=; b=fwD0L7wiw69DbEAEwTuQ4LDaq161hCRNxZqPwi+kwIaAYZGav+SbdoTYCX4+EUR5Tj fC/Z+mStGe/UaRnzyr+QVfCPoA10BwTLHvsAy3wnC5PILrOQesAtMERxBuDOtYChvVeh AtzSPTgVnB7pk2AySxtYPM5/e6zRY0TFfVF7KLPS7Z41PZaUUEJrJQbAJS/omQetvAt/ XeO3fSoHvIZRfmhTYWcerT1a76EIMawKb3mqCo1YT0p6P3RQOtvM/WeYOIaZb+faBYHH hsyXQL0ir99Ip6mIe2Gh88SsF9rxRSbhDL+FNsvp7y7wjm5597VkyyztBSPq+Cn891DY MSrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723312756; x=1723917556; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mUIKVaEHpYn2ajdqbD+zxpBdrLBaspTaC2uw7NXBEZU=; b=LojAyn7serHNPa1i1p2+f9LJPVB2iV0AZhEjR4PEiwKltsgGKz2mN46wZROZWqhf8Z NtMvl/Y1r9t9fvgvH4JQbRWQysebRMej71aR+YPexSWVTmkY5TvLmHY7+qk0rfvtwZUX YncfGRSxFUqxZVD2Ct0G9VhLPSOKvPVVO+FAN2hXI0QZq0x+8IXYe0ejrRf/Uo/W1igT N1kQ5aIPFyguz+RSiJ1My3+W56KWnjVx8409pYjMHGZTZovu2IscWdfKDrb/2XPhfd71 aEol9TKjWY+XZtY+bDXUZtUBKv1OlJqAmn0B6tX+JduqsZsFJn82bV4AZ8+5WXJMisjB lSHQ== X-Gm-Message-State: AOJu0Yx7QB3yiYqXLu7MamZpZIvIb8Kb1zuVPieKTaD6ECr7QYAWDvdo uMax60L4/lS8tNW4aWWym3UnkyuX048fDer0ZXtT+bfvBz3VPk05N/aiFpaf96XKIlPLmj4N79V EwO0jqb1RfF2J3Nvjyt2HBndYlssBVg== X-Google-Smtp-Source: AGHT+IHAJj0uEC0PAYjMn2CODRubYUes3ZCiAMzCfGy7joI8A0Xj0He8vxuMw6cGBhWj7v7xRFKI4wJEQmdsRVoEKs8= X-Received: by 2002:a2e:d11:0:b0:2f1:a8ca:4f78 with SMTP id 38308e7fff4ca-2f1a8ca5094mr30365311fa.35.1723312755304; Sat, 10 Aug 2024 10:59:15 -0700 (PDT) MIME-Version: 1.0 References: <25ba6326-a778-7f9e-1930-2d8d6c35375b@disroot.org> In-Reply-To: <25ba6326-a778-7f9e-1930-2d8d6c35375b@disroot.org> From: Ashvith Shetty Date: Sat, 10 Aug 2024 17:59:04 +0000 Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Spam-Score: -5.49 X-Migadu-Queue-Id: 2082978E46 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -5.49 X-TUID: Yvp7K5Oa4plQ Hi Adam, I've tried building from your patch, and it seems to me that the compiler isn't working, and requires that the flag `-cc` be passed, pointing to `gcc` or `clang`. Since `cc` is a symlink to `gcc`, wouldn't it be better to substitute `cc` to `gcc`? Or is it possible to create a symlink `cc` unique to, and isolated inside the package expression? On Wed, Aug 7, 2024 at 6:37=E2=80=AFAM Adam Faiz wr= ote: > > From 3f9768c8fe5cc965170a74e5c018887793cb3ac0 Mon Sep 17 00:00:00 2001 > Message-ID: <3f9768c8fe5cc965170a74e5c018887793cb3ac0.1723012269.git.adam= .faiz@disroot.org> > From: AwesomeAdam54321 > Date: Wed, 7 Aug 2024 12:18:23 +0800 > Subject: [PATCH v3] gnu: Add c3c-bootstrap. > > This patch was co-authored with Ashvith Shetty. > > * gnu/packages/c3.scm: New file. > * gnu/packages/c3.scm (c3c-bootstrap): New variable. > --- > gnu/packages/c3.scm | 92 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 92 insertions(+) > create mode 100644 gnu/packages/c3.scm > > diff --git a/gnu/packages/c3.scm b/gnu/packages/c3.scm > new file mode 100644 > index 0000000000..2c5924807f > --- /dev/null > +++ b/gnu/packages/c3.scm > @@ -0,0 +1,92 @@ > +;;; GNU Guix --- Functional package management for GNU > +;;; Copyright =C2=A9 2024 Ashvith Shetty > +;;; Copyright =C2=A9 2024 Adam Faiz > +;;; > +;;; This file is part of GNU Guix. > +;;; > +;;; GNU Guix is free software; you can redistribute it and/or modify it > +;;; under the terms of the GNU General Public License as published by > +;;; the Free Software Foundation; either version 3 of the License, or (a= t > +;;; your option) any later version. > +;;; > +;;; GNU Guix is distributed in the hope that it will be useful, but > +;;; WITHOUT ANY WARRANTY; without even the implied warranty of > +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +;;; GNU General Public License for more details. > +;;; > +;;; You should have received a copy of the GNU General Public License > +;;; along with GNU Guix. If not, see . > + > +(define-module (gnu packages c3) > + #:use-module (gnu packages compression) > + #:use-module (gnu packages curl) > + #:use-module (gnu packages libffi) > + #:use-module (gnu packages llvm) > + #:use-module (gnu packages python) > + #:use-module (guix build-system cmake) > + #:use-module (guix gexp) > + #:use-module (guix git-download) > + #:use-module ((guix licenses) #:prefix license:) > + #:use-module (guix packages) > + #:use-module (guix utils)) > + > +(define-public c3c-bootstrap > + (package > + (name "c3c") > + (version "0.6.1") > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/c3lang/c3c") > + (commit (string-append "v" version)))) > + (file-name (git-file-name name version)) > + (sha256 > + (base32 "0xjl3yghyqmqv9118nhcix3xywlpdirqc0dlmdaghdkja0wr19rw")) > + (modules '((guix build utils))) > + (snippet > + #~(begin > + ;; Unbundle miniz. > + (delete-file-recursively "dependencies") > + ;; Swap out miniz for zlib. > + (substitute* "CMakeLists.txt" > + (("add_library\\(miniz.*\\)\n$") > + "find_package(ZLIB REQUIRED)") > + (("target_include_directories\\(miniz PUBLIC") "") > + (("...*/dependencies/miniz/..") "") > + (("miniz") "z")) > + (substitute* "src/utils/unzipper.c" > + (("miniz\\.h") "zlib.h")))))) > + (build-system cmake-build-system) > + (arguments > + (list > + #:configure-flags > + #~(list "-DCMAKE_INSTALL_LIBDIR=3Dlib") > + #:phases > + #~(modify-phases %standard-phases > + (add-before 'configure 'fix-build > + (lambda _ > + (substitute* "CMakeLists.txt" > + (("\\$\\{LLVM_LIBRARY_DIRS\\}") > + (string-append #$lld-18 "/lib/ " > + #$llvm-18 "/lib/"))))) > + (replace 'check > + (lambda* (#:key tests? #:allow-other-keys) > + (when tests? > + (with-directory-excursion "../source/resources/testproj= ect" > + (invoke "../../../build/c3c" > + "--cc" #$(cc-for-target) "build")) > + (invoke "python3" "../source/test/src/tester.py" > + "./c3c" "../source/test/test_suite") > + (invoke "./c3c" "--cc" #$(cc-for-target) > + "compile-test" "../source/test/unit"))))))) > + (native-inputs (list python)) > + (inputs (list libffi lld-18 llvm-18 zlib)) > + (synopsis "Compiler for the C3 language") > + (description > + "C3 is a programming language that builds on the syntax and semanti= cs > +of the C language, with the goal of evolving it while still retaining > +familiarity for C programmers.") > + (home-page "https://c3-lang.org/") > + (supported-systems '("x86_64-linux" "aarch64-linux" "riscv64-linux")= ) > + (license (list license:lgpl3 license:expat)))) > > base-commit: b20956651a53a8f23828fdeb6945e1a31e6997a8 > -- > 2.41.0