From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: Re: [PATCH] gnu: rustc: Add LIBRARY_PATH search path. Date: Sun, 29 Jan 2017 21:34:08 +1000 Message-ID: References: <20170127120213.3746-1-donttrustben@gmail.com> <20170127120213.3746-2-donttrustben@gmail.com> <87inp01cfi.fsf@kirby.i-did-not-set--mail-host-address--so-tickle-me> <37744b8c-255c-28d0-04c1-9385f384d473@uq.edu.au> <87vasytypw.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34266) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXnkj-0008Kt-Ej for guix-devel@gnu.org; Sun, 29 Jan 2017 06:34:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXnkg-0007IH-CZ for guix-devel@gnu.org; Sun, 29 Jan 2017 06:34:37 -0500 Received: from mailhub1.soe.uq.edu.au ([130.102.132.208]:42601 helo=newmailhub.uq.edu.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXnkf-0007HE-QH for guix-devel@gnu.org; Sun, 29 Jan 2017 06:34:34 -0500 In-Reply-To: <87vasytypw.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 On 29/01/17 11:57, Chris Marusich wrote: > Ben Woodcroft writes: > >> I didn't have any problem compiling and linking pure rust programs - >> that commit fixed that issue, but when trying to link rust programs to >> non-rust libraries such as zlib the linker did not look in the lib of >> the profile (unless gcc was also in the profile, I guess). I was >> specifically looking to include rust-htslib in a crate I am building, >> to be concrete. > I'm not too familiar with rust, but isn't the linker supposed to look in > the store, not in your user profiler? My understanding is that we > usually don't want to compose components dynamically like that, since it > causes problems (e.g., incomplete deployment due to "missing" stuff in > the user's profile). I'm not too familiar either, but I think of it like this. Imagine we had a hypothetical rust-no-gcc-build-system for building rust packages which did not inherit from gnu-build-system so did not have gcc as an input. Then, building rust packages which linked to libraries such as zlib would not work, even if zlib were specified as an input, because LIBRARY_PATH is not set. In that case, the compilation/linking with rust is much like compilation/linking with gcc - it requires LIBRARY_PATH. Does that make sense? Thanks, ben.