ROOT configuration on Raspberry Pi 3 B+

Hello, I’m having problems with configuring ROOT 5.32.04 on Raspberry Pi 3B+. I know this isn’t a supported platform, but I’ve read somewhere on CERN forums that some people managed to do it with this old version of ROOT. Please bear in mind that I am a linux newbie.

I managed to do ‘./configure’ inside the root folder. Now that I try to do ‘make’ I get this:

pi@raspberrypi:~/root/root $ make
gcc -Wall -fsigned-char -fPIC -Iinclude -pthread -DINCLUDEDIR="/usr/include" -DOBJSUFFIX=".o" -o build/rmkdepend/main.o -c /home/pi/root/root/build/rmkdepend/main.c
/home/pi/root/root/build/rmkdepend/main.c:64:12: error: conflicting types for ‘fchmod’
extern int fchmod(int, int);
In file included from /home/pi/root/root/build/rmkdepend/def.h:42:0,
from /home/pi/root/root/build/rmkdepend/main.c:30:
/usr/include/arm-linux-gnueabihf/sys/stat.h:297:12: note: previous declaration of ‘fchmod’ was here
extern int fchmod (int __fd, __mode_t __mode) __THROW;
bin/rmkdepend -R -fcint/cint/src/g__cfunc.d -Y -w 1000 – -Wall -fsigned-char -fPIC -Iinclude -DG__REGEXP -DG__UNIX -DG__SHAREDLIB -DG__OSFDLL -DG__ROOT -DG__REDIRECTIO -DG__HAVE_CONFIG -DG__NOMAKEINFO -DG__CINTBODY -I/home/pi/root/root/cint/cint/inc -I/home/pi/root/root/cint/cint/src -I/home/pi/root/root/cint/cint/src/dict -pthread -I. – /home/pi/root/root/cint/cint/src/g__cfunc.c
make: bin/rmkdepend: Command not found
Makefile:592: recipe for target ‘cint/cint/src/g__cfunc.o’ failed
make: *** [cint/cint/src/g__cfunc.o] Error 127

Raspberry and system specs:

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 4.9.35-v7+ #1014 SMP Fri Jun 30 14:47:43 BST 2017 armv7l GNU/Linux

pi@raspberrypi:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 8 (jessie)"
NAME="Raspbian GNU/Linux"
VERSION="8 (jessie)"

Any insight greatly appreciated.

Hum… I am not sure you want to compile ROOT directly on the raspi. This will, literally, take ages/eons.
You’re probably better off cross compiling from a beefier machine…

(also: depending on what you want to do (‘just’ reading ROOT files and serving them on a web server? Reading temperature sensor and plotting histograms?) there may be easier avenues to have something ROOT-like on a raspi…)

A python program is reading inputs from the geiger-miller counters (we are counting mions) and saves data into a txt file. Another python program would use pyROOT to read this data and make histograms on the fly. This is a university project and ROOT was suggested by our professor, but that’s probably because he wasn’t aware that Raspberry isn’t a supported platform.

The result we need is to create a standalone rig that would stand somewhere in the university building, count mions and display pretty histograms that change in real time.

Do you know of other solution than ROOT that would be better suited for Raspberry?

I have done something similar for a neutrino experiment:

The raspi is monitoring temperature, pressure and hygro data off an i2c bus, feeding that data to a web server that displays it on a web page.

It’s very easily cross compiled from any architecture/OS (by exporting 2 environment variables) without having to resort to complicated cross-toolchains installation nor lengthy compilation on the ‘embedded’ device.

If all the data presentation part has to do is to read data off a txt file, then it’s literally a couple lines to setup:

Feel free to send me a PM or an email if you want more details.


ROOT 6 should build and work on Raspberry Pi! (But I don’t have one to actually test…) At least it’s known to work on ARM.

Any ROOT 6 version? It would be configured as what then?
Do you know something more?

Use the newest one, 6.12/04. Run cmake, build and it should work. See for details! And please report whether this worked!

I tried to build it and it started the process, but everytime it hit 73% the computer crashed and everything froze. I think there is not enough RAM for it.

I attach the picture of the frozen screen.

That part of the build may take lots of memory. How many threads are you using and how many cores do you have? You may have to use less threads if your machine does not have sufficient memory to run many linking steps in parallel.

Raspberry has 4 cores. It crashes regardless of how many cores I set to use :frowning:

yeah… linking libCling takes an insane^Wgood amount of memory (you gotta love templates :P) and a rpi3 B has “only” 512 MB of RAM.

use the cross-compilation tool chain, Luke

I agree with @sbinet here. With only 512M of RAM it may not be possible to compile ROOT. You may have better luck if you try to remove -pipe from the compilation flags, if you see it among your flags. That will make intermediate steps go through the filesystem rather than RAM, which may make it possible to compile ROOT.


Here’s what I provided the OP with:

It worked on my raspberry pi 3 :slight_smile:

For the demo, the server was just read the input data file every few seconds, but the final version should of course probably get the new data via a POST request or some other way (perhaps directly embedding the data acquisition module directly inside the server?)

And also it could use some nicer front-end :slight_smile:
(And some nice CSS)


This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.

My Raspberry happily built ROOT - once I gave it a stable power supply! A crashing Raspberry usually means that it has a power issue; out of memory does not crash it (but fails the build).