[PATCH] build-system/cargo (cargo-build): Add cargo-build-flags, remove configure-flags.

  • Done
  • quality assurance status badge
Details
2 participants
  • ng0
  • Danny Milosavljevic
Owner
unassigned
Submitted by
Danny Milosavljevic
Severity
normal

Debbugs page

Danny Milosavljevic wrote 8 years ago
(address . guix-patches@gnu.org)(name . Danny Milosavljevic)(address . dannym@scratchpost.org)
20170303171728.26483-1-dannym@scratchpost.org
* guix/build-system/cargo.scm (cargo-build): Add cargo-build-flags,
remove configure-flags.
---
guix/build-system/cargo.scm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (21 lines)
diff --git a/guix/build-system/cargo.scm b/guix/build-system/cargo.scm
index 578c4446a..c637fbb16 100644
--- a/guix/build-system/cargo.scm
+++ b/guix/build-system/cargo.scm
@@ -64,7 +64,7 @@ to NAME and VERSION."
#:key
(tests? #t)
(test-target #f)
- (configure-flags #f)
+ (cargo-build-flags ''("--release"))
(phases '(@ (guix build cargo-build-system)
%standard-phases))
(outputs '("out"))
@@ -89,6 +89,7 @@ to NAME and VERSION."
source))
#:system ,system
#:test-target ,test-target
+ #:cargo-build-flags ,cargo-build-flags
#:tests? ,tests?
#:phases ,phases
#:outputs %outputs
Danny Milosavljevic wrote 8 years ago
cargo-build-flags pushed to master as 49744b352371a875f685ddd0fd1e0c5e7eb10e70
(address . 25954-done@debbugs.gnu.org)
20170317164822.6fdc17bf@scratchpost.org
cargo-build-flags pushed to master as 49744b352371a875f685ddd0fd1e0c5e7eb10e70. Closing bugreport.
Closed
ng0 wrote 8 years ago
20170318092317.d2m6srxmfb5xo5kj@abyayala
Danny Milosavljevic transcribed 0.1K bytes:
Toggle quote (5 lines)
> cargo-build-flags pushed to master as 49744b352371a875f685ddd0fd1e0c5e7eb10e70. Closing bugreport.
>
>
>
>
I have tried to build my rust-libc with this and it hangs on the old
issue of not finding an Cargo.toml file. Do you know what's missing to
fix that?
Are there verbose "builds" for Cargo?

phase `unpack' succeeded after 0.0 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/android-accept-licenses.sh: warning: no binary for interpreter `expect' found in $PATH
patch-shebang: ./ci/android-install-ndk.sh: changing `/bin/sh' to `/gnu/store/qkw4zrwfybxww8f56nkb6hggxambk89b-bash-4.4.0/bin/sh'
patch-shebang: ./ci/android-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/android-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.21.drv-0/libc-0.2.21/libc-test/Cargo.toml`

Caused by:
No such file or directory (os error 2)
phase `build' failed after 0.2 seconds
builder for `/gnu/store/pvnh32dq9w9mbd8xk8hj7wj1clwgh7mi-rust-libc-0.2.21.drv' failed with exit code 1
@ build-failed /gnu/store/pvnh32dq9w9mbd8xk8hj7wj1clwgh7mi-rust-libc-0.2.21.drv - 1 builder for `/gnu/store/pvnh32dq9w9mbd8xk8hj7wj1clwgh7mi-rust-libc-0.2.21.drv' failed with exit code 1
guix build: error: build failed: build of `/gnu/store/pvnh32dq9w9mbd8xk8hj7wj1clwgh7mi-rust-libc-0.2.21.drv' failed
Danny Milosavljevic wrote 8 years ago
(name . ng0)(address . contact.ng0@cryptolab.net)(address . 25954@debbugs.gnu.org)
20170318110803.05979c5a@scratchpost.org
Hi ng0,

my notes contain this:

;; (crate-uri "libc" version) doesn't contain libc-test.
(uri (string-append "https://github.com/rust-lang/libc/archive/"version ".tar.gz"))
.

So please try this one.

Also, actually running the tests would be using rust-ctest which would cause a reference cycle:

rust-ctest - rust-gcc - rust-tempdir - rust-rand - rust-libc; note: also because of rust-rayon as well.

I'm trying to fix that by replacing rust-tempdir by a rust-tempdir that generates non-random tempdirs.
I've removed rayon completely.

rust-ctest also depends on rust-syntex-syntax which is also a problem. Therefore, I tried to make it depend on a very old syntax-syntax (0.3) instead - which is much simpler (has fewer parts). But that one doesn't compile using newer Rust - so I've started adapting it. Sigh.

In general Rust is very very bad at reproducible bootstrapping - as can be seen here.

I think as a first step we should just disable libc tests for now - the amount of changes required is really too high. That should be done upstream instead.
ng0 wrote 8 years ago
(name . Danny Milosavljevic)(address . dannym@scratchpost.org)(address . 25954@debbugs.gnu.org)
20170318110301.zn6mqdsfdtdu5xhy@abyayala
Danny Milosavljevic transcribed 1.1K bytes:
Toggle quote (10 lines)
> Hi ng0,
>
> my notes contain this:
>
> ;; (crate-uri "libc" version) doesn't contain libc-test.
> (uri (string-append "https://github.com/rust-lang/libc/archive/" version ".tar.gz"))
> .
>
> So please try this one.

Thanks!

Toggle quote (4 lines)
> Also, actually running the tests would be using rust-ctest which would cause a reference cycle:
>
> rust-ctest - rust-gcc - rust-tempdir - rust-rand - rust-libc; note: also because of rust-rayon as well.

Yeah, I've seen that and gave up further down in the dependency chain
of secushare prototype. I've used a chart, paper, pens, but it seems
like this is a problem which needs to be fixed in general. I imagine
that more rust crates than my 100 crates cause reference cycles.

Toggle quote (8 lines)
> I'm trying to fix that by replacing rust-tempdir by a rust-tempdir that generates non-random tempdirs.
> I've removed rayon completely.
>
> rust-ctest also depends on rust-syntex-syntax which is also a problem. Therefore, I tried to make it depend on a very old syntax-syntax (0.3) instead - which is much simpler (has fewer parts). But that one doesn't compile using newer Rust - so I've started adapting it. Sigh.
>
> In general Rust is very very bad at reproducible bootstrapping - as can be seen here.
>
> I think as a first step we should just disable libc tests for now - the amount of changes required is really too high. That should be done upstream instead.
?
Your comment

This issue is archived.

To comment on this conversation send an email to 25954@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 25954
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help