Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for ARM64 #50

Open
drake7707 opened this issue Sep 30, 2019 · 3 comments
Open

Support for ARM64 #50

drake7707 opened this issue Sep 30, 2019 · 3 comments

Comments

@drake7707
Copy link

drake7707 commented Sep 30, 2019

I tested a building and running it on an ODROID N2, which is an ARM64 and it seems to work but I needed to do a few small changes, I had to disable modern_cpu manually because the current statement threw an 'Index out of range' and I had to change the unistd_64 import to unistd as it didn't exist.

Linux odroid 4.9.187-53 #1 SMP PREEMPT Fri Aug 9 06:12:18 -03 2019 aarch64 aarch64 aarch64 GNU/Linux

Diff:

diff --git a/configure b/configure
index 0e84ff6..4ea969f 100755
--- a/configure
+++ b/configure
@@ -46,9 +46,10 @@ modern_cpu = True
 if system() == 'Linux':
     # we need to check if the CPU is recent enough to use popcnt and
     # AVX instructions
-    cpuinfo = slurp('/proc/cpuinfo').splitlines()
-    flags = [l for l in cpuinfo if l.startswith('flags')][0]
-    modern_cpu = 'popcnt' in flags and 'avx' in flags
+    #cpuinfo = slurp('/proc/cpuinfo').splitlines()
+    #flags = [l for l in cpuinfo if l.startswith('flags')][0]
+    #modern_cpu = 'popcnt' in flags and 'avx' in flags
+    modern_cpu = 0

 if modern_cpu:
     c.append('cflags', '-march=westmere')
diff --git a/src/meshable_arena.cc b/src/meshable_arena.cc
index b325531..023b2a5 100644
--- a/src/meshable_arena.cc
+++ b/src/meshable_arena.cc
@@ -15,7 +15,7 @@
 #include <unistd.h>

 //#include <sys/memfd.h>
-#include <asm/unistd_64.h>
+#include <asm/unistd.h>
 #include <linux/memfd.h>
 #endif

I think these same changes are required for an 64-bit OS on a raspberry PI.

@bpowers
Copy link
Member

bpowers commented Sep 30, 2019

ah, this is great, thanks! I'll look at incorporating into the standard build system

@tuyend97
Copy link

tuyend97 commented Dec 1, 2020

Hi can you let me know how you can build it on linux with architecture arm by cross compile

@kov
Copy link

kov commented Jan 15, 2022

Any plans to support this? I would love to use mesh on my Linux VM in my Apple Silicon macbook pro (and possibly on my graviton 2 aws vps too).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants