Cross-compiling Root for ARM Linux


I’m trying to cross-compile (from a SLC6 machine) Root to run on a Linux ARM (Linux socfpga 3.13.0-00298-g3c7cbb9-dirty #3 SMP Fri Jul 4 15:42:32 CST 2014 armv7l GNU/Linux).

I’m not so sure I understand whether that’s supported or not :blush:

I’ve tried :

./configure linuxarm --with-cc=/usr/local/DS-5/sw/gcc/bin/arm-linux-gnueabihf-gcc --with-cxx=/usr/local/DS-5/sw/gcc/bin/arm-linux-gnueabihf-g++ --with-f77=/usr/local/DS-5/sw/gcc/bin/arm-linux-gnueabihf-gfortran --with-ld=/usr/local/DS-5/sw/gcc/bin/arm-linux-gnueabihf-ld --minimal

but I immediately get lost of undefined symbols :

root]# make
/usr/local/DS-5/sw/gcc/bin/arm-linux-gnueabihf-ld -o bin/rmkdepend build/rmkdepend/cppsetup.o build/rmkdepend/ifparser.o build/rmkdepend/include.o build/rmkdepend/main.o build/rmkdepend/parse.o build/rmkdepend/pr.o build/rmkdepend/mainroot.o
/usr/local/DS-5/sw/gcc/bin/arm-linux-gnueabihf-ld: warning: cannot find entry symbol _start; defaulting to 000080b4
build/rmkdepend/cppsetup.o: In function my_if_errors': cppsetup.c:(.text+0x28): undefined reference tostrlen’
cppsetup.c:(.text+0x32): undefined reference to malloc' cppsetup.c:(.text+0x46): undefined reference tosprintf’
cppsetup.c:(.text+0x4c): undefined reference to strlen' cppsetup.c:(.text+0x68): undefined reference tofprintf’
cppsetup.c:(.text+0x98): undefined reference to _IO_putc' cppsetup.c:(.text+0xb2): undefined reference to_IO_putc’
cppsetup.c:(.text+0xd2): undefined reference to fprintf' cppsetup.c:(.text+0xd8): undefined reference tofree’
cppsetup.c:(.text+0xf0): undefined reference to `stderr’

Thanks for your help,


It’s not that simple :slight_smile: As part of the build we build a few binaries that we need to build the rest of ROOT - they thus need to be built twice: once for the target and also once for the build platform.

We had this working for iOS; maybe you want to have a look whether you can extend what has been done there?

Alternatively a patch for CMake would be welcome, to enable cross-compilation for that.

Either way, this is on our list, we are aware that this is something we need to solve, especially for ARM.

Cheers, Axel.

Hi Axel,

Thanks for the answer. I’ll see what I can do, but no promise…

BTW, as I have a Mac I can try the IOS build to get an example of cross-compilation, right ?

Are there some instructions on how to cross-compile for IOS somewhere ?



I’m not aware of that :frowning: Is this good enough for the first steps? [Root for iPad

Cheers, Axel.