Cross compile for arm machine could not find X11

Hi ROOTers,

I am trying to cross-compile the Root library (ver. 6.26.06) for an arm machine. I have received error message:

– Looking for X11
CMake Error at /opt/st/myir/3.1-snapshot/sysroots/x86_64-ostl_sdk-linux/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find X11 (missing: X11_X11_INCLUDE_PATH X11_X11_LIB)
Call Stack (most recent call first):
/opt/st/myir/3.1-snapshot/sysroots/x86_64-ostl_sdk-linux/usr/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
/opt/st/myir/3.1-snapshot/sysroots/x86_64-ostl_sdk-linux/usr/share/cmake-3.16/Modules/FindX11.cmake:366 (find_package_handle_standard_args)
cmake/modules/SearchInstalledSoftware.cmake:17 (_find_package)
cmake/modules/SearchInstalledSoftware.cmake:344 (find_package)
CMakeLists.txt:245 (include)

– Configuring incomplete, errors occurred!
See also “/home/zhubo/cross-compile-root/buildroot/NATIVE/CMakeFiles/CMakeOutput.log”.
See also “/home/zhubo/cross-compile-root/buildroot/NATIVE/CMakeFiles/CMakeError.log”.
interpreter/llvm/src/CMakeFiles/CONFIGURE_LLVM_NATIVE.dir/build.make:60: recipe for target ‘NATIVE/CMakeCache.txt’ failed
make[2]: *** [NATIVE/CMakeCache.txt] Error 1
make[2]: *** 正在删除文件“NATIVE/CMakeCache.txt”
CMakeFiles/Makefile2:8058: recipe for target ‘interpreter/llvm/src/CMakeFiles/CONFIGURE_LLVM_NATIVE.dir/all’ failed
make[1]: *** [interpreter/llvm/src/CMakeFiles/CONFIGURE_LLVM_NATIVE.dir/all] Error 2
Makefile:151: recipe for target ‘all’ failed
make: *** [all] Error 2

I tried to cmake like this:/opt/st/myir/3.1-snapshot/sysroots/x86_64-ostl_sdk-linux/usr/bin/cmake -Dbuiltin_afterimage:BOOL=OFF -Dasimage:BOOL=OFF -DCMAKE_CROSSCOMPILING=True -DCMAKE_INSTALL_PREFIX=/home/zhubo/cross-compile-root/installroot -DLLVM_DEFAULT_TARGET_TRIPLE=arm-ostl-linux-gnueabihf -DLLVM_TARGET_ARCH=ARM -DLLVM_TARGETS_TO_BUILD=ARM -DLLVM_TABLEGEN=/home/zhubo/cross-compile-root/root-6.24.04/interpreter/llvm/src/utils/kate/llvm-tblgen -Dminimal=ON -Dx11=OFF -Dxft=OFF -Dcocoa=OFF -Dopengl=OFF -Dbuiltin_pcre=OFF -Dbuiltin_zlib=OFF -Dbuiltin_lzma=OFF -Dalien=OFF -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DLLVM_TARGETS_TO_BUILD=‘host;NVPTX’ /home/zhubo/cross-compile-root/root-6.24.04, then cmake --build . – -j1, but failed.

why -Dx11=OFF wouldn’t work? thanks!

Please read tips for efficient and successful posting and posting code

_ROOT Version:6.06.06
_Platform:cortexa7t2hf linux
Compiler: GNU 9.3.0

Hi @fqjboy ,

and welcome to the ROOT forum! The actual error message does not seem to have to do with x11, but rather with LLVM, right?

CMakeFiles/Makefile2:8058: recipe for target ‘interpreter/llvm/src/CMakeFiles/CONFIGURE_LLVM_NATIVE.dir/all’ failed

Where does CONFIGURE_LLVM_NATIVE come from? That’s not from the ROOT build system.


Hi @eguiraud
thanks for reply! I didn’t know about LLVM’s parameters,I just compiled from an article I found in my search,[ROOT-9248] Cross Compile ROOT for ARM - SFTJIRA
now,i delete all about LLVM’s parameters to rebuild,but the error meaasge is the same,How do I fix it?

Ok, can you please start from an empty build directory and post here the full cmake configuration command and all of its output? (if I understand correctly the failure is already at cmake configuration).
Also see Posting code? Read this first! about posting code.


Sorry, I went to do other things later, this problem is put aside, do not need to solve for the time being,thank you again!