SAFE Network App for ARM?

All tenancies get the first 3,000 OCPU hours and 18,000 GB hours per month for free for VM instances using the VM.Standard.A1.Flex shape, which has an Arm processor. For Always Free tenancies, this is equivalent to 4 OCPUs and 24 GB of memory.

It will just shutdown 2/3 of the way through the month

2 Likes

If you mean my scripts I don’t think so. It uses the same Cargo dependencies as the Marriage builds, but ensures you have the Ubuntu packages that you need and automates the steps to build and install the binaries.

1 Like

Maybe that’s the key.
For the records this is the error I got when I tried

cargo build --release --target aarch64-unknown-linux-musl --verbose

error: failed to run custom build command for `ring v0.16.20`

Caused by:
  process didn't exit successfully: `/home/ubuntu/src/maidsafe/safe_network/target/release/build/ring-f6d622e1c371fefa/build-script-build` (exit status: 101)
  --- stdout
  OPT_LEVEL = Some("3")
  TARGET = Some("aarch64-unknown-linux-musl")
  HOST = Some("aarch64-unknown-linux-gnu")
  CC_aarch64-unknown-linux-musl = None
  CC_aarch64_unknown_linux_musl = None
  TARGET_CC = None
  CC = None
  CROSS_COMPILE = None
  CFLAGS_aarch64-unknown-linux-musl = None
  CFLAGS_aarch64_unknown_linux_musl = None
  TARGET_CFLAGS = None
  CFLAGS = None
  CRATE_CC_NO_DEFAULTS = None
  DEBUG = Some("false")
  CARGO_CFG_TARGET_FEATURE = None

  --- stderr
  running "aarch64-linux-musl-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-U_FORTIFY_SOURCE" "-DNDEBUG" "-c" "-o/home/ubuntu/src/maidsafe/safe_network/target/aarch64-unknown-linux-musl/release/build/ring-9da7e4e1c99da240/out/aesv8-armx-linux64.o" "/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"
  thread 'main' panicked at 'failed to execute ["aarch64-linux-musl-gcc" "-O3" "-ffunction-sections" "-fdata-sections" "-fPIC" "-I" "include" "-Wall" "-Wextra" "-pedantic" "-pedantic-errors" "-Wall" "-Wextra" "-Wcast-align" "-Wcast-qual" "-Wconversion" "-Wenum-compare" "-Wfloat-equal" "-Wformat=2" "-Winline" "-Winvalid-pch" "-Wmissing-field-initializers" "-Wmissing-include-dirs" "-Wredundant-decls" "-Wshadow" "-Wsign-compare" "-Wsign-conversion" "-Wundef" "-Wuninitialized" "-Wwrite-strings" "-fno-strict-aliasing" "-fvisibility=hidden" "-fstack-protector" "-g3" "-U_FORTIFY_SOURCE" "-DNDEBUG" "-c" "-o/home/ubuntu/src/maidsafe/safe_network/target/aarch64-unknown-linux-musl/release/build/ring-9da7e4e1c99da240/out/aesv8-armx-linux64.o" "/home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/pregenerated/aesv8-armx-linux64.S"]: No such file or directory (os error 2)', /home/ubuntu/.cargo/registry/src/github.com-1ecc6299db9ec823/ring-0.16.20/build.rs:653:9```

That was after after a lot of packages compiled successfully.

Also you can only have 200GB block volume in total, 50GB gets taken up by the boot volume.

You’re cross compiling, specifying a target, so that may affect the difference and override the build settings. If you’re on an arm processed you don’t need to do that, so that’s probably the difference.

3 Likes

Can anyone please check if these ARM binaries run?

1 Like

How can I test this?
At the moment I can only run a local baby-fleming with v0.6.1…

Like, do these binaries work?
Specifically armv7 and aarch64.
I was busy helping someone installing manjaro linux on the raspberry at the time of writing the post and I’m going to sleep soon.

I don’t think they work yet, no announcement anyway

1 Like

@dirvine said in another thread that there a a load of PRs incoming and not to waste our time on these latest releases. I read that as they are “releases” only in the sense that they are logical breakpoints in the fast-moving development process right now and of use only to monitor progress internally. I bet there is a much more elegant way of putting that…

4 Likes

Looks like ARMv7 builds have arrived today.
Not sure if I had anything to do with it.

[edit]
Looking at the contributor @chriso succeeding days earlier than me
and way more elaborate, I guess not.
[/edit]

I’ll request them to add an aarch64 ARM build.
https://github.com/maidsafe/safe_network/issues/182

2 Likes

Hi All,

I’ve been working on providing the builds for ARM. I’ve submitted a PR to resolve the issue raised by @folaht , so the Aarch64 build will be available shortly.

Since some people were asking, I just wanted to provide some info on these builds.

They’ve been built using the cross project, which very nicely uses Docker containers to wrap all the tedious configuration for cross compilation. In terms of testing, the sn_node ARM builds pass a large subset of the tests defined in the safe_network repo. Of the tests that didn’t pass, most of the failures were actually due to the configuration of the containers used by cross in the test run. We’ll definitely be able to fix those. The other tests that didn’t pass were ‘prop’ tests that are very CPU intensive and were just taking a very long time to run with the limited container resources.

There have been no tests on actual ARM hardware yet, but in the coming days, I’m going to test and run the builds on a Raspberry Pi 4.

If you please feedback any findings or issues with the builds in this thread, I’ll be happy to assist in any way I can. I’ll be checking the forum regularly from now on and look forward to hearing from anyone who’s interested.

Cheers,

Chris

19 Likes

:partying_face: :partying_face: :partying_face:

Thank you for looking after us Pi users. :slight_smile:

8 Likes

Is there any point in me testing these build on Odroid ARM7. I hav some time over the next couple of days if so.

Great to see this :relaxed:

1 Like

And if someone can provide simple instructions, I can test this on Oracle cloud, Arm Ampere (v8.2 I think)

Beautiful Chris! Thanks for hard work!

5 Likes

Sure thing, it would help us a lot. So running baby fleming may bee too much for odroid, but we have not tried it yet. As we cut out more inefficiencies then it’s worth a try.

5 Likes

couldn’t resist…
downloaded binaries from https://github.com/jacderida/safe_network/releases/tag/v0.7.26

ubuntu@instance-20210709-0856:~/.safe/node$ safe node bin-version
safe_network 0.7.26
ubuntu@instance-20210709-0856:~/.safe/node$ safe node run-baby-fleming
Creating '/home/ubuntu/.safe/node/baby-fleming-nodes' folder
Storing nodes' generated data at /home/ubuntu/.safe/node/baby-fleming-nodes
Launching local Safe network...
Launching with node executable from: /home/ubuntu/.safe/node/sn_node
Version: safe_network 0.7.26
Network size: 11 nodes
Using RUST_LOG 'safe_network=debug'
Launching genesis node (#1)...
Connection info directory: /home/ubuntu/.safe/node/node_connection_info.config
Genesis node contact info: ["127.0.0.1:44519"]
Common node args for launching the network: ["-vv", "--idle-timeout-msec", "5500", "--keep-alive-interval-msec", "4000"]
Launching node #2...
Launching node #3...
Launching node #4...
Launching node #5...
Launching node #6...
Launching node #7...
Launching node #8...
Launching node #9...
Launching node #10...
Launching node #11...
Done!

Following that

ubuntu@instance-20210709-0856:~/.safe/node$ safe keys create --test-coins --for-cli

Hangs…not sure where to take it from here…

3 Likes

:smiley: cool

We are just updating cli etc. let’s see if @joshuef and @chriso have some input (although Josh is ODD today (supposed to be)) and Chris finished after midnight last night. So may be a wee while to reply.

:+1: though it’s all helpful

5 Likes

Thanks for the feedback. I’ll see if I can reproduce this on my own Pi later today. I’ll definitely get back to you, but it may not be today. We’ll keep track of the issue.

4 Likes