ArangoDB on Raspberry PI

General 5 Comments

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: atomic compare and swap. It is currently not used in the production code of 1.3 AFAIK, so I’ve commented it out.

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.

Tweet about this on TwitterShare on Google+Share on RedditShare on LinkedInBuffer this page

About Frank Celler

Frank is both entrepreneur and backend developer, developing mostly memory databases for two decades. He is the lead developer of ArangoDB and co-founder of triAGENS. Try to challenge Frank asking him questions on C, C++ and MRuby. Besides Frank organizes Cologne’s nosql group & nosql conferences.
  • Michael Bruyninckx

    It would be very helpfull if you could detail the steps in a more tutorial way kind of, like type sudo apt-get somelibrary, then type wget , etc
    I’m looking to use ArangoDB on small mostly single user Node.JS applications that I want to run on the Raspberry Pi.

    • fceller

      1.4.0-beta2 will be released in the next days. I will try to produce a more detail tutorial with the new version.

      • Michael Bruyninckx

        I saw that 1.4 is now released, is this story (now apparently edited) still true ?

        it would be awesome to just “apt-get” the binaries for the Raspberry Pi, but I guess this is possible to do too… it’s more verbose than before, so I guess it might work.
        I’ll try tomorrownight…

        • fceller

          In order to get it up and running, you now can do

          git clone

          make install

          I also manage to create a deb package, which installs. But there is a bug in the setup script – I assume. I’m still debugging.

          • Michael Bruyninckx

            SUPER !
            Danke schoen !