GNU bug report logs - #55998
[PATCH] gnu: Add cctools.

Previous Next

Package: guix-patches;

Reported by: Philip McGrath <philip <at> philipmcgrath.com>

Date: Wed, 15 Jun 2022 17:17:02 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 55998 in the body.
You can then email your comments to 55998 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to philip <at> philipmcgrath.com, guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 17:17:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Philip McGrath <philip <at> philipmcgrath.com>:
New bug report received and forwarded. Copy sent to philip <at> philipmcgrath.com, guix-patches <at> gnu.org. (Wed, 15 Jun 2022 17:17:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 13:15:49 -0400
* 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

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 <at> 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))))

base-commit: 8a04ac4b2f5d356719d896536dabc95a9520c938
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 18:33:01 GMT) Full text and rfc822 format available.

Message #8 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 20:32:21 +0200
[Message part 1 (text/plain, inline)]
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.

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 18:47:02 GMT) Full text and rfc822 format available.

Message #11 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 20:45:54 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 18:54:02 GMT) Full text and rfc822 format available.

Message #14 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 20:53:47 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 18:56:02 GMT) Full text and rfc822 format available.

Message #17 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 20:55:58 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 18:57:02 GMT) Full text and rfc822 format available.

Message #20 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 20:56:34 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 19:07:01 GMT) Full text and rfc822 format available.

Message #23 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: Maxime Devos <maximedevos <at> telenet.be>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 15:06:18 -0400
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




Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 19:20:02 GMT) Full text and rfc822 format available.

Message #26 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: Maxime Devos <maximedevos <at> telenet.be>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 15:19:06 -0400
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




Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 19:22:02 GMT) Full text and rfc822 format available.

Message #29 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: Maxime Devos <maximedevos <at> telenet.be>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 15:21:52 -0400
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




Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 19:24:01 GMT) Full text and rfc822 format available.

Message #32 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 21:23:48 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 19:36:01 GMT) Full text and rfc822 format available.

Message #35 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: Maxime Devos <maximedevos <at> telenet.be>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 15:34:53 -0400
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




Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 19:36:02 GMT) Full text and rfc822 format available.

Message #38 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 21:35:15 +0200
[Message part 1 (text/plain, inline)]
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.

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 20:05:01 GMT) Full text and rfc822 format available.

Message #41 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 22:04:21 +0200
[Message part 1 (text/plain, inline)]
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 <at> gnu.org/msg61160.html>.
They need to be removed, e.g. with delete-file and find-files in a
snippet.

Greetings,
Maxime.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 20:09:02 GMT) Full text and rfc822 format available.

Message #44 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 22:07:47 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 20:18:01 GMT) Full text and rfc822 format available.

Message #47 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 22:17:07 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 20:19:02 GMT) Full text and rfc822 format available.

Message #50 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 22:18:32 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 20:24:02 GMT) Full text and rfc822 format available.

Message #53 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 22:23:27 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 21:01:02 GMT) Full text and rfc822 format available.

Message #56 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: Maxime Devos <maximedevos <at> telenet.be>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 17:00:23 -0400
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




Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 21:12:02 GMT) Full text and rfc822 format available.

Message #59 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 23:11:22 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Wed, 15 Jun 2022 21:21:01 GMT) Full text and rfc822 format available.

Message #62 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: "(" <paren <at> disroot.org>
To: "Philip McGrath" <philip <at> philipmcgrath.com>, "Maxime Devos"
 <maximedevos <at> telenet.be>, <55998 <at> debbugs.gnu.org>
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Wed, 15 Jun 2022 22:20:34 +0100
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?




Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Thu, 16 Jun 2022 22:30:02 GMT) Full text and rfc822 format available.

Message #65 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: 55998 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Thu, 16 Jun 2022 18:29:25 -0400
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Thu, 16 Jun 2022 23:30:02 GMT) Full text and rfc822 format available.

Message #68 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: 55998 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Thu, 16 Jun 2022 19:29:02 -0400
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Fri, 17 Jun 2022 06:15:01 GMT) Full text and rfc822 format available.

Message #71 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Maxime Devos <maximedevos <at> telenet.be>
To: Philip McGrath <philip <at> philipmcgrath.com>, 55998 <at> debbugs.gnu.org
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Fri, 17 Jun 2022 08:14:18 +0200
[Message part 1 (text/plain, inline)]
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.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Fri, 17 Jun 2022 11:52:02 GMT) Full text and rfc822 format available.

Message #74 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: 55998 <at> debbugs.gnu.org
Cc: "\(" <paren <at> disroot.org>, Maxime Devos <maximedevos <at> telenet.be>,
 Philip McGrath <philip <at> philipmcgrath.com>
Subject: [PATCH v2] gnu: Add cctools.
Date: Fri, 17 Jun 2022 07:51:09 -0400
* gnu/packages/darwin.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/packages/darwin.scm (cctools): New variable.
---

Hi,

Here is a v2! I've removed generated Autotools files, which fixes the
problem finding the <linux/limits.h> header, and used the existing Guix
package for `libobjc2` rather than the bundled copy. I also removed the
obsolete, unused GDB header.

 -Philip

 gnu/local.mk            |   1 +
 gnu/packages/darwin.scm | 107 ++++++++++++++++++++++++++++++++++++++++
 2 files changed, 108 insertions(+)
 create mode 100644 gnu/packages/darwin.scm

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..88990d0404
--- /dev/null
+++ b/gnu/packages/darwin.scm
@@ -0,0 +1,107 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2022 Philip McGrath <philip <at> 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 autotools)
+  #:use-module (gnu packages gnustep)
+  #: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))
+         (snippet
+          #~(begin
+              (use-modules (guix build utils))
+              (with-directory-excursion "cctools"
+                ;; use system libobjc2
+                (substitute* "configure.ac"
+                  (("AC_CONFIG_FILES[(]\\[libobjc2/Makefile][)]")
+                   ""))
+                (substitute* "Makefile.am"
+                  (("SUBDIRS=libobjc2 ")
+                   "SUBDIRS="))
+                (substitute* "otool/Makefile.am"
+                  (("\\$[(]top_builddir[)]/libobjc2/libobjc\\.la")
+                   "-lobjc")
+                  (("-I\\$[(]top_srcdir[)]/libobjc2")
+                   ""))
+                ;; delete files
+                (for-each (lambda (pth)
+                            (when (file-exists? pth)
+                              (delete-file-recursively pth)))
+                          `("include/gnu/symseg.h" ;; obsolete
+                            "libobjc2" ;; unbundle
+                            ;; generated files:
+                            "compile"
+                            "config.guess"
+                            "config.sub"
+                            "configure"
+                            "install-sh"
+                            "ltmain.sh"
+                            "missing"
+                            ,@(find-files "." "^Makefile\\.in$"))))))))
+      (inputs (list libobjc2
+                    clang-toolchain))
+      (native-inputs (list libtool
+                           autoconf
+                           automake
+                           clang-toolchain))
+      (build-system gnu-build-system)
+      (arguments
+       (list
+        #:phases
+        #~(modify-phases %standard-phases
+            (add-after 'unpack 'chdir
+              (lambda args
+                (chdir "cctools"))))))
+      (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{dyldinfo}, 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))))

base-commit: 673983c9c6e86596abc9082e47319285674d7eda
-- 
2.32.0





Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Fri, 17 Jun 2022 13:20:02 GMT) Full text and rfc822 format available.

Message #77 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: 55998 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Fri, 17 Jun 2022 07:09:48 -0400
[Message part 1 (text/plain, inline)]
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 <at> 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

[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Fri, 17 Jun 2022 13:20:03 GMT) Full text and rfc822 format available.

Message #80 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: 55998 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Fri, 17 Jun 2022 07:28:48 -0400
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Fri, 17 Jun 2022 13:20:03 GMT) Full text and rfc822 format available.

Message #83 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Philip McGrath <philip <at> philipmcgrath.com>
To: 55998 <at> debbugs.gnu.org, Maxime Devos <maximedevos <at> telenet.be>
Subject: Re: [bug#55998] [PATCH] gnu: Add cctools.
Date: Fri, 17 Jun 2022 07:19:13 -0400
[Message part 1 (text/plain, inline)]
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
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#55998; Package guix-patches. (Sun, 19 Jun 2022 21:02:02 GMT) Full text and rfc822 format available.

Message #86 received at 55998 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Maxime Devos <maximedevos <at> telenet.be>
Cc: 55998 <at> debbugs.gnu.org, Philip McGrath <philip <at> philipmcgrath.com>
Subject: Re: bug#55998: [PATCH] gnu: Add cctools.
Date: Sun, 19 Jun 2022 23:01:32 +0200
Hi,

Maxime Devos <maximedevos <at> 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 <at> 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’.




Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Sun, 19 Jun 2022 21:03:02 GMT) Full text and rfc822 format available.

Notification sent to Philip McGrath <philip <at> philipmcgrath.com>:
bug acknowledged by developer. (Sun, 19 Jun 2022 21:03:02 GMT) Full text and rfc822 format available.

Message #91 received at 55998-done <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Philip McGrath <philip <at> philipmcgrath.com>
Cc: "\(" <paren <at> disroot.org>, Maxime Devos <maximedevos <at> telenet.be>,
 55998-done <at> debbugs.gnu.org
Subject: Re: bug#55998: [PATCH] gnu: Add cctools.
Date: Sun, 19 Jun 2022 23:02:22 +0200
Hi,

Philip McGrath <philip <at> philipmcgrath.com> skribis:

> * gnu/packages/darwin.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
> * gnu/packages/darwin.scm (cctools): New variable.

Applied, thanks, and thanks Maxime for reviewing!

(The whole discussion was interesting read for me.)

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 18 Jul 2022 11:24:12 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 280 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.