One little issue building on raspberry pi 3

I can almost build maidsafe rust respositories cleanly on raspberry pi 3, using this script.

The one issue is in rust_sodium. Here is a transcript.

Looks like a casting issue between *const u8 and *const c_char? I don’t know rust very well.

2 Likes

Yes, the problem is that c_char is i8 on most architectures, but u8 on ARM: https://github.com/rust-lang/rust/blob/4812cf392f1fa2258033356dd872fbee58a5406e/src/libstd/os/raw.rs#L15
So the cast was “trivial”. This PR should fix it, by allowing trivial casts: https://github.com/maidsafe/rust_sodium/pull/17
Please let me know whether it works with that.

2 Likes

I’m running the vault for test 8 on my pi 3. I just installed the ARM package and it worked straight away.

I guess building may suit another purpose besides just running the vault though? Not really an expert in these things :joy:

Works great. Thanks!
I suppose a related question is, will there be Travis CI coverage for arm? It will likely be a popular platform.

3 Likes

We definitely want to add that at some point, but it’s not trivial as Travis doesn’t support ARM. At the moment we’re all busy working on other issues, unfortunately.

2 Likes

Ok - for the time being, I’ll report ARM issues in an ad-hoc manner here.

I found one test failure for self_encryptor::tests::large_100mb_file.

running 1 test
test self_encryptor::tests::large_100mb_file … FAILED

thread 'self_encryptor::tests::large_100mb_file' panicked at 'index out of bounds: the len is 0 but the index is 0', /buildslave/rust-buildbot/slave/stable-dist-rustc-cross-host-linux/build/src/libcollections/vec.rs:1176

(backtrace in linked gist)

Once https://github.com/maidsafe/self_encryption/pull/195 is merged, the failure should print a bit more information. I suspect that there wasn’t enough free RAM to create the 100 MB memory map.

1 Like