During the ArangoDB Hackathon weekend, we tried to compile ArangoDB on a Raspberry PI using Raspbian as operating system.

ArangoDB needs some external libraries in order to compile

  • libev
  • ICU
  • V8
  • zlib

Libev, ICU and zlib compiled without problems. Raspbian comes with a precompiled version of V8 – but it’s too old for ArangoDB. So, we had to compile V8 ourself. A single make run takes hours and hours to complete. Using the default parameters it complains about wrong flags for the hard-float ABI. After some googling and endless hours of waiting for the compile to complete, we found a set of flags that finally worked.

  • you need to pass the options -march=armv6 to the compiler and linker
  • you need to disable CAN_USE_VFP3_INSTRUCTIONS
  • use -O2 instead of -O3 (I’m not sure if this is necessary or not)

If you downloaded ArangoDB 1.3, use the following diff to patch the Google V8 Makesystem

Switch into the 3rdParty/V8 directory and execute

This will produce the libraries and the shell example. Try the shell to verify that everything worked

The ArangoDB Makefile does not know about ARM, so we need to fake it. Go into the out directory and execute

There is one open problem in some versions: atomic compare and swap. It is currently not used in the production code of 1.3 AFAIK, so I’ve commented it out. Here’s the patch to do this (UPDATE: if you are using latest 1.3, 1.4, or devel branches, there is no need to apply this patch).


Now we are ready to compile:

This produced executables. Start the server

Next start the shell

And enjoy! I’ve not done many tests, actually only one: save and restore documents. So, I’ve no idea how stable it is.