unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ng0 <ng0@libertad.pw>
To: David Craven <david@craven.ch>
Cc: guix-devel@gnu.org
Subject: Re: rust: cargo build-system: how to handle libraries
Date: Wed, 28 Dec 2016 09:24:22 +0000	[thread overview]
Message-ID: <87eg0ss8xl.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <CAL1_imkm7WEzfCUdxExjQGxVk-oXpFxqBikLT2Cpw3KBvz=3VA@mail.gmail.com>

David Craven <david@craven.ch> 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.

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

  reply	other threads:[~2016-12-28  9:24 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-27 23:57 rust: cargo build-system: how to handle libraries ng0
2016-12-28  0:07 ` David Craven
2016-12-28  9:24   ` ng0 [this message]
2016-12-28  9:26     ` ng0
2016-12-28  9:59       ` David Craven
2016-12-28 16:42         ` ng0
2016-12-28 16:49           ` ng0

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87eg0ss8xl.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me \
    --to=ng0@libertad.pw \
    --cc=david@craven.ch \
    --cc=guix-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).