From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0 Subject: Re: rust: cargo build-system: how to handle libraries Date: Wed, 28 Dec 2016 09:26:52 +0000 Message-ID: <87bmvws8tf.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> References: <8760m5c4dv.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> <87eg0ss8xl.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> 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]:37269) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cMAVQ-0006Rp-2T for guix-devel@gnu.org; Wed, 28 Dec 2016 04:26:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cMAVM-0001ey-S1 for guix-devel@gnu.org; Wed, 28 Dec 2016 04:26:44 -0500 Received: from aibo.runbox.com ([91.220.196.211]:35572) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cMAVM-0001eq-Lv for guix-devel@gnu.org; Wed, 28 Dec 2016 04:26:40 -0500 In-Reply-To: <87eg0ss8xl.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> 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@gnu.org ng0 writes: > David Craven writes: > >>> We run (or this is the default) cargo with `--bin`, which is >>> necessary for everything which needs to be compiled and features >>> a Cargo.toml. >> >> All crates have a Cargo.toml file. The interesting crates are the ones with >> a Cargo.lock file. >> >>> To "build" libraries, we have to explicitly tell cargo to not >>> run/build/whatever with --bin ? >> >> Building libraries is currently not very useful at the moment, since they are >> not meant to be libraries in the C sense, but in the sense that it's a >> collection >> of source code that can be reused in a rust project. One can create a library >> in the C sense, but most crates do not do this and are not intended to be abi >> compatible with C. >> >>> Or do I have to interprete what I read a while ago "we just need >>> to copy the libraries to the store" as literally "if we encounter >>> no Cargo.toml, let's copy everything to the store as is"? >> >> If we encounter no Cargo.lock file it generally means the above. >> > > Thanks for your answer. > > But, ouch... note to self, packaging while hanging out with other > people to watch streamed talks sometimes does not work out. > The actual failure is different, the build system (currently) > expects a Cargo.toml everywhere, and the folder `libc-test' > doesn't seem to have one, breaking the build phase. Of course I meant Cargo.lock, not Cargo.toml ... so I know what I have to search for, and this makes it a bit easier than the previous search. > phase `unpack' succeeded after 0.1 seconds > starting phase `patch-usr-bin-file' > phase `patch-usr-bin-file' succeeded after 0.0 seconds > starting phase `patch-source-shebangs' > patch-shebang: ./ci/docker/arm-linux-androideabi/accept-licenses.sh: warning: no binary for interpreter `expect' found in $PATH > patch-shebang: ./ci/docker/arm-linux-androideabi/install-ndk.sh: changing `/bin/sh' to `/gnu/store/qkw4zrwfybxww8f56nkb6hggxambk89b-bash-4.4.0/bin/sh' > patch-shebang: ./ci/docker/arm-linux-androideabi/install-sdk.sh: changing `/bin/sh' to `/gnu/store/qkw4zrwfybxww8f56nkb6hggxambk89b-bash-4.4.0/bin/sh' > patch-shebang: ./ci/dox.sh: changing `/bin/sh' to `/gnu/store/qkw4zrwfybxww8f56nkb6hggxambk89b-bash-4.4.0/bin/sh' > patch-shebang: ./ci/run.sh: changing `/bin/sh' to `/gnu/store/qkw4zrwfybxww8f56nkb6hggxambk89b-bash-4.4.0/bin/sh' > phase `patch-source-shebangs' succeeded after 0.0 seconds > starting phase `configure' > phase `configure' succeeded after 0.0 seconds > starting phase `patch-generated-file-shebangs' > patch-shebang: ./ci/docker/arm-linux-androideabi/accept-licenses.sh: warning: no binary for interpreter `expect' found in $PATH > phase `patch-generated-file-shebangs' succeeded after 0.0 seconds > starting phase `build' > error: failed to read `/tmp/guix-build-rust-libc-0.2.18.drv-0/libc-0.2.18/libc-test/Cargo.toml` > > Caused by: > No such file or directory (os error 2) > phase `build' failed after 0.5 seconds > builder for `/gnu/store/wcn4kyhfmp6pi8kdpssdc3k90hkwwhrp-rust-libc-0.2.18.drv' failed with exit code 1 > @ build-failed /gnu/store/wcn4kyhfmp6pi8kdpssdc3k90hkwwhrp-rust-libc-0.2.18.drv - 1 builder for `/gnu/store/wcn4kyhfmp6pi8kdpssdc3k90hkwwhrp-rust-libc-0.2.18.drv' failed with exit code 1 > guix build: error: build failed: build of `/gnu/store/wcn4kyhfmp6pi8kdpssdc3k90hkwwhrp-rust-libc-0.2.18.drv' failed > > > -- > ♥Ⓐ ng0 > PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org -- ♥Ⓐ ng0 PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org