-
Notifications
You must be signed in to change notification settings - Fork 42
Support for ARM64 #28
Comments
Hi @lag-linaro, we can't make any promises at the moment, but we are looking into it. We'll update this issue with the progress and direction. |
Sounds promising. Let me know if I can be of any assistance. FYI, if you're looking for infrastructure:
|
Thank you! Totally appreciate the links. About assistance; if you haven't already, would you please join our community on spectrum? Most of the communication and planning goes on there. |
If you ever need a machine to build, I have been lent one to do it... and my repositories are already linked to aarch64 building machines at shippable. |
I have tried to build on a machine I have been lent, and got only one file issuing an error. make
[1/2] CC build/release/obj/arch/runtime/context_switching.o
src/arch/runtime/context_switching.cc:694:2: error: #error "Unsupported architecture."
#error "Unsupported architecture."
^
src/arch/runtime/context_switching.cc: In constructor ‘artificial_stack_t::artificial_stack_t(void (*)(), size_t)’:
src/arch/runtime/context_switching.cc:272:28: error: ‘min_frame’ was not declared in this scope
for (size_t i = 0; i < min_frame; i++) {
^
src/arch/runtime/context_switching.cc: At global scope:
src/arch/runtime/context_switching.cc:696:1: error: expected string-literal before ‘)’ token
);
^
src/build.mk:374: recipe for target 'build/release/obj/arch/runtime/context_switching.o' failed
make[1]: *** [build/release/obj/arch/runtime/context_switching.o] Error 1
Makefile:81: recipe for target 'make' failed
make: *** [make] Error 2 Here is what configure tells me: ./configure --allow-fetch
* Detecting system configuration
Bash: 4.3.48(1)-release
Use ccache: no
C++ Compiler: GCC 5.4.0 (/usr/bin/c++)
Host System: aarch64-linux-gnu
Build System: Linux 4.15.0-34-generic aarch64
Cross-compiling: no
Host Operating System: Linux
Build Architecture: aarch64
C++11: ok
Protobuf compiler: /usr/bin/protoc
python: python 2.7.12
Google Test: external/gtest_1.7.0
termcap: no
boost_system: external/boost_1.60.0
protobuf: -lprotobuf
RE2: external/re2_2015-11-01
z: -lz
crypto: -lcrypto
ssl: -lssl
curl: -lcurl
malloc: jemalloc
jemalloc (static): external/jemalloc_4.5.0
Test protobuf: ok
Test boost: ok
* Warning: ARM support is still experimental
Installation prefix: /usr/local
Configuration prefix: /usr/local/etc
Runtime data prefix: /usr/local/var
* Wrote configuration to config.mk |
That is cool. 😃 And in case you haven't solved it yet, here is the patch to make it compile cleanly: diff --git a/src/arch/runtime/context_switching.cc b/src/arch/runtime/context_switching.cc
index 0e5b7f7c00..9e254a7957 100644
--- a/src/arch/runtime/context_switching.cc
+++ b/src/arch/runtime/context_switching.cc
@@ -260,7 +260,7 @@ artificial_stack_t::artificial_stack_t(void (*initial_fun)(void), size_t _stack_
#elif defined(__arm__)
// This slot is used to store r12.
const size_t min_frame = 1;
-#elif defined(__arm64__)
+#elif defined(__arm64__) || defined(__aarch64__)
// The ARM64 ABI requires the stack pointer to always be 16-byte-aligned at
// all registers.
const size_t min_frame = 1;
@@ -457,7 +457,7 @@ void context_switch(artificial_stack_context_ref_t *current_context_out, artific
}
asm(
-#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined (__s390x__) || defined (__powerpc64__)
+#if defined(__i386__) || defined(__x86_64__) || defined(__arm__) || defined(__arm64__) || defined(__aarch64__) || defined (__s390x__) || defined (__powerpc64__)
// We keep architecture-specific code interleaved in order to enforce commonality.
#if defined(__x86_64__)
#if defined(__LP64__) || defined(__LLP64__) |
Thanks a lot. I applied your patch and managed to go 'til the end: rebirthdb
Recursively removing directory /root/rethinkdb/rebirthdb_data/tmp
Initializing directory /root/rethinkdb/rebirthdb_data
Running rebirthdb 2.3.2-windows-beta-579-g11ad11-dirty (GCC 5.4.0)...
Running on Linux 4.15.0-34-generic aarch64
Loading data from directory /root/rethinkdb/rebirthdb_data
Listening for intracluster connections on port 29015
Listening for client driver connections on port 28015
Listening for administrative HTTP connections on port 8080
Listening on cluster addresses: 127.0.0.1, ::1
Listening on driver addresses: 127.0.0.1, ::1
Listening on http addresses: 127.0.0.1, ::1
To fully expose RebirthDB on the network, bind to all addresses by running rebirthdb with the `--bind all` command line option.
Server ready, "rethinkdb_docker_image_temp_xx2" 378468ed-a39f-4dd5-9a34-ab94bc758920
A newer version of the RebirthDB server is available: 2.3.6. You can read the changelog at <https://github.com/rethinkdb/rethinkdb/releases>. I don't know why I get this |
Which branch are you on? |
On branch next. |
Looks like it's hard coded into Probably take with a pinch of salt. |
Thanks. If you ever want to have a try at it, have a look at https://github.com/gounthar/rethinkdb/releases/download/aarch64/rebirthdb_2.3.2+windows+beta+579+g11ad11+dirty.0_arm64.deb.gz . |
That's okay, I've built my own. So now that we know this works, we should lobby for support. Someone is meant to be working on this. They were busy during the v2.4 release, but it is on the roadmap for v2.5 https://spectrum.chat/?t=f288604b-8db8-43be-b7f0-2f3a7b343e1c |
Road-map for v2.5 has been postponed indefinitely due to a lack of developers. Not sure where that leaves AArch64 support. I have followed up on the Spectrum chat. https://spectrum.chat/?t=f288604b-8db8-43be-b7f0-2f3a7b343e1c |
We are seeing some interest in running Rebirth (Rethink) on ARM64 based platforms.
Would it be possible for you guys to provide pre-built binaries as you do for X86 please?
The text was updated successfully, but these errors were encountered: