Cross-compiling ROOT for Embedded Hardware

Hi,

Has anyone successfully done this? I’m trying to achieve this with the open-embedded framework using bitbake. This is my current recipe: github.com/kratsg/meta-l1calo/b … 6.04.12.bb

This is the execution log: gist.github.com/anonymous/56f904b65feeb3346db6

And this is the CMakeError log: gist.github.com/anonymous/d5d766badcee1df5efc1

Thanks!

Giordon

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.

Pere

Hi,

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

do_configure(){
  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).



google.com/search?&q=cern+root+arm
google.com/search?&q=cern+root+raspberry

It looks like the m64 flag is set here: github.com/root-mirror/root/blo … uxx8664gcc