From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: Re: [PATCH] gnu: rustc: Add LIBRARY_PATH search path. Date: Sat, 28 Jan 2017 09:35:35 +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> <87ziic2imm.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54489) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cXG3d-0001WJ-4R for guix-devel@gnu.org; Fri, 27 Jan 2017 18:35:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cXG3Z-0002mE-WA for guix-devel@gnu.org; Fri, 27 Jan 2017 18:35:53 -0500 In-Reply-To: <87ziic2imm.fsf@gnu.org> 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: =?UTF-8?Q?Ludovic_Court=c3=a8s?= , Marius Bakke Cc: guix-devel@gnu.org On 28/01/17 09:22, Ludovic Court=C3=A8s wrote: > Marius Bakke skribis: > >> Hi Ben, >> >> Ben Woodcroft writes: >> >>> * gnu/packages/rust.scm (rustc)[native-search-paths]: New field. >> [...] >> >>> + (native-search-paths >>> + (list (search-path-specification >>> + (variable "LIBRARY_PATH") >>> + (files '("lib" "lib64"))))) >> This seems odd. This search path is for glibc, no? > It=E2=80=99s honored by GCC (not to be confused with LD_LIBRARY_PATH.) > > Does rustc invoke gcc, or does it just happen to use a same-named > variable? It uses gcc. The specific error I was getting was this: error: linking with=20 `/gnu/store/y1g6991kxvdk4vxhsq07r5saww30v8dq-gcc-4.9.4/bin/gcc` failed:=20 exit code: 1 | =3D note:=20 "/gnu/store/y1g6991kxvdk4vxhsq07r5saww30v8dq-gcc-4.9.4/bin/gcc"=20 "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib"=20 "/home/ben/git/genome_assigner/target/debug/genome_assigner.0.o" "-o"=20 "/home/ben/git/genome_assigner/target/debug/genome_assigner"=20 "-Wl,--gc-sections" "-pie" "-nodefaultlibs" "-L"=20 "/home/ben/git/genome_assigner/target/debug/deps" "-L"=20 "/home/ben/.cargo/registry/src/github.com-1ecc6299db9ec823/rust-htslib-0.= 10.0/htslib"=20 "-L"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib"=20 "-Wl,-Bstatic" "-Wl,-Bdynamic"=20 "/home/ben/git/genome_assigner/target/debug/deps/librust_htslib-ccb3e9d7a= dc535c1.rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/libitertools-42383a1bef7= 5ce72.rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/libcustom_derive-bf1b4c7= d3ee792c6.rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/libieee754-afaaaec92cb01= ddb.rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/liblazy_static-3a04918be= 71c80ee.rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/libquick_error-729eced69= 3f2612d.rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/liblibc-29ef97a68464c2b7= .rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/liburl-30c51e30991892cc.= rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/libnewtype_derive-154c39= 7f9f0bae71.rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/libidna-82ebdb343d6c1855= .rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/libunicode_normalization= -77ce7c413abacd3f.rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/libunicode_bidi-eaf420bc= 9a69d19f.rlib"=20 "/home/ben/git/genome_assigner/target/debug/deps/libmatches-3614821dd5ceb= 75c.rlib"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib/libstd-f5a209a9.rlib"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib/libpanic_unwind-f5a209a9.rlib"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib/libunwind-f5a209a9.rlib"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib/librand-f5a209a9.rlib"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib/libcollections-f5a209a9.rlib"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib/librustc_unicode-f5a209a9.rlib"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib/liballoc-f5a209a9.rlib"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib/liballoc_jemalloc-f5a209a9.rlib"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib/liblibc-f5a209a9.rlib"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib/libcore-f5a209a9.rlib"=20 "/gnu/store/8mdrn8i530qh00l4xsmjlj1q7mzsj5a0-rustc-1.14.0/lib/rustlib/x86= _64-unknown-linux-gnu/lib/libcompiler_builtins-f5a209a9.rlib"=20 "-l" "z" "-l" "util" "-l" "dl" "-l" "pthread" "-l" "gcc_s" "-l"=20 "pthread" "-l" "c" "-l" "m" "-l" "rt" "-l" "util" =3D note: ld: cannot find -lz collect2: error: ld returned 1 exit status Thanks, ben.