Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cross compiling rethinkdb for Raspberry Pi

Currently running Ubuntu 14.04 x86_64. I want to cross compile rethinkdb for my RPi for experimental purposes, which is supported in 1.12 (and people have apparently successfully compiled).

I have installed the toolchain:

sudo apt-get install g++-4.7-arm-linux-gnueabi gcc-arm-linux-gnueabi

export CXX=/usr/bin/arm-linux-gnueabi-g++-4.7
export CC=/usr/bin/arm-linux-gnueabi-gcc-4.7
export AR=/usr/bin/arm-linux-gnueabi-ar
export LD=/usr/bin/arm-linux-gnueabi-ld

Configuration runs:

./configure --ccache --allow-fetch --without-tcmalloc
* Detecting system configuration
Bash:                           4.3.8(1)-release
Use ccache:                     yes
C++ Compiler:                   GCC 4.7 (/usr/bin/arm-linux-gnueabi-g++-4.7)
Host System:                    arm-linux-gnueabi
Build System:                   Linux 3.13.0-24-generic x86_64
Cross-compiling:                yes
Host Operating System:          Linux
Without tcmalloc:               yes
Build client drivers:           no
Build Architecture:             x86_64
Precompiled web assets:         no
Protobuf compiler:              /usr/bin/protoc
Node.js package manager:        /usr/bin/npm
LESS css:                       external/less_1.6.2
CoffeeScript:                   external/coffee-script_1.7.1
Handlebars:                     external/handlebars_1.3.0
Browserify:                     external/browserify_3.24.13
ProtoBuf.js:                    external/protobufjs_2.0.4
wget:                           /usr/bin/wget
curl:                           /usr/bin/curl
protobuf:                       external/protobuf_2.5.0
v8:                             external/v8_3.22.24.17
RE2:                            external/re2_20140111
z:                              external/zlib_1.2.8
Google Test:                    external/gtest_1.6.0
termcap:                        no
Test protobuf:                  external/protobuf_2.5.0
Test boost:                     external/boost_1.55.0
Installation prefix:            /usr/local
Configuration prefix:           /usr/local/etc
Runtime data prefix:            /usr/local/var
* Warning: ARM support is still experimental
* Wrote configuration to config.mk

However make fails,

/bin/bash: ccache: command not found

Any pointers to getting this working?

like image 255
jvc26 Avatar asked Apr 19 '14 15:04

jvc26


2 Answers

Any pointers to getting this working?

Just install ccache. It would be helpful even if you did not have this issue because it somewhat speeds the compilation up on embedded. We are also using it at the company, fwiw, even with icecream, eventually.

sudo apt-get install ccache
like image 200
lpapp Avatar answered Sep 21 '22 00:09

lpapp


The actual state of cross compiling rethinkdb for raspberry-pi is complicated right now. It seems that this is not actively maintained and it became complicated to set it up over the years. This is however possible with a little bit of effort. It requires dwelving into the rethinkdb build framework based on good ol' makefiles...

You can find an attempt at doing so here in a Dockerfile. It basically creates a Docker container with all the dependencies (especially the cross compiler), modify the config and build rethinkdb. The outcome is the rethinkdb package for raspberry.

You can either use it as is or have a look to it and reproduce it on your own.

like image 31
Luke Skywalker Avatar answered Sep 19 '22 00:09

Luke Skywalker