guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rust: cargo build-system: how to handle libraries


From: ng0
Subject: Re: rust: cargo build-system: how to handle libraries
Date: Wed, 28 Dec 2016 09:26:52 +0000

ng0 <address@hidden> writes:

> David Craven <address@hidden> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]