I am trying to build ROOT for a i386 (m32) architecture on
a X86_64 linux machine.
Obviously setting -CMAKE_CXX_FLAGS=‘m32’ -CMAKE_C_FLAGS=‘m32’ is not enough.
I see in cmakes log: – Native target architecture is X86
Is that still possible and if so which FLAGS are needed.
Motivation for the effort:
I would like to rebuild the eventviewer of the OPAL experiment
with a modern version of ROOT. (Currently 5.34.03, 2013 is used)
This software (CERNLIB, ZEBRA, ROPE) only runs with 32bit.
Thanks for possible help,
_Compiler: Ubuntu 7.5.0-3ubuntu1~18.04
@Axel I am not sure if we can cross compile ROOT for 32b? Thanks!
See https://sft.its.cern.ch/jira/browse/ROOT-7397. There it’s explained how you can do it. Best,
thanks for the answer, however in my case it
seems not to work. Still looks like x64
I add the used toolchain and log files:
toolchain-x86.txt (588 Bytes)
cmake_i386.txt (2.8 KB)
Please check that you haver ROOT’s dependencies also available in 32bit, otherwise CMake will find the 64bit versions. You may have to adjust lib to lib32 in the config files as well, depending on your distro. Finally, you could try to run cmake from within a linux32 shell.
Sorry my knowledge of CMake is pretty lousy
Can you give me a hint how to find the missing i386 dependencies
from CMakes log?
This will be very very painful. CMake isn’t exactly famous for its cross-compilation support, and ROOT has a hard time because of several tools that are needed at build time (target=host) and are build artifacts (target=target). In short: it might be a lot easier if you “just” grab a virtual machine… Would that be an option?
If your 32bit libraries are in, e.g.
/usr/lib32, then you should check that CMake is not finding things from
/usr/lib64 if 32bit stuff is in
lib and 64bit stuff in
lib64). You can use
file $lib to check what format it’s in (as shown in the issue linked above for the root binary at the end of the build).
my friendly sysmanager made me a virtual i386 bionic linux.
There cmake + build went like a charm.
Now my real work starts (linking it with CERNLIB &Co)
Thank you all for the help
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.