Message ID | 25870e3b599bef45e57c972d019cbee3228e9e35.1655311589.git.philip@philipmcgrath.com |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 24A8427BBEA; Wed, 15 Jun 2022 18:17:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id C6CDB27BBE9 for <patchwork@mira.cbaines.net>; Wed, 15 Jun 2022 18:17:12 +0100 (BST) Received: from localhost ([::1]:52106 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org>) id 1o1Wdj-0002AV-Vv for patchwork@mira.cbaines.net; Wed, 15 Jun 2022 13:17:12 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1o1Wdb-0002AG-5E for guix-patches@gnu.org; Wed, 15 Jun 2022 13:17:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:45837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1o1Wda-0001oy-TC for guix-patches@gnu.org; Wed, 15 Jun 2022 13:17:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1o1Wda-0001nM-O9; Wed, 15 Jun 2022 13:17:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55998] [PATCH] gnu: Add cctools. Resent-From: Philip McGrath <philip@philipmcgrath.com> Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: philip@philipmcgrath.com, guix-patches@gnu.org Resent-Date: Wed, 15 Jun 2022 17:17:02 +0000 Resent-Message-ID: <handler.55998.B.16553133716814@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 55998 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 55998@debbugs.gnu.org Cc: Philip McGrath <philip@philipmcgrath.com> X-Debbugs-Original-To: guix-patches@gnu.org X-Debbugs-Original-Xcc: Philip McGrath <philip@philipmcgrath.com> Received: via spool by submit@debbugs.gnu.org id=B.16553133716814 (code B ref -1); Wed, 15 Jun 2022 17:17:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Jun 2022 17:16:11 +0000 Received: from localhost ([127.0.0.1]:39727 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1o1Wck-0001lm-68 for submit@debbugs.gnu.org; Wed, 15 Jun 2022 13:16:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:58732) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <philip@philipmcgrath.com>) id 1o1Wcf-0001lZ-I0 for submit@debbugs.gnu.org; Wed, 15 Jun 2022 13:16:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <philip@philipmcgrath.com>) id 1o1Wcf-0001T4-93 for guix-patches@gnu.org; Wed, 15 Jun 2022 13:16:05 -0400 Received: from mail-vs1-xe32.google.com ([2607:f8b0:4864:20::e32]:43522) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <philip@philipmcgrath.com>) id 1o1Wca-0001UT-GJ for guix-patches@gnu.org; Wed, 15 Jun 2022 13:16:04 -0400 Received: by mail-vs1-xe32.google.com with SMTP id r4so9322861vsf.10 for <guix-patches@gnu.org>; Wed, 15 Jun 2022 10:15:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=philipmcgrath.com; s=google; h=from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=VMAt01uVyZNtSZaIyLbZsSYI3IVT6/tofsnoj4cIFNg=; b=EmBoKAAyPFIJHcBXKF63UW1IDf2pu9Rr6TCts5Z9velKduhOebX/p7iVgkDeRLMRN3 l1U8aPvAMJKa2jd0F87iFOzSdUBZic03E+nk3sYBEr5KDmRrkw8+o3WXSZlJ0o8/o/BV XSU6/kzAJ97eys2eBYIT+ua6wNmDIkCtYhS5NTNdFLEgk8/qA0jx41SEoHN9WqbygxUS 8FGWittDUW4jOD3S2JpkzldrDmiCA2WW+9SRx+v6NNSdcxcbNwqEcexIHssB5DuZrEiI fXI7xZ9rxBLdpzF5eQpSuC7METuhGZ4w3D4LyRQA1S0cY8vAFayG8XUo1UnE7+o2C81m tH7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=VMAt01uVyZNtSZaIyLbZsSYI3IVT6/tofsnoj4cIFNg=; b=7JyQszH3/xtsMIdeRC0rswjcynjDPKvSR+LvLtThaV0LsU0FMPwcj9kqam9zHyLeCt LFbzAGdcUWzj4IrdENr+eMX2Osto4Q6F00A8maEpfruXcOU0TSTLBXYAWwL4833LlGTI 7DtekP8f06lHS9G8975gso9cWC+L9UVtRYRgh/jYki7NB+/vZBqZr9ZQ1Mpsg0ZP6MMl 8dCSb3C8XfLfE/GXiClmPYm7XwCtP8gySdcnBNCeFiKOfu9xkxeYJIj8spdLOh+BkOq0 R3gv1wzrHJcDUEteAruZI9pQlU2JiSJdbR6tUz1ty/x+dspNXd4hXqryjFyrbIQhFxPm f5tw== X-Gm-Message-State: AJIora/YFsvIXeeQZPG39EvdA/2vDUt+V2K0vAiSx5ckXH5H3ZS7wUsm HKsUgdq97TQNL2zPl4afudTUxuooXqMtOaYFzIQ= X-Google-Smtp-Source: AGRyM1tEkZiugVJtFLpe1aTzRBbSHA2MRZimzrDm/MMSWB2J4r/ZZeNjnJUzmsvIOsJVArmqbEbCHg== X-Received: by 2002:a67:f9d6:0:b0:34a:d906:a37b with SMTP id c22-20020a67f9d6000000b0034ad906a37bmr340013vsq.7.1655313357608; Wed, 15 Jun 2022 10:15:57 -0700 (PDT) Received: from localhost (c-73-125-98-51.hsd1.fl.comcast.net. [73.125.98.51]) by smtp.gmail.com with UTF8SMTPSA id j11-20020ac5c30b000000b0035d31e4bb01sm1826175vkk.6.2022.06.15.10.15.57 for <guix-patches@gnu.org> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 15 Jun 2022 10:15:57 -0700 (PDT) From: Philip McGrath <philip@philipmcgrath.com> Date: Wed, 15 Jun 2022 13:15:49 -0400 Message-Id: <25870e3b599bef45e57c972d019cbee3228e9e35.1655311589.git.philip@philipmcgrath.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: permerror client-ip=2607:f8b0:4864:20::e32; envelope-from=philip@philipmcgrath.com; helo=mail-vs1-xe32.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, T_SPF_PERMERROR=0.01 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: guix-patches@gnu.org List-Id: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-getmail-retrieved-from-mailbox: Patches |
Series |
[bug#55998] gnu: Add cctools.
|
|
Commit Message
Philip McGrath
June 15, 2022, 5:15 p.m. UTC
* gnu/packages/darwin.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. * gnu/packages/darwin.scm (cctools): New variable. --- These tools are used, for example, by Nix [1] and conda-forge [2]. I've used only one small part of this package so far: in [3], I use `install_name_tool` somewhat like `patchelf` in the process of building the libgit2 shared library using Guix for distribution as a Racket package. (I plan to write up for the mailing list what worked well with that approach and what maybe could work better.) -Philip [1]: https://github.com/NixOS/nixpkgs/blob/master/pkgs/os-specific/darwin/cctools/port.nix [2]: https://conda-forge.org/blog/posts/2020-10-29-macos-arm64/ [3]: https://github.com/LiberalArtist/native-libgit2-pkgs/tree/build-scripts gnu/local.mk | 1 + gnu/packages/darwin.scm | 85 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 86 insertions(+) create mode 100644 gnu/packages/darwin.scm base-commit: 8a04ac4b2f5d356719d896536dabc95a9520c938
Comments
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: > I've used only one small part of this package so far: in [3], > Nitpick: in libgit2-for-racket.scm: ;; it could be provenance.json, but neither ;; Racket nor Guix has a pretty-printer If you use the guile-json library, you can pass ‘#:pretty #true’ to pretty-print the json. Greetings, Maxime.
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
> + (license license:apsl2))))
Seems to have a problematic cause:
‘13.6 Dispute Resolution. Any litigation or other dispute resolution
between You and Apple relating to this License shall take place in the
Northern District of California, and You and Apple hereby consent to
the personal jurisdiction of, and venue in, the state and federal
courts within that District with respect to this License. The
application of the United Nations Convention on Contracts for the
International Sale of Goods is expressly excluded.’
To me it seems a bit much to require of users _outside_ the US to have
to subject theirselves to the US whenever Apple feels like litigating.
(Is such an unilateral requirement even legal?)
Greetings,
Maxime.
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: > + (synopsis "Darwin's @code{cctools} and @code{ld64}") > + ;; Confusingly enough, the program is called ld64, but the command is > + ;; just ld (with no symlink), so @command{ld64} would be wrong. > + (description > + "Darwin's @code{cctools} are a set of tools somewhat similar in purpose > +to GNU Binutils, but for Mach-O files targeting Darwin. The suite includes > +@command{install_name_tool}, @command{libtool}, and other specialized tools in > +addition to standard utilities like @command{ld} and @command{as}. This > +package provides portable versions of the tools.") > + (license license:apsl2)))) How can this work? We don't have any (cross-compiled) Darwin libc libraries to let it link against. Is this a draft patch? Greetings, Maxime.
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: > + ;; FIXME: This is a very ugly way to make > + ;; #include <linux/limits.h> > + ;; work---what is a better way? Searching for <linux/limit.h> in the guix git checkout, I found: ;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc ;; users should automatically pull Linux headers as well. On GNU/Hurd, ;; libc provides <hurd.h>, which includes a bunch of Hurd and Mach headers, ;; so both should be propagated. (propagated-inputs (if (hurd-target?) `(("hurd-core-headers" ,hurd-core-headers)) `(("kernel-headers" ,linux-libre-headers)))) (The hurd bit is not relevant here, and in this case I'd assume that no propagation is required.) Greetings, Maxime.
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
> + (native-inputs (list clang-toolchain))
Why? Would the standard GCC compiler suffice?
Greetings,
Maxime.
On 6/15/22 14:45, Maxime Devos wrote: > Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: >> + (license license:apsl2)))) > > Seems to have a problematic cause: > > ‘13.6 Dispute Resolution. Any litigation or other dispute resolution > between You and Apple relating to this License shall take place in the > Northern District of California, and You and Apple hereby consent to > the personal jurisdiction of, and venue in, the state and federal > courts within that District with respect to this License. The > application of the United Nations Convention on Contracts for the > International Sale of Goods is expressly excluded.’ > > To me it seems a bit much to require of users _outside_ the US to have > to subject theirselves to the US whenever Apple feels like litigating. > > (Is such an unilateral requirement even legal?) > I agree that the choice-of-law language is less than friendly to users. The FSF has issued an opinion [1] that the APSL 2.0 is a free software license: they say that "Apple's lawyers worked with the FSF to produce a license that would qualify" (after problems with earlier versions of the license). They "recommend you do not release new software using this license; but it is ok to use and improve software which other people release under this license." IIUC, (guix licenses) only defines FSDG-compatible licenses. Certainly there are broader community governance questions implicated, but I don't think this patch needs to resolve them. -Philip [1]: https://www.gnu.org/philosophy/apsl.html
On 6/15/22 14:53, Maxime Devos wrote: > Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: >> + (synopsis "Darwin's @code{cctools} and @code{ld64}") >> + ;; Confusingly enough, the program is called ld64, but the command is >> + ;; just ld (with no symlink), so @command{ld64} would be wrong. >> + (description >> + "Darwin's @code{cctools} are a set of tools somewhat similar in purpose >> +to GNU Binutils, but for Mach-O files targeting Darwin. The suite includes >> +@command{install_name_tool}, @command{libtool}, and other specialized tools in >> +addition to standard utilities like @command{ld} and @command{as}. This >> +package provides portable versions of the tools.") >> + (license license:apsl2)))) > > How can this work? We don't have any (cross-compiled) Darwin libc > libraries to let it link against. Is this a draft patch? > Fortunately, we don't need a Darwin libc: tools like `install_name_tool` run on GNU/Linux, but work with Darwin binaries, somewhat like `patchelf` can work on a cross-compiled binary. From another point of view, it's a bit like some parts of MinGW. This patch is not enough for a Darwin cross-compilation toolchain, though I believe it would play a role analogous to GNU Binutils in such a toolchain. Still, several of the tools are useful (albeit niche) on their own, which is why I sent this patch now. A whole group of tools supports inspecting Mach-O binaries, for example. -Philip
On 6/15/22 14:56, Maxime Devos wrote: > Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: >> + (native-inputs (list clang-toolchain)) > > Why? Would the standard GCC compiler suffice? > Unfortunately, these tools are tightly coupled to Clang/LLVM and don't support GCC. For example, `otool` is a wrapper around `llvm-objdump`. -Philip
Philip McGrath schreef op wo 15-06-2022 om 15:21 [-0400]: > Unfortunately, these tools are tightly coupled to Clang/LLVM and don't > support GCC. For example, `otool` is a wrapper around `llvm-objdump`. In that case, it needs to be in `inputs`, not `native-inputs`, such that cross-compiling this cross-compiler can work. FWIW, you could compile the wrapper `otool` with GCC and at the same time let `otool` use `llvm-objdump`. Greetings, Maxime.
On 6/15/22 14:55, Maxime Devos wrote: > Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: >> + ;; FIXME: This is a very ugly way to make >> + ;; #include <linux/limits.h> >> + ;; work---what is a better way? > > > Searching for <linux/limit.h> in the guix git checkout, I found: > > ;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc > ;; users should automatically pull Linux headers as well. On GNU/Hurd, > ;; libc provides <hurd.h>, which includes a bunch of Hurd and Mach headers, > ;; so both should be propagated. > (propagated-inputs > (if (hurd-target?) > `(("hurd-core-headers" ,hurd-core-headers)) > `(("kernel-headers" ,linux-libre-headers)))) > > (The hurd bit is not relevant here, and in this case I'd assume that no > propagation is required.) > I saw that, too, and I don't understand why <linux/limits.h> (it's plural) isn't found automatically, especially when the neighboring <limits.h> is found: with both clang-toolchain and gcc-toolchain, include/linux is a symlink into linux-libre-headers. -Philip
Philip McGrath schreef op wo 15-06-2022 om 15:06 [-0400]: > I agree that the choice-of-law language is less than friendly to users. > > The FSF has issued an opinion [1] that the APSL 2.0 is a free software > license: they say that "Apple's lawyers worked with the FSF to produce a > license that would qualify" (after problems with earlier versions of the > license) I am not contesting that FSF considers APSL 2.0 to be a free software license. In fact, I looked at that web page to look at why FSF considers it to be a free software license. But I didn't find any answer about the ‘dispute resolution’ clause. So it seems to me that FSF overlooked that particular issue, considered it acceptable because of the US being based in the US, or considered it acceptable due to some other (unknown) reason. In case of the FSF overlooking things: mistakes can and should be corrected (this is a free software distro!). In case of US-centrism: err, no. In case of an unknwon reason: reason is unknown. The point is being free, not being stamped as free by the FSF. > IIUC, (guix licenses) only defines FSDG-compatible licenses. Apparently, it doesn't, given the presence of the APSL 2.0, though that's a bug. > Certainly there are broader community governance questions > implicated, but I don't think this patch needs to resolve them. I did not ask anything about community governance? Greetings, Maxime.
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: > + (source > + (origin > + (method git-fetch) > + (uri (git-reference > + (url "https://github.com/tpoechtrager/cctools-port") > + (commit commit))) > + (sha256 This contains generated files (look for 'configure' and 'Makefile.in'. Per standard Guix policy, things need to be built from source. The autotools are no exception, see <https://www.mail-archive.com/guix-devel@gnu.org/msg61160.html>. They need to be removed, e.g. with delete-file and find-files in a snippet. Greetings, Maxime.
Philip McGrath schreef op wo 15-06-2022 om 15:19 [-0400]: > Still, several of the tools are useful (albeit niche) on their own, > which is why I sent this patch now. A whole group of tools supports > inspecting Mach-O binaries, for example. Ok, but the package description is implying a linker is available, which is not the case, due to the lack of a Darwin libc in Guix. Greetings, Maxime.
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
> + (license license:apsl2))))
It's also BSD-4:
https://github.com/tpoechtrager/cctools-port/blob/04663295d0425abfac90a42440a7ec02d7155fea/cctools/gprof/gprof.c#L27
It's also bundling GNUstep code:
https://github.com/tpoechtrager/cctools-port/tree/master/cctools/libobjc2
Greetings,
Maxime.
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
> + (license license:apsl2))))
There's some Expat licensed code as well:
https://github.com/tpoechtrager/cctools-port/tree/master/cctools/libobjc2
Please investigate the rest as well.
Greetings,
Maxime.
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
> + (license license:apsl2))))
There's also the GDB General public license:
https://github.com/tpoechtrager/cctools-port/blob/master/cctools/include/gnu/symseg.h
and BSD-3:
https://github.com/tpoechtrager/cctools-port/blob/master/cctools/include/xar/xar.h
and additional term:
* This file contains Original Code and/or Modifications of Original
Code
* as defined in and that are subject to the Apple Public Source
License
* Version 2.0 (the 'License'). You may not use this file except in
* compliance with the License. The rights granted to you under the
License
* may not be used to create, or enable the creation or redistribution
of,
* unlawful or unlicensed copies of an Apple operating system, or to
* circumvent, violate, or enable the circumvention or violation of,
any
* terms of an Apple operating system software license agreement.
(in partiular, a reference to an unspecified ‘Apple operating system software
license agreement’)
Greetings,
Maxime.
On 6/15/22 15:35, Maxime Devos wrote: > Philip McGrath schreef op wo 15-06-2022 om 15:06 [-0400]: >> I agree that the choice-of-law language is less than friendly to users. >> >> The FSF has issued an opinion [1] that the APSL 2.0 is a free software >> license: they say that "Apple's lawyers worked with the FSF to produce a >> license that would qualify" (after problems with earlier versions of the >> license) > > I am not contesting that FSF considers APSL 2.0 to be a free software > license. In fact, I looked at that web page to look at why FSF > considers it to be a free software license. But I didn't find any > answer about the ‘dispute resolution’ clause. So it seems to me that > FSF overlooked that particular issue, considered it acceptable because > of the US being based in the US, or considered it acceptable due to > some other (unknown) reason. > > In case of the FSF overlooking things: mistakes can and should be > corrected (this is a free software distro!). In case of US-centrism: > err, no. In case of an unknwon reason: reason is unknown. > According to <https://www.gnu.org/philosophy/free-sw.html#legal-details>, "It is acceptable for a free license to specify which jurisdiction's law applies, or where litigation must be done, or both." That paragraph was apparently added in version 1.129, in 2012, but the note says that "this was always our policy": <https://web.cvs.savannah.gnu.org/viewvc/www/www/philosophy/free-sw.html?r1=1.128&r2=1.129> So it is not a matter of something being overlooked. Some other FSF-free licenses include similar provisions, which generally seem to make the license in question not GPL-compatible. For example: <https://directory.fsf.org/wiki/License:YPL-1.1>. > The point is being free, not being stamped as free by the FSF. > >> IIUC, (guix licenses) only defines FSDG-compatible licenses. > > Apparently, it doesn't, given the presence of the APSL 2.0, though > that's a bug. > >> Certainly there are broader community governance questions >> implicated, but I don't think this patch needs to resolve them. > > I did not ask anything about community governance? > I meant "community governance" broadly to include questions like, "Who decides what 'free' means?" Since I basically agree with statements like <https://guix.gnu.org/blog/2019/joint-statement-on-the-gnu-project/>, I think there are troubling questions about the FSF's role and how such decisions ought to be made in the future. Still, IIUC Guix's current policy is <https://www.gnu.org/distros/free-system-distribution-guidelines.html>, which links to <https://www.gnu.org/philosophy/free-sw.html> for its definition of "free license". Bugs are one thing, but this seems to be an explicitly allowed under the existing policy, and I don't think this patch is the right place to debate substantive changes to Guix's policy. -Philip
Philip McGrath schreef op wo 15-06-2022 om 17:00 [-0400]: > According to > <https://www.gnu.org/philosophy/free-sw.html#legal-details>, "It is > acceptable for a free license to specify which jurisdiction's law > applies, or where litigation must be done, or both." What > an explicitly allowed under the existing policy, and I don't think > this patch is the right place to debate substantive changes to Guix's > policy. Maybe move it to guix-devel, and depending on the conclusion, continue with this patch / drop it? > I meant "community governance" broadly to include questions like, > "Who decides what 'free' means?" Ok, makes sense to me. Greetings, Maxime.
On Wed Jun 15, 2022 at 10:00 PM BST, Philip McGrath wrote: > According to > <https://www.gnu.org/philosophy/free-sw.html#legal-details>, "It is > acceptable for a free license to specify which jurisdiction's law > applies, or where litigation must be done, or both." Although I don't know anything about licensing, wouldn't this mean a company could, for example, publish software under a license that states that disputes must be resolved in some theoretical country that bans all free sharing of software (even if the owner wants to share it), then sue somebody who's modified the ostensibly free software for copyright infringement, winning because the country forbids any software sharing, and still have the license count as free? I'm probably misunderstanding this; surely there wouldn't be such a gaping hole in the FSF's free license definition?
On Wednesday, June 15, 2022 4:17:07 PM EDT Maxime Devos wrote: > Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: > > + (license license:apsl2)))) > > It's also BSD-4: > > https://github.com/tpoechtrager/cctools-port/blob/04663295d0425abfac90a42440 > a7ec02d7155fea/cctools/gprof/gprof.c#L27 > My understanding is that Guix's practice is to list the overall license or licenses of a package, not every permissive license that might apply to particular files. While that file uses the original license header, it's effectively BSD-3-Clause, because the University of California retroactively deleted the advertising clause in 1999: see <https://www.gnu.org/licenses/bsd.html> and <ftp:// ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change>. > It's also bundling GNUstep code: > > https://github.com/tpoechtrager/cctools-port/tree/master/cctools/libobjc2 > libobjc2 is Expat-licensed—I will look into whether it can be unbundled, but it's not a license issue. -Philip
On Wednesday, June 15, 2022 4:23:27 PM EDT Maxime Devos wrote: > Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: > > + (license license:apsl2)))) > > There's also the GDB General public license: > > https://github.com/tpoechtrager/cctools-port/blob/master/cctools/include/gnu > /symseg.h > This file is dead code: I will delete it in a snippet and send a patch upstream. > and BSD-3: > > https://github.com/tpoechtrager/cctools-port/blob/master/cctools/include/xar > /xar.h > > and additional term: > > * This file contains Original Code and/or Modifications of Original > Code > * as defined in and that are subject to the Apple Public Source > License > * Version 2.0 (the 'License'). You may not use this file except in > * compliance with the License. The rights granted to you under the > License > * may not be used to create, or enable the creation or redistribution > of, > * unlawful or unlicensed copies of an Apple operating system, or to > * circumvent, violate, or enable the circumvention or violation of, > any > * terms of an Apple operating system software license agreement. > > (in partiular, a reference to an unspecified ‘Apple operating system > software license agreement’) > I'm not a lawyer, but I read that language as, "The rights granted to you under the License may not be used to [do things that are unlawful]." Having rights under one license to some program does not make it legal for you to violate a completely different license that applies to some other program. I'd suggest discussing any remaining license issues at <https://lists.gnu.org/ archive/html/guix-devel/2022-06/msg00235.html>, though. -Philip
Philip McGrath schreef op do 16-06-2022 om 18:29 [-0400]: > My understanding is that Guix's practice is to list the overall > license or licenses of a package, not every permissive license that > might apply to particular files. Apparently not fully consistent between packages and packagers? What I tend to do and recommend, is list all _relevant_ licenses, without doing an interpretation of what would be the overall license. FWIW, there was past discussion: * https://lists.gnu.org/archive/html/guix-devel/2021-05/msg00183.html * https://lists.gnu.org/archive/html/guix-devel/2021-05/msg00186.html that was somewhere in between the two endpoints. Greetings, Maxime.
On Wednesday, June 15, 2022 4:04:21 PM EDT Maxime Devos wrote: > Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: > > + (source > > + (origin > > + (method git-fetch) > > + (uri (git-reference > > + (url "https://github.com/tpoechtrager/cctools-port") > > + (commit commit))) > > + (sha256 > > This contains generated files (look for 'configure' and 'Makefile.in'. > Per standard Guix policy, things need to be built from source. The > autotools are no exception, see > <https://www.mail-archive.com/guix-devel@gnu.org/msg61160.html>. > They need to be removed, e.g. with delete-file and find-files in a > snippet. > Doing this had the unexpected side-effect of fixing the problem finding <linux/ limits.h>! A v2 is coming soon. -Philip
On Wednesday, June 15, 2022 3:23:48 PM EDT Maxime Devos wrote: > Philip McGrath schreef op wo 15-06-2022 om 15:21 [-0400]: > > Unfortunately, these tools are tightly coupled to Clang/LLVM and don't > > support GCC. For example, `otool` is a wrapper around `llvm-objdump`. > > In that case, it needs to be in `inputs`, not `native-inputs`, such > that cross-compiling this cross-compiler can work. > > FWIW, you could compile the wrapper `otool` with GCC and at the same > time let `otool` use `llvm-objdump`. > If that were the only issue, it might be possible, but this package just pervasively does not work with GCC. You will not even get past `./configure` without Clang. Nix seemed to only have the LLVM toolchain as a native input, but I've added it to `inputs` as well. -Philip
On Wednesday, June 15, 2022 4:07:47 PM EDT Maxime Devos wrote: > Philip McGrath schreef op wo 15-06-2022 om 15:19 [-0400]: > > Still, several of the tools are useful (albeit niche) on their own, > > which is why I sent this patch now. A whole group of tools supports > > inspecting Mach-O binaries, for example. > > Ok, but the package description is implying a linker is available, > which is not the case, due to the lack of a Darwin libc in Guix. > Concretely, there is an `ld`, and it runs at least enough to print out a usage note. I can't say for certain *why* it works, though the way LLVM doesn't need a different binary for each target and the somewhat unusual way linking to libc and other system libraries works on Darwin. Though does a linker really need a libc? In principle, it could link things that don't link to libc, or even link libc itself. I haven't tried actually linking anything with this package's `ld`, but, even if it turns out to not be fully functional yet, this is the package that contains Darwin's `ld`. I did tweak the description in v2 to replace the reference to `libtool`, because Darwin's `libtool` is something completely unrelated than the program in the Guix package called `libtool`. -Philip
Hi, Maxime Devos <maximedevos@telenet.be> skribis: > Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]: >> + (source >> + (origin >> + (method git-fetch) >> + (uri (git-reference >> + (url "https://github.com/tpoechtrager/cctools-port") >> + (commit commit))) >> + (sha256 > > This contains generated files (look for 'configure' and 'Makefile.in'. > Per standard Guix policy, things need to be built from source. The > autotools are no exception, see > <https://www.mail-archive.com/guix-devel@gnu.org/msg61160.html>. > They need to be removed, e.g. with delete-file and find-files in a > snippet. To be clear, I think this is best described as “Guix policy-to-be”—we have yet to write this down and actually implement it consistently. Ludo’.
diff --git a/gnu/local.mk b/gnu/local.mk index 5a9edc16bb..3987a499d9 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -181,6 +181,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/cvassistant.scm \ %D%/packages/cybersecurity.scm \ %D%/packages/cyrus-sasl.scm \ + %D%/packages/darwin.scm \ %D%/packages/databases.scm \ %D%/packages/datamash.scm \ %D%/packages/datastructures.scm \ diff --git a/gnu/packages/darwin.scm b/gnu/packages/darwin.scm new file mode 100644 index 0000000000..48bba70dc5 --- /dev/null +++ b/gnu/packages/darwin.scm @@ -0,0 +1,85 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2022 Philip McGrath <philip@philipmcgrath.com> +;;; +;;; 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 (at +;;; 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 <http://www.gnu.org/licenses/>. + +(define-module (gnu packages darwin) + #:use-module (gnu packages) + #:use-module (gnu packages llvm) + #:use-module (guix build-system gnu) + #:use-module (guix gexp) + #:use-module (guix git-download) + #:use-module (guix packages) + #:use-module (guix utils) + #:use-module ((guix licenses) #:prefix license:)) + +(define-public cctools + (let ((cctools-version "973.0.1") + (ld64-version "609") + (revision "0") + (commit "04663295d0425abfac90a42440a7ec02d7155fea")) + (package + (name "cctools") + (version (git-version (string-append cctools-version + "-ld64-" + ld64-version) + revision + commit)) + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tpoechtrager/cctools-port") + (commit commit))) + (sha256 + (base32 "0vihfa8y64vvd3pxy8qh4mhcnzinxh9flpz9dvw4wch4zj2nnfjs")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (native-inputs (list clang-toolchain)) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'chdir + (lambda args + (chdir "cctools"))) + (add-after 'chdir 'find-linux-limits-h + (lambda* (#:key inputs #:allow-other-keys) + ;; FIXME: This is a very ugly way to make + ;; #include <linux/limits.h> + ;; work---what is a better way? + (setenv "CPATH" + (list->search-path-as-string + (cons #$(file-append + (this-package-native-input "clang-toolchain") + "/include") + (cond + ((getenv "CPATH") + => search-path-as-string->list) + (else + '()))) + ":"))))))) + (home-page "https://github.com/tpoechtrager/cctools-port") + (synopsis "Darwin's @code{cctools} and @code{ld64}") + ;; Confusingly enough, the program is called ld64, but the command is + ;; just ld (with no symlink), so @command{ld64} would be wrong. + (description + "Darwin's @code{cctools} are a set of tools somewhat similar in purpose +to GNU Binutils, but for Mach-O files targeting Darwin. The suite includes +@command{install_name_tool}, @command{libtool}, and other specialized tools in +addition to standard utilities like @command{ld} and @command{as}. This +package provides portable versions of the tools.") + (license license:apsl2))))