Crust doesn't compile

People,

crust has not been compiling for me for a while again - is there a known problem? Do I need to make another change to my building script?:

https://gist.github.com/philiprhoades/965eb592097a594c2c71

Thanks,
Phil.

1 Like

I built and ran tests on crust yesterday using the latest nightly Rust. No changes to my script since the “features” thing. I’m on Debian.

1 Like

@philip_rhoades what exactly is the output error? What platform? Version of Rust?

cant compile for quite a while either

cargo 0.6.0-nightly (de11b58 2015-09-16)
rustc 1.5.0-nightly (47d125d0f 2015-09-16)

Compiling temp_utp v0.6.5
/home/testuser/.cargo/registry/src/github.com-0a35038f75765ae4/temp_utp-0.6.5/src/packet.rs:47:5: 47:54 warning: the trait core::marker::Sized is not implemented for the ty
pe Self [E0277]
/home/testuser/.cargo/registry/src/github.com-0a35038f75765ae4/temp_utp-0.6.5/src/packet.rs:47 fn from_bytes(&[u8]) -> Result<Self, ParseError>;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/testuser/.cargo/registry/src/github.com-0a35038f75765ae4/temp_utp-0.6.5/src/packet.rs:47:5: 47:54 help: run rustc --explain E0277 to see a detailed explanation
/home/testuser/.cargo/registry/src/github.com-0a35038f75765ae4/temp_utp-0.6.5/src/packet.rs:47:5: 47:54 note: Self does not have a constant size known at compile-time
/home/testuser/.cargo/registry/src/github.com-0a35038f75765ae4/temp_utp-0.6.5/src/packet.rs:47:5: 47:54 note: this warning results from recent bug fixes and clarifications; i
t will become a HARD ERROR in the next release. See RFC 1214 for details.
/home/testuser/.cargo/registry/src/github.com-0a35038f75765ae4/temp_utp-0.6.5/src/packet.rs:47 fn from_bytes(&[u8]) -> Result<Self, ParseError>;
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/testuser/.cargo/registry/src/github.com-0a35038f75765ae4/temp_utp-0.6.5/src/packet.rs:47:5: 47:54 note: required by core::result::Result
Compiling hyper v0.6.13
Compiling igd v0.1.3
Compiling crust v0.3.2 (file:///home/testuser/maidsafe.org/crust)
src/utp_wrapper.rs:24:32: 24:43 error: no method named peer_addr found for type utp::socket::UtpSocket in the current scope
src/utp_wrapper.rs:24 let peer_addr = socket.peer_addr();
^~~~~~~~~~~
error: aborting due to previous error
Could not compile crust.

p.s. just updated to latest nightly, and still same error with peer_addr

@abittner - are you doing:
cargo clean
cargo update

1 Like

i always cargo clean but apparently didnt care for update
thanks for the hint.

So you compiling ok now? It looked like you where using an older version of temp_utp

2 Likes

Yes it compiles now:

...
Compiling temp_utp v0.6.7
Compiling igd v0.1.3
Compiling crust v0.3.2 (file:///home/testuser/maidsafe.org/crust)

with cargo test it outputs:

Compiling crust v0.3.2 (file:///home/testuser/maidsafe.org/crust)
Running target/debug/crust-288f4d8f2f390627
running 25 tests

But thats all. Should there be some more output lines with the actual tests? I am still new to this. Thank you.

1 Like

Cool :smiley: - you can increase output by adding --verbose
A good starting point

1 Like

Yes, but for me the --verbose (crust test --verbose) doesnt yield any more details

Fresh crust v0.3.2 (file:///home/testuser/maidsafe.org/crust)
Running `/home/testuser/maidsafe.org/crust/target/debug/crust-288f4d8f2f390627`
running 25 tests

The output stops there and returns to the shell.

Are you using export RUST_TEST_THREADS=1 - I have mentioned this before, if you want to run these tests yourself (remember we have CI constantly running ourselves) it is worth keeping up-to-date with each libraries .travis.yml (OS X / Linux) or appveyor.yml (Windows)

1 Like

It tests with that shell environment variable set. I just wasnt sure what parameters were valid and where the parameters came from. Thank you.

test result: ok. 24 passed; 0 failed; 1 ignored; 0 measured
 Doc-tests crust
 running 1 test
 test file_handler::ScopedUserAppDirRemover_0 ... ok
 test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
1 Like

@Ross,

All good again now.

While it has been an interesting exercise to keep having to update my build script to resolve changed situations and new issues, can you tell me why the Maidsafe devs have not produced a definitive build script that is maintained and always guaranteed to give the same results as to what the devs are getting themselves (successful builds or not)?

My updated script is here with comments at the top now which show a quick summary in these Discourse links:

I shall ask the Dev team at this morning’s catch-up.

can you tell me why the Maidsafe devs have not produced a definitive build script that is maintained and always guaranteed to give the same results as to what the devs are getting themselves (successful builds or not)?

My guess is that it’s because they are making the network their priority, and providing a build script for non devs is not as important.

Obviously it would help, I’m not saying it would have no use, but I think it is obviously not as important as what makes it into the sprints and they are very focused on these.

In this case it appears you missed, or forgot, something that had been pointed out earlier. I recall it coming up, and being answered twice - as I fell over it too. You might have found this with a search.

I don’t think we need the devs to be doing more in this area at this time, when the community don’t answer, @Ross or David usually step up and fix things.

In this case Phil, people may not have responded because you didn’t give much detail initially. It always helps readers to realise they can help if the info is there right away, so I advise giving full details of issues whenever they arise, to make it more likely the community will help out, and for the devs to be able to answer with minimum distraction.

1 Like

@philip_rhoades I brought this up and the feedback covered a few areas.

Firstly, we are a very small and extremely busy team and that creating, testing and managing build scripts would be additional overhead and also duplication given that we internally already do this via the aforementioned CI files that link to QA scripts. Secondly, no-one was aware of other projects providing this type of script, we agreed that build instructions should be contained in each library and that we already endeavour to keep these up-to-date. Lastly it would be helpful if community members could check the CI status of a library via the badges (all tier-1 supported are here to save looking for an individual library) before posting on the forum that something does not compile. For non-tier-1 platforms (those not listed) it would be super helpful if the person who has discovered this could raise a github issue in the correct library with as much information as possible to help whoever picks that up investigate and resolve it.
I know this is not perfect and that a better support model will have to evolve (with everyone’s input) as SAFE grows.

2 Likes

@Ross,

Thanks for that. I guess the point I was making was that a simple 100 line script maintained by the devs from the time of the changeover from the old C++ stuff to now probably would have saved quite a few people a fair amount of time from asking similar questions and blundering around etc. . it would have taken minimal time to create and negligible time to maintain . . but I understand people are busy . .

I am sure that is correct.

Thanks,
Phil.

1 Like