From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 1/7] build-system: Add cargo build system. Date: Tue, 13 Dec 2016 23:11:46 +0100 Message-ID: <87inqnmqcd.fsf@gnu.org> References: <20160928151538.11679-1-david@craven.ch> <87shsccwpv.fsf@gnu.org> <87k2b9s3e5.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> <87oa0lchl1.fsf@gnu.org> <877f73sqbc.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58581) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cGvIg-0003iG-Bf for guix-devel@gnu.org; Tue, 13 Dec 2016 17:11:55 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cGvIc-0005E6-Bh for guix-devel@gnu.org; Tue, 13 Dec 2016 17:11:54 -0500 In-Reply-To: (David Craven's message of "Tue, 13 Dec 2016 19:07:17 +0100") 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: David Craven Cc: guix-devel David Craven skribis: >> Hmm why is there a second one? =E2=80=98gnu-build-system=E2=80=99 alrea= dy provides gcc >> and gcc:lib as implicit inputs, so maybe it=E2=80=99s just a matter of r= emoving >> =E2=80=98gcc=E2=80=99 from Rust=E2=80=99s =E2=80=98inputs=E2=80=99? > > So we do have an implicit gcc:lib package as an input. But I have to patc= helf > the rustc binaries and libraries so I need a way to retrieve the gcc lib = output. > I can do (assoc-ref inputs "gcc") but how do I get a reference to the > lib output? > (assoc-ref* inputs "gcc" "lib") doesn't work... So I add ("gcc:lib" > ,gcc "lib") explicitly > to the inputs so that I can retrieve it. This results in slightly > different versions > being included. OK, got it. Then you should probably be able to do: (inputs `(("gcc:lib" ,(canonical-package gcc) "lib") =E2=80=A6)) >> When you do =E2=80=98guix build rust -s i686-linux=E2=80=99, you get 32-= bit packages. >> Is that enough or am I missing something? > > The problem here is that we are patching precompiled binaries for i686 to= get > them to run with guix. So I need to get a reference to a 32-bit glibc > from within the package definition. I think that we'd have to --enable-mu= ltilib. > I don't know if we can make it a separate output and how we can prevent it > from being added to %final-inputs by default. And then we need a way of > obtaining it from within a package definition which amounts to the same > problem as with gcc:lib. We don=E2=80=99t currently --enable-multilib, but you could force a referen= ce to a 32-bit libc with this hack: (inputs `(("glibc32" ,(package (inherit glibc) (arguments '(#:system "i686-linux" =E2=80=A6)))))) That=E2=80=99s unnecessary when the system is already "i686-linux", of cour= se. Would that help? Cheers, Ludo=E2=80=99.