[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Guix on macOS
From: |
Chris Marusich |
Subject: |
Re: Guix on macOS |
Date: |
Fri, 13 Oct 2017 00:14:42 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.3 (gnu/linux) |
address@hidden (Ludovic Courtès) writes:
> First of all, it’s never been a goal of Guix to run on non-GNU systems.
> Now, I have nothing against it in principle, as long as (1) this can be
> achieved in a maintainable way, and (2) the targeted user-land software
> is free and buildable from source.
I understand, and I agree with your criteria.
I don't want to use Guix on macOS to package, promote, or make it easy
to use non-free software. I also don't want to port Guix to macOS in a
way that's difficult to maintain.
I want users and developers who are currently using macOS to be able to
easily use Guix and all the free software that it provides. To borrow
the language used in the "GNU Emacs FAQ for MS Windows", I hope that the
experience of using GNU Guix on macOS will give programmers a taste of
freedom, and that this will later inspire them to move to a free
operating system such as GNU/Linux (hopefully one that uses Guix, like
GuixSD!) [1]. I think this is a reasonable motivation.
> I suspect macOS fails criterion #2. Back in the day (not sure if that’s
> still the case), Nix would bootstrap using the system’s compiler and C
> library (which meant that things were likely to break in subtle ways on
> macOS upgrades.)
>
> As for criterion #1, to me, that pretty much means sticking to the GNU
> libc. From my experience on Nixpkgs, having to deal with different C
> libraries is a real burden. It also leads to a situation where you have
> second-class systems because they use an alternate libc and it’s not
> uncommon for packages to fail to build against that libc. To put it
> differently: it’s already difficult enough to have *one* OS working.
I haven't yet looked at how Nix bootstraps on macOS. I'll do that and
update this thread if I find any useful information to share.
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? Please understand that I'm genuinely curious,
and I just want to help. I might be missing some information that's
obvious to others. If there are gaps in my understanding, please help
me to fill them.
I imagine that there might be other ways to get Guix working on macOS.
Here are some possibilities that I've thought of or that others have
already mentioned:
* Compile Guix (and its bootstrap binaries, I guess?) natively for
x86_64-darwin on macOS using Xcode, etc. This seems undesirable for
a lot of reasons. Some reasons I can think of are: the build
process would rely on non-free software, it probably wouldn't be
easily reproducible, and it would probably place a significant
additional burden on the Guix maintainers. I suppose the only
saving grace in this case might be that once we had a working Guix
(with bootstrap binaries) for macOS, call it G1, we might be in a
position to use G1 to reproducibly build Guix (with GNU libc) on
macOS going forward.
* Run Guix compiled for x86_64-linux on macOS using some kind of a
shim layer. This is pretty vague, but not without precedent:
consider virtual machines, WINE, and similar technologies. This
seems undesirable for a lot of reasons. Some reasons I can think of
are: any solution like this would probably be fragile, and as far as
I know there is no turn-key solution for running ELF executables on
macOS, so we'd have to build our own, and building our own would
entail the same kinds of problems as mentioned in the previous
bullet point.
I'd love to hear any other ideas anyone might have! Cross-compiling
seems like one possible way forward; however, I don't know if
cross-compiling is feasible. I hope it is.
> I’m afraid this is not the answer you were looking for. WDYT?
This is exactly what I was hoping for: the start of a discussion! If we
can get Guix working on macOS while meeting the criteria you mentioned,
I think it'd be great for the reasons I mentioned at the start of this
email. If it isn't feasible, then I'd like to understand why.
Footnotes:
[1]
https://www.gnu.org/software/emacs/manual/html_node/efaq-w32/Why-Emacs-on-Windows.html#Why-Emacs-on-Windows
[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".
--
Chris
signature.asc
Description: PGP signature
- Guix on macOS, Chris Marusich, 2017/10/11
- Re: Guix on macOS, Konrad Hinsen, 2017/10/12
- Re: Guix on macOS, Ludovic Courtès, 2017/10/12
- Re: Guix on macOS, Christopher Allan Webber, 2017/10/12
- Re: Guix on macOS, Ricardo Wurmus, 2017/10/12
- Re: Guix on macOS,
Chris Marusich <=
- Re: Guix on macOS, Ricardo Wurmus, 2017/10/13
- Re: Guix on macOS, Ludovic Courtès, 2017/10/13
- Re: Guix on macOS, Konrad Hinsen, 2017/10/13
- Re: Guix on macOS, Ricardo Wurmus, 2017/10/13
- Re: Guix on macOS, Christopher Allan Webber, 2017/10/13
- Re: Guix on macOS, Konrad Hinsen, 2017/10/13
- Re: Guix on macOS, Adonay Felipe Nogueira, 2017/10/25
- Re: Guix on macOS, Chris Marusich, 2017/10/27
- Re: Guix on macOS, Hartmut Goebel, 2017/10/27
- Building Docker images of GuixSD, Ludovic Courtès, 2017/10/28