From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: "Cross"-Building for foreign ditros Date: Fri, 10 Apr 2020 11:36:33 +0200 Message-ID: <87eesvy95q.fsf@gnu.org> References: <7b69172b-32a1-3d92-b2fa-1a236413ed9b@crazy-compilers.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:50623) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMq5U-0005G8-Ec for guix-devel@gnu.org; Fri, 10 Apr 2020 05:36:37 -0400 In-Reply-To: <7b69172b-32a1-3d92-b2fa-1a236413ed9b@crazy-compilers.com> (Hartmut Goebel's message of "Thu, 9 Apr 2020 11:07:58 +0200") 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-mx.org@gnu.org Sender: "Guix-devel" To: Hartmut Goebel Cc: guix-devel Hi Hartmut, Hartmut Goebel skribis: > I would like to use Guix to set up a reproducible build environment for > building packages for a foreign distribution. Of course, this would not > use the guix build systems, but the foreign distro*s tools - which > itself should come from Guix. > > For example: Using /gnu/store/=E2=80=A6/bin/gcc and /gnu/store/=E2=80=A6/= bin/rpm for > building RPM packages for Fedora. To build RPM packages for Fedora, you really need to build within Fedora so that the package you build is known to work with the Fedora packages it depends on. Nixpkgs has tools to do that: https://github.com/NixOS/nixpkgs/tree/master/pkgs/build-support/vm Essentially you would boot a VM of that distro, but using our own kernel and initrd; the initrd would spawn something like marionette to instrument the system. From there, you would run the package build code, but attempting to use, for instance, their GCC and libraries instead of ours. HTH! Ludo=E2=80=99.