Cross-compiling ROOT for Embedded Hardware


Has anyone successfully done this? I’m trying to achieve this with the open-embedded framework using bitbake. This is my current recipe: …

This is the execution log:

And this is the CMakeError log:



Hi Giordon,
The answer is no. I guess nobody has cross-compiled root to the end. I think it should be possible after clearing a number of problems that will appear on the way. The main difficulty, I guess, will be that we need to execute code (rootcling) during the build process.

The first error you have hit (checking for -fPIC) is that -m64 has been added to the CXX flags and is used to check if the option exists.

/home/osboxes/poky/build/tmp/sysroots/x86_64-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++    -march=armv7-a -mfloat-abi=softfp -mfpu=neon -mtune=cortex-a9  --sysroot=/home/osboxes/poky/build/tmp/sysroots/preprototype  -O2 -pipe -g -feliminate-unused-debug-types -fvisibility-inlines-hidden -pipe -m64 -Wall -W -Woverloaded-virtual -fsigned-char -fPIC -pthread -std=c++11 -Wno-deprecated-declarations -Wno-comment -Wno-unused-parameter -Wno-maybe-uninitialized -Wno-unused-but-set-variable -Wno-missing-field-initializers -DCXX_SUPPORTS_FPIC   -Werror -fPIC -o CMakeFiles/cmTC_77b80.dir/src.cxx.o -c /home/osboxes/poky/build/tmp/work/cortexa9-vfp-neon-poky-linux-gnueabi/root/6.04.12-r0/build/CMakeFiles/CMakeTmp/src.cxx
arm-poky-linux-gnueabi-g++: error: unrecognized command line option '-m64'

We need to see at which moment this flag is added.



I believe I need a specific do_configure() step in here. The initial problem was with fortran, hence why I had to link it especially. But I’m going to try adding something like

  cmake ../

in the code and see what happens when we get things to configure using the set-up environment within bitbake. Unfortunately, I’m not skilled enough with bitbake to figure out a way to pass in custom build flags outside of the recipe into it (so it gets hard-coded for now).

It looks like the m64 flag is set here: … uxx8664gcc