guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Guix on macOS


From: Ricardo Wurmus
Subject: Re: Guix on macOS
Date: Fri, 13 Oct 2017 13:47:49 +0200
User-agent: mu4e 0.9.18; emacs 25.3.1

Chris Marusich <address@hidden> writes:

> Currently, I hope that we can get Guix working on macOS via a plan like
> the following:
>
>   1) On an x86_64-linux GuixSD system, use Guix to cross-build Guix for
>      the x86_64-darwin target [2].  We would use GNU libc.
>
>   2) Install the output of (1) on a macOS system, following a procedure
>      similar to the one in the manual for binary installation ((guix)
>      Binary Installation).
>
> Is this plan feasible?

I don’t think it is.   You wrote:

> [2] The string "x86_64-darwin" is used by Nix (it also shows up in some
> Guix files), and it seems to be synonymous with "x86_64-apple-darwin".
> If you run a command like "gcc -dumpmachine" on a recent version of
> macOS, you'll see something like "x86_64-apple-darwin16.7.0".

AFAIK on macOS “gcc” and “g++” are just aliases for clang.  In order to
build a version of GCC that can build binaries for macOS you need XCode
or parts of it (the libraries it provides).

There is no usable port of the GNU C library for Darwin, so you must
link with the non-free C library provided by XCode.  This means that
step 1 won’t work.

The C library abstracts away the peculiarities of the kernel.  Without a
maintained port of the GNU C library for Darwin I see no way to build
software targeting macOS without XCode.

--
Ricardo

GPG: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
https://elephly.net




reply via email to

[Prev in Thread] Current Thread [Next in Thread]