Building on Fedora x86_64 - current errors

Not as far as I’m aware. If you find an issue, head over to the corresponding github repo, click Issues, then New and paste in your findings.

EDIT: I was having errors with test of crust. See the issue I raised, now closed. Prakash responded with a fix, setting an environment variable to disable multi threading for the tests.

Great work! I look forward to trying it out. :wink:

I will try to post the error I’m getting compling crust on LinuxMint 17 at github tonight.

For info, the crust cargo test requires the following environment:

export RUST_TEST_THREADS=1

See: test failures on Linux · Issue #222 · maidsafe-archive/crust · GitHub

@philip_rhoades, that script worked well once I installed xterm, and typed my own path right. :slight_smile: Thanks.

I haven’t reported these errors below on github, because I might be missing some steps. I have run export RUST_TEST_THREADS=1, and checked that echoing that variable shows 1.

Here is the error I get with crust’s test output:

cargo test
           Compiling crust v0.2.3 (file:///media/Save/Data/Programming/maidsafe/crust)
        examples/crust_peer.rs:457:21: 457:26 error: cannot borrow immutable local variable `stdin` as mutable
        examples/crust_peer.rs:457             let _ = **stdin**.read_line(command);
                                                       ^~~~~
        error: aborting due to previous error
    Could not compile `crust`.

The most widespread current error I’m getting is that cargo is looking at crust 0.1.5 as a dependency for other crates. I’ve tried cargo update -p crust and removing Cargo.lock, but I’m probably just missing something. Crates that rely on crust such as maidsafe_vault give this type build output:

cargo build
   Compiling crust v0.1.5
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/beacon.rs:195:17: 195:36 error: use of unstable library feature 'udp_extras': available through the `net2` crate on crates.io
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/beacon.rs:195     try!(socket.**set_broadcast(true)**);
                                                                                                         ^~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 6:48 note: in expansion of try!
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/beacon.rs:195:5: 195:38 note: expansion site
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/beacon.rs:195:17: 195:36 help: add #![feature(udp_extras)] to the crate attributes to enable
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/lib.rs:33:25: 33:28 error: unused or unknown feature
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/lib.rs:33 #![feature(ip_addr, ip, **udp**, arc_weak)]
                                                                                                             ^~~
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/lib.rs:27:29: 27:44 note: lint level defined here
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/lib.rs:27         unused_comparisons, **unused_features**, unused_parens, while_true)]
                                                                                                                 ^~~~~~~~~~~~~~~
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/beacon.rs:195:17: 195:36 error: use of deprecated item: available through the `net2` crate on crates.io
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/beacon.rs:195     try!(socket.**set_broadcast(true)**);
                                                                                                         ^~~~~~~~~~~~~~~~~~~
<std macros>:1:1: 6:48 note: in expansion of try!
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/beacon.rs:195:5: 195:38 note: expansion site
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/lib.rs:23:20: 23:30 note: lint level defined here
/home/noah/.cargo/registry/src/github.com-0a35038f75765ae4/crust-0.1.5/src/lib.rs:23 #![deny(bad_style, **deprecated**, drop_with_repr_extern, improper_ctypes, non_shorthand_field_patterns,
                                                                                                        ^~~~~~~~~~
error: aborting due to 3 previous errors
Could not compile `crust`.

Thanks for all the help.

@eggmunkee,

Yes, crust and vault are currently failing for me too - but since the change to rust and fast rebuilding and testing, I have been sometimes running the tests a number of times a day and (during the week at least) the code changes quickly. I have not been reporting errors since they could be gone a few hours later! However, crust does seem to have been broken for a few days now but I haven’t been keeping the outputs to check if they are the same problems or not . .

BTW, I have added “-maximised” to the xterm start - it is useful for me anyway.

Phil.

I don’t have my platform available but I remember coming across the problem of crust 0.1.5 downloaded instead of 0.2.2. That was while compiling maidsafe_vault and to work around this I had to change some dependencies in Cargo.toml file by making them pointing to the MaidSafe github repository instead of crates.io.
Just change the crust and routing lines respectively to:

crust = { git = "https://github.com/maidsafe/crust.git" }
routing = { git = "https://github.com/maidsafe/routing.git" }

I did it a few days ago and don’t remember if this was enough to make maidsafe_vault compile.

@tfa,

In the crust cargo.toml file I see:

version = “0.2.3”

In the cargo.toml files for vault and routing under dependencies I see:

crust = “0.1.*”

crust = “0.2.*”

If the dependencies are for minimum versions, this suggest to me that the cargo files are OK?

Thanks,
Phil.

routing is currently being heavily worked on just now, more detail will follow in the latest Dev Update which I am currently writing and as such the routing crate has a dependency on an older crust crate version which broke and is now fixed, but routing is still using the older broken one, this also creates breakage in other repos with routing dependencies. Pointing the dependencies straight to the github repos will result in pretty unpredictable / unstable results and is only advisable for the brave :wink:
We do have a far bit of breakage just now which is being worked by the team. Hopefully we will return to my preferred sea of green very soon.

5 Likes

Thanks for the advice.

I agree that pointing to maidasafe repositories will result in unstable results but the problem is that we have currently no working repositories to play with.

If I create a new Hello World program with cargo and I only add the following dependency in Cargo.toml:

[dependencies]
routing = "*"

Then I get the same errors as @eggmunkee on crust 0.1.5. I tried other versions than *, but with no success (0.2.*, 0.2.8, 0.2.7, 0.2.0, 0.1.*). I also tried on 3 nightly versions of rust: 2015-08-03, 2015-08-01 and an earlier one I don’t remember.

The only way I found to make it compile successfully was to change the line to:

routing = { git = "https://github.com/maidsafe/routing.git" }

A problem that MaidSafe should solve is to define a way to provide the last stable repository in parallel to the development one. .

1 Like

The stable versions will be in crates.io (the rust package manager). This is like npm pip etc. so best there if you are looking for stable reproducible builds. Hope that helps. There will also be branches in the repo’s for stable older versions like 0.2.X etc.

1 Like

Could we have at least two different branches?

Master = Stable
Develop = Nightly

Constant debate in the office for sure. We did used to but now want to push folks to crates.io and installers for apps. There will be branches for previous stable versions as we push to crates.io so master is always current work. If you want a stable version then the branches and tags will give you the version you want.

We have set up the docs to be per branch as well so you always get the documentation relevant to that branch. The problem just now is we clobbered routing in this sprint with a big API change (moving from dynamic dispatch and traits to channel interface).

2 Likes