SAFE Network App for ARM?

They should be even better and I expect you can use the script unmodified to test it out. Please report any results if you have a go.

1 Like

Ok great, thanks. I will let you know if I go down this route, and my results.

1 Like

I’ve updated my build scripts to work with the new safe_network repo (Testnet v6.1 and later). These are for Ubuntu but should build on other distros with minor tweaks (please share if you do this, and PRs welcome).

Building natively like this takes time but is a simple way to get the latest code running on unsupported architectures such as ARM.

8 Likes

I was going to install the SAFE Network App, but I’m starting off with a roadblock because the machines I’m able to experiment with are all Raspberry Pis. They can run Ubuntu with desktop, but any binaries coming from outside the distribution need to be compiled for ARM. My experience with compiling anything for ARM has been … let’s just say maybe I’m an idiot. Are ARM builds coming?

I set up the safenetwork-community on github for this very purpose.

Because you’re not the only one struggling with this.
Compiling maidsafe from source with every new version/testnet is taking waaaaaaay too long.

It’ll be there once I figure out what I’m doing or a better programmer will take over.

2 Likes

I am away from home right now and only have access to my laptop. The BigBox and all my Pis are at home so I cannot assist/recreate your errors.
Sadly none of this will change in the next few days a least untl I find out if/when my mother will be released from hospital.
But trust me you are far from alone in wanting to get this improved for Pi ad other SBCs.

Is armv7 really necessary?
I thought everyone was moving to aarch64?

Do you have your fourth target on github?

1 Like

I don’t know. At that time I found that Rust triplet for RPIs 2/3/4 was armv7-unknown-linux-gnueabihf. Supporting MUSL changes it armv7-unknown-linux-musleabihf and this is the target I took.

To make it work I put everything related to self update behind a cargo feature.

Yes, I generated it at:

But that was one year ago and so completely outdated.

Now I don’t time have time anymore to work on this. I didn’t even participate in V6 test networks.

Just a note to say thank you @happybeing ; I decided to try this, is preparation for the next testnet :wink:
Note: I built this on Oracle Cloud, following post in the pre-dev thread (Thank you @zeroflaw !!), and it built just fine.

6 cores, 36 Gb memory, 6 Gbps, Arm Ampere arch instance running Canonical-Ubuntu-20.04-aarch64-2021.06.03-0 ready to go!

Note that I initially tried to compile for MUSL and it failed to compile ring (openSSL-MUSL problem?) and stopped.
So I decided to give this script a go; am I right assuming it compiles against GLIBC?

1 Like

The fyi the “always free ones” only go up to 4 cores

Yeap I read that, but then it allowed me to create that anyway, without using any of the trial credits. I wonder what will happen at the end of the 30 days trial?

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