MP-SPDZ icon indicating copy to clipboard operation
MP-SPDZ copied to clipboard

ARM platform support needed

Open f-hy opened this issue 7 months ago • 5 comments

Can this project be packaged into a program for the ARM platform? or may I ask how you package the x86 platform compressed package for release?

f-hy avatar Jun 03 '25 08:06 f-hy

I'm using Scripts/build.sh, which contains some options that only work for x86. However, the main step for static binaries (make static-release) should work on any platform that is supported otherwise, which includes ARM. Note that Linux on ARM isn't tested regularly, but I'm happy to assist with any issues that might arise.

mkskeller avatar Jun 03 '25 08:06 mkskeller

Thanks a lot!

f-hy avatar Jun 04 '25 06:06 f-hy

When I use the command 'make -j8 mascot-party' to obtain the compiled executable file "mascot-party.x", and then I run the executable file, I will get "Illegal instruction (core dumped)" at the end of the output. The same problem will also occur when the executable file compiled with 'make static-release' runs. I'm sure such a problem shouldn't occur under normal circumstances. How can this be solved?

Image

The constructed arm environment is provided by qemu. The environment construction command is as follows:

qemu-system-aarch64 \
  -machine virt,accel=tcg \
  -cpu cortex-a72 \
  -m 8G \
  -smp 8 \
  -bios /usr/share/qemu-efi-aarch64/QEMU_EFI.fd \
  -cdrom ubuntu-24.04.3-live-server-arm64.iso \
  -device virtio-net-pci,netdev=net0 \
  -netdev user,id=net0,hostfwd=tcp::42622-:22 \
  -device virtio-rng-pci \
  -device virtio-blk-pci,drive=hd0 \
  -drive if=none,id=hd0,file=mpc1.qcow2,format=qcow2 \
  -virtfs local,id=shared,path=/home/mnt,security_model=passthrough,mount_tag=hostshare \
  -nographic

f-hy avatar Nov 02 '25 16:11 f-hy

Note that this issue will also cause the sample tutorial to fail to run properly:

Image

f-hy avatar Nov 02 '25 16:11 f-hy

You might find that 0f48525448 fixes this, as the default for Linux on ARM was to compile for ARM 8.2, which is used by AWS Graviton2 used by many AWS instances. If that still causes issues, I would suggest removing any CPU optimizations by setting ARCH = in CONFIG.mine.

mkskeller avatar Nov 03 '25 06:11 mkskeller