From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Guix on macOS Date: Fri, 13 Oct 2017 13:47:49 +0200 Message-ID: <87vajjfevu.fsf@elephly.net> References: <87bmldavre.fsf@gmail.com> <87efq8pwrf.fsf@gnu.org> <87mv4viknx.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:56510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e2ygf-0000lV-I9 for guix-devel@gnu.org; Fri, 13 Oct 2017 08:03:34 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e2ygW-0005F0-2C for guix-devel@gnu.org; Fri, 13 Oct 2017 08:03:33 -0400 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21016) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1e2ygV-0005Eo-Qs for guix-devel@gnu.org; Fri, 13 Oct 2017 08:03:23 -0400 In-reply-to: <87mv4viknx.fsf@gmail.com> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Chris Marusich Cc: guix-devel@gnu.org Chris Marusich 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