[PATCH] gnu: Add cctools.

  • Done
  • quality assurance status badge
Details
4 participants
  • Ludovic Courtès
  • Maxime Devos
  • (
  • Philip McGrath
Owner
unassigned
Submitted by
Philip McGrath
Severity
normal
P
P
Philip McGrath wrote on 15 Jun 2022 19:15
(address . guix-patches@gnu.org)
25870e3b599bef45e57c972d019cbee3228e9e35.1655311589.git.philip@philipmcgrath.com
* 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


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

Toggle diff (107 lines)
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))))

base-commit: 8a04ac4b2f5d356719d896536dabc95a9520c938
--
2.32.0
M
M
Maxime Devos wrote on 15 Jun 2022 20:32
e7f83dbba22863186064ec89aa7ebfb11f703861.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
Toggle quote (3 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqoltRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7jvZAPsHE0wwpe3Pqoy9edVmnvcPRWQx
NF/Z+0k6Ou1bm4qoCQEA9mmx+Nxm2PYwdwl+V1a18Z5k5kT7U74hIfoF4OG/JQA=
=NqxZ
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 15 Jun 2022 20:45
615afa0c32b6815e175915f9b15c174ab6a81f6a.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
Toggle quote (2 lines)
> +      (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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqoo4xccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7lBhAP9DeTldtkXsIDamZ+LN8eNNlbZO
Gim42+0D6UMgP218FwEAmn+PX4mEyPfPNwWWIMb96Lgs8XVxtjGA34+5qGDDYAw=
=o0Cs
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 15 Jun 2022 20:53
149964d020ce967474ce946eda5031fa7ed99245.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
Toggle quote (11 lines)
> +      (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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqoquxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7sZqAPsHTxFeXw0bF/HsNSRMr6zocEU1
MXlfK72jwCNJoGL+vwEApLa3YHvGtAAVHAdZjaOnPKjB4ZVVExfKl8dJMnrp6gQ=
=MN/2
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 15 Jun 2022 20:55
6213c4a5a183b3ed1428937d576fed8f2fa1ce9f.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
Toggle quote (5 lines)
> +                ;; 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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqorPhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7h6eAQCkD5o1z+k2IOvSzKdJ9yIbLbHL
6W1VYs4gDmgn28mKdgEAghGR3p4n0KSJAwWCgjuWy/1wISEHQkI3lJPhLGrzCAg=
=ttrG
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 15 Jun 2022 20:56
25c03c8cf8d1a629c383be1a22ae5c27bab0bf96.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
Toggle quote (2 lines)
> +      (native-inputs (list clang-toolchain))

Why? Would the standard GCC compiler suffice?

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqorYhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vVcAQCR8NW9i7Yxun4EcWpilx8mUmJC
wxG+12MfDLnEN9/UwwD7BAOhjmvU7wsaGFaW/CxcngV5Ch26E2oMnb+0eXjR6go=
=LNW3
-----END PGP SIGNATURE-----


P
P
Philip McGrath wrote on 15 Jun 2022 21:06
a4a872dd-eeb3-3a88-32c0-e7c75389b81b@philipmcgrath.com
On 6/15/22 14:45, Maxime Devos wrote:
Toggle quote (19 lines)
> 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

P
P
Philip McGrath wrote on 15 Jun 2022 21:19
b4e4c72d-de2d-4df3-f3f0-54bf0cbf9b46@philipmcgrath.com
On 6/15/22 14:53, Maxime Devos wrote:
Toggle quote (16 lines)
> 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
P
P
Philip McGrath wrote on 15 Jun 2022 21:21
14e21a26-b885-afa0-6614-c36e47c4e5b6@philipmcgrath.com
On 6/15/22 14:56, Maxime Devos wrote:
Toggle quote (6 lines)
> 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
M
M
Maxime Devos wrote on 15 Jun 2022 21:23
8de92ae5778be984a4eec53e0349e33d1a259c0c.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 15:21 [-0400]:
Toggle quote (3 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqoxxBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7kAzAP9Fuy3p1tBy0SsJHKrj6kCgL+vM
awAPGTbfZ/iBeD3BkwD/YVnW31vOxxkPvyITEx+8QOWrNAPZucX8x68/S8z1KgI=
=D3IH
-----END PGP SIGNATURE-----


P
P
Philip McGrath wrote on 15 Jun 2022 21:34
9d532cc8-a87b-1ccd-a90b-5c14eca19254@philipmcgrath.com
On 6/15/22 14:55, Maxime Devos wrote:
Toggle quote (21 lines)
> 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
M
M
Maxime Devos wrote on 15 Jun 2022 21:35
401cbe02c58323fd1a52de199e3312b04ca411f0.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 15:06 [-0400]:
Toggle quote (7 lines)
> 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.

Toggle quote (2 lines)
> 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.

Toggle quote (3 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqo0cxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7vCtAP92YHzsNXVt3ODrrbc79Oc9KNVf
GCmxHqrrfzFEbx/NcwEAwoFPiGND5gdA+kcvEUNKws0NE6LiT41ZU5kV91nuhQ8=
=1FTr
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 15 Jun 2022 22:04
499012ad52f131e8e8ce7aebbae120e619fd8e52.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
Toggle quote (8 lines)
> +      (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
They need to be removed, e.g. with delete-file and find-files in a
snippet.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqo7RRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7oVoAQC5lC/y745bI4lGXQSFOuofTI3r
hs119wpX1kZcG2LBKwEApSNaJhJIZSxqH01F+tyEZ1VsnGvy7w7pQxZaahcvlg4=
=nULz
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 15 Jun 2022 22:07
3c56e51f000c345e5bf0736a7be9ade3c12a4c96.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 15:19 [-0400]:
Toggle quote (4 lines)
> 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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqo8ExccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uehAP9AtBaUzM/PcQtTQEq6m3xgpgjX
Cw1SRt8BHqVs61diYwEA3lwpowrwBYGg49LnRpffS6fEF8lahNFQRlTJEMvDpAU=
=+OQV
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 15 Jun 2022 22:17
82344b67085b139fdd35ccf1148d96b2be4a93c2.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
Toggle quote (2 lines)
> +      (license license:apsl2))))

-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqo+QxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7uIJAQDH20h3q4gva2e932z6CgHfH1Hv
o/bM8KEvmbaY4NpuVgD/ef9vFaYAukxr2zZX9ROlawBybrz3jD+EP2J4NsQQhQ8=
=MzwG
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 15 Jun 2022 22:18
994296da3538afd1113256a0128bce49d968741c.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
Toggle quote (2 lines)
> +      (license license:apsl2))))

There's some Expat licensed code as well:


Please investigate the rest as well.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqo+mBccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7segAP962R37PZxCfFh90XTzjMN/55GR
2toW+Agq0u0ItIhh2gEAvFICpjLqjej4JrMJyBtzGSH62YsS9lXxAKZcd5EmAgY=
=3Toz
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 15 Jun 2022 22:23
79abaddeee795c7e6626c136c43f2fede7a7259c.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 13:15 [-0400]:
Toggle quote (3 lines)
> +      (license license:apsl2))))


There's also the GDB General public license:


and BSD-3:


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.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqo/vxccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7pqcAQCr7qsUJu0kEIR6x+9oClrW+a8S
huWMpP4ypWo30asDvAEAt6hxJNSXVkwp6Q5CEVIaKCdt2aUyaVbc21DkVdqHIQs=
=mLmQ
-----END PGP SIGNATURE-----


P
P
Philip McGrath wrote on 15 Jun 2022 23:00
0de6f5e5-c58b-354f-3ee0-18e824b7779a@philipmcgrath.com
On 6/15/22 15:35, Maxime Devos wrote:
Toggle quote (21 lines)
> 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
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":

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:

Toggle quote (13 lines)
> 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
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
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
M
M
Maxime Devos wrote on 15 Jun 2022 23:11
ff734855d5d6b8552f73b5c3a36403bc40beb35e.camel@telenet.be
Philip McGrath schreef op wo 15-06-2022 om 17:00 [-0400]:
Toggle quote (5 lines)
> 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

Toggle quote (4 lines)
> 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?

Toggle quote (3 lines)
> I meant "community governance" broadly to include questions like,
> "Who decides what 'free' means?"

Ok, makes sense to me.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqpK+hccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qjmAQCNk0z1mhzUausChp7JQclNl0Jb
c+W/welg1d65QecOngD/QIDKpmX/Ajflq0DtGPdduizARhfdDyQt4SonBj9tjwk=
=gu1L
-----END PGP SIGNATURE-----


(
CKR0TCX37H8E.3F7YYLX34VEDI@guix-aspire
On Wed Jun 15, 2022 at 10:00 PM BST, Philip McGrath wrote:
Toggle quote (5 lines)
> 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?
P
P
Philip McGrath wrote on 17 Jun 2022 00:29
23593278.6Emhk5qWAg@avalon
On Wednesday, June 15, 2022 4:17:07 PM EDT Maxime Devos wrote:
Toggle quote (9 lines)
> 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>.

Toggle quote (5 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmKrrsUACgkQygNjjfo/
HHrQ5Q/+Ny+h/ZBLm5Bn5qbTCmA24VhlkFwt8SrM4Cd4MYSpzxWHJAGtP/RCXcRk
gnEkUGTbkpvyGRbA0dL4/kW3rcwMzDV4CxOGNCt7jEtTjqBKa76t4+LOJgmvvye3
rXNCz8P10j9PXTa60yyeeSICBCdLj9KTnkN6h33aa7pcB/fjnzaRioQj4E3qT/uN
lGUzGiJJmPQ1z2StVziVjfLpmUgqfN/7GiDGllI5C36FusY98emX37n5h5wknY0v
sg7tXQ01oTHaFdi3dRnWQABg7cfksodb34Te1vN9mNHKyvtRdW26vb+2tTn15YIi
lyC6ZIeVUMQb7AnFvkz2UPL7jaM4F9pjj1bgYkcCxYzYp2Ye+PPlk1LkJh6ZpKyV
2wixDamYNSiyA+XlH2Vme3rU2WZV7ii9WSy6lp3gLXyXN0oyA5eZ2iYUU76NGAMk
rtLreNToheluKFNmxcP8Z8OIiq50VxdfVZ5OF7o8a1NDAI3EEKq6PysrIcoSA1r+
Kp1y5riZ0bFc1dH1xgzUKxE2bX9jRtSMx/bAL1OF2VTYShClcK0C7+6IL9o4pRcm
QqYjvMGeXcXDYJmKb+MwOexBtE2moIlI6iHx/ozt5YC7VjT2gEsb8UQAz/cZ25V9
pcY10uPFRAqkczn8vRZWichoVzEZCglZHjvkOokba8Bv9pGFLpY=
=UZfw
-----END PGP SIGNATURE-----


P
P
Philip McGrath wrote on 17 Jun 2022 01:29
3218707.NG923GbCHz@avalon
On Wednesday, June 15, 2022 4:23:27 PM EDT Maxime Devos wrote:
Toggle quote (9 lines)
> 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.

Toggle quote (25 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmKrvL4ACgkQygNjjfo/
HHrcaBAAiLm0QF9UkdweX98giekI4i1XU4KqP1aZrqgUHQtw3kPRuFH0Gy7/3sw5
WTLHcMpfXXwGdxml5a58dlEF8v2r+hoelMasAsJf+huK3HMXcaXA8o368la1Cn1L
Knwp09c0wwOXLkXTidj5AvO0WGo72S6IfZMe2QbHhsH8g15W16R78D6OZYz0kCN5
JQD/247n0V1Nbsc4eLFAmek/OVh04qqYMerZGwOpOdrb0gfJDFpvrlFdUpQ6TAab
s3PFemdg4mPwLGx6JDJDbCcmGC2ewffNO21fR235lzgeNGDp76XePIFETQ3Gbn9P
/celvn5/e+4rSq10DX3E3WbWhvroqG9fa4NGgJgaEgHGi8dW/mVPPwAsz0a9wzsV
vxFXDY1me8Vscs86vwgv/C7bXSnYuIq0jJI5eW6Su5X5g88PJXXvab3C2iEH/Vy5
iNjLBAZ5QXB32hQ8imscYO9A6ExgXTHsai4T2WR7fKa7h88oDp276nGDq7AweU8W
vKP+2ixbGyhGs6Ve4EBdelT25xtr1qhWH2uUQF94wfyB30/H/xPk3hMkNS9+ItTJ
H/ZEJrJIczvhyQtX6qwCb5ucgTbwnKr11vaZIO/VFhv7aS+zrsrpGouzg0txwca1
0tAwJv1w1fQzCeLMsC01KxRQcO9dhp0x6Crxs0bKh4HBGktheXQ=
=v069
-----END PGP SIGNATURE-----


M
M
Maxime Devos wrote on 17 Jun 2022 08:14
ab02580ca510f4be3680476bdbea0de7d4612aa9.camel@telenet.be
Philip McGrath schreef op do 16-06-2022 om 18:29 [-0400]:
Toggle quote (4 lines)
> 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:


that was somewhere in between the two endpoints.

Greetings,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYqwbuhccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7qYOAQDdyhv7lmI/xeZqVhg1QWYtBYlN
vO0c3LoU+s+KxdggugD/d0uHmUtHLdc5ysqjyr3jxh/7abj2yESLDV0GMYPqCgs=
=1jpy
-----END PGP SIGNATURE-----


P
P
Philip McGrath wrote on 17 Jun 2022 13:51
[PATCH v2] gnu: Add cctools.
(address . 55998@debbugs.gnu.org)
ed66c0cef80d1b98fb528228660b8c8c4da223cd.1655465599.git.philip@philipmcgrath.com
* 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

Toggle diff (129 lines)
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@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
P
P
Philip McGrath wrote on 17 Jun 2022 13:09
Re: [bug#55998] [PATCH] gnu: Add cctools.
1819444.tdWV9SEqCh@avalon
On Wednesday, June 15, 2022 4:04:21 PM EDT Maxime Devos wrote:
Toggle quote (17 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmKsYPwACgkQygNjjfo/
HHoHbxAAjl99obr992wGAw9Fyr6RsZiDc7xNZfw+Rq3rwF6tAlek7BlLoWU/FfoB
hE/QRHga80VzhySmz5fmRBOdir7rRyxiLG+0Z3fsMUE6sAM5aztf4XAxGXpcQn07
rgwtQFEQNXe8O88QNWzWeuFLvYVQj64or8bqHha9hlIhhSrRe2+mNjZnyJEy+eLZ
lK5wxBaI8YkOZSq7kFseiI2/J08ZIhyQz+9UHsHn5ZLPI7/OSkccY2AyQqzQu0v3
IJtPpMKLRJWDFWVbofnwYNYNB8O8UATRS2MnmMbZ7L/JFqhjFjWYp4S3h9vBvkUT
QF4TSpGUh6Fs6ySw8uL8DlLpaVgQof1RWJEerTgde2qqXuSjxl0U8Xk9fvSMVcqD
OOCKVbiEHK4S7nevCmIcPSYak5NK3d1dUBrUKFqp9V+oS5I0H3HjuqFdk8Ujd9YE
4eCl6teKbEWb639hGzIz6G6suSVK5O9wVszaNxMb+FUppKW1GY8l2YyjROmEZFRA
Xhw6aAXrvtK/0n9Y8xP6ip0BNTOxqwtNTApZUviSOy1NIlNq4M6c9cu38yEu+wYv
eHMVv5CZGOQf5ozybW9LAhjs9ceRYFlWY2atCjoYnTskwzThpKctGOmcm8m3moAR
xV/o0QhChfQH7C8OYgveGx9pXgrza07RFmxfZ0gbnu15GswfAu8=
=J+LY
-----END PGP SIGNATURE-----


P
P
Philip McGrath wrote on 17 Jun 2022 13:28
7392720.EvYhyI6sBW@avalon
On Wednesday, June 15, 2022 4:07:47 PM EDT Maxime Devos wrote:
Toggle quote (9 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmKsZXAACgkQygNjjfo/
HHoOTA/+NSjtrQQ2k0snL8P6X0qQDayMry/6tEqUdMwLWroIP/ofghyC9ynzYC3h
Qe/Arcf7w0mYlUbVv3yKqlNw/PhE4yTNPB5pSNeZ0f9mi3Ur6I7f81RwqHxvaBp8
ahJwM/pvmSeMWn7us4F42+jGj0WW3+CkRMH5GCbK/QBvVqy/I8DWJ0NIDY4ympZ3
5hYlWD+kc5zFYIuhQ0L+tn1Wif5MFPFaeGPuYjn9ara58sheYl0ij3Qc+/lo+Syw
ikJMD8QE1ey3lpEw7yTbiVDSm7eOgH3mZkKxz4YmkiFSHlDFMZhXHH5Z1oKXcWbV
DptHvtnJx2Fc8nXSTRKF7HaewI8ECGFYDLr77wVV2dnfUmvq9UwyLMyTYRyh/eTw
gUfS6U1fxyq40OgRS9BP0tGKzTqProWbl/OBFX0CpVtvtj+Gl5whLyagWW4YLZh5
zr85d8MLzBpn97BNjfVqWTpsg6lpgjkmOLrCymB+9591KJxkn9xbkctOzC3mYeAp
71vZ8rNyxGCaBtIG81Pp4qBodA4ZT47z5cwcAqd/o2s4laS13JT3CjKXJgGRNGt2
Tpp/VCoyJsRBZ/BbNxVjeq1ecSTh+/g/Vs6gTgzpHVqzJdvOX7+RAIju63yABlZG
N3jt+tqM4Q1K+jqlW1rhSWBH4iMMynG2IbXin3YG8ZE4FmpF4oY=
=rPx7
-----END PGP SIGNATURE-----


P
P
Philip McGrath wrote on 17 Jun 2022 13:19
3179725.44csPzL39Z@avalon
On Wednesday, June 15, 2022 3:23:48 PM EDT Maxime Devos wrote:
Toggle quote (11 lines)
> 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
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEE9GWrrNY3rqwUFVXPygNjjfo/HHoFAmKsYzEACgkQygNjjfo/
HHqWWA/+IqSF7KhHlTNRnHy2ogBhVqM4HyEXPojisJunAElm7Dmcz9Fzq9nBtPq6
A3dfh3tM38KHmkswCEJn+LuzyQG9G91+EE8Ov6MTHnWTrcG7ER+2uSFeRe9oH75R
4jBrvSiAiwDK2RxOnwQ0R4hDI8DS8Wq18hDSaWXBltBWUz8/aDEMMH+OyZTqHLCl
/MEjSItLhO/zCxW0RkTykaJA6ENSQ8y0DaVS+xBOhhsOkv6ersmEbOrHCPuWxdGb
JSO4dsn6eh6IDmx4JjZ1wM3FnSjUieON0pwiTbWdDIbxaQL8BlWwxzQt1NFEP7I8
1L9bVedK6fa60XTVjS8mdhTsCHrl0BwPTSVIRgUq7Uh20GQM5Bk2FDSXO6vNd7+1
0+ZaEeqVo7PuEIBTJEKSB/N0WXILq17ahITleP98mkh7jQlrIeSoA8s6ip9rjPTw
kbJD1Xpa4N1ekynMuAEi/PTHL/GdUjsonZHQS1V5WC2NLGXoVQMtZfYqeMehujab
pqkU6TYaIKrQdsSVCiD0DGOV0SXluO5i9pCI/GcEToTZMTq2nnjg/On2D6QYL2Ha
5wy5PzInuVVp/2LiSGKlqDLFhUjo3EA8UIluT2rRuft6yQsjRepDy9Wf+Xl6Be0H
k8OzqVpyrmA8QvMBQlrAKzJqsgTzWFCA+SiL+M26dkbLMwEig6U=
=TsNn
-----END PGP SIGNATURE-----


L
L
Ludovic Courtès wrote on 19 Jun 2022 23:01
Re: bug#55998: [PATCH] gnu: Add cctools.
(name . Maxime Devos)(address . maximedevos@telenet.be)
878rpscqqb.fsf_-_@gnu.org
Hi,

Maxime Devos <maximedevos@telenet.be> skribis:

Toggle quote (16 lines)
> 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’.
L
L
Ludovic Courtès wrote on 19 Jun 2022 23:02
(name . Philip McGrath)(address . philip@philipmcgrath.com)
874k0gcqox.fsf_-_@gnu.org
Hi,

Philip McGrath <philip@philipmcgrath.com> skribis:

Toggle quote (4 lines)
> * 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’.
Closed
?