ROOT on my smartphone

Hi.
How to build ROOT from the git head on Android device?

aarch64, clang version 12.0.1 or gcc-10, python 3.10

Thanks.
Regards. Valeriy

Recently I built the opencv git head - 635K (vs 225K of ROOT ). It took a couple of hours to complete on my moderate old school phone and it runs opencv python like a charm.
I dream about doing a data analysis laying in my bed with smarty & ROOT runing in jupyter notebook :slight_smile:

Hi @xtovo ,
I know @Axel built ROOT for ARM before, let’s see if he has some suggestions. Did you try building ROOT? What happened?

Cheers,
Enrico

…/wrk/root_build $ cmake -DCMAKE_INSTALL_PREFIX=…/root_install …/root_src

– Looking for Python
– Could NOT find Python2 (missing: Python2_NumPy_INCLUDE_DIRS NumPy) (found version “2.7.18”)
– ROOT Platform:
– ROOT Compiler: Clang 12.0.1
– ROOT Processor: aarch64
– ROOT Architecture:
– Build Type: ‘RelWithDebInfo’ (flags = ‘-O2 -g -DNDEBUG’)
– Compiler Flags: -std=c++14 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -pthread -O2 -g -DNDEBUG
– ROOT default compression algorithm: zlib
– PyROOT will be built for versions 3.10.0 (Main) and 2.7.18
– Looking for ZLib
– Looking for Freetype
– Looking for PCRE
– Looking for LZMA
– Looking for ZSTD
– Looking for xxHash
– Looking for LZ4
– Looking for X11
CMake Error at cmake/modules/SearchInstalledSoftware.cmake:345 (message):
libXpm and Xpm headers must be installed.
Call Stack (most recent call first):
CMakeLists.txt:219 (include)

– Configuring incomplete, errors occurred!
See also “/sdcard/wrk/root_build/CMakeFiles/CMakeOutput.log”.
See also “/sdcard/wrk/root_build/CMakeFiles/CMakeError.log”.

Comments?

You are missing required ROOT dependencies, see Dependencies - ROOT (a development package for libxpm is listed there). If there is no libxpm on your platform I think turning off X11 support (-Dx11=OFF cmake option) will remove the dependency on libxpm – if that’s a reasonable trade-off.

Cheers,
Enrico

It’s probably a better use of your time to enable the new web-based GUI + graphics and use that on your phone - i.e. run ROOT on some regular box and connect to it through your browser, to see canvases, RBrowser etc? Or indeed you connect to to your ROOT session (again running on a regular computer) through Jupyter.

Hi Axel,
first of all many thanks for your bothering about my free time. I really appritiate it.
Recently I recognized that my phone brick can be good working horse. It has 8 cores, 4 Gb & 128 Gb of memory and is much more poweful than my former CERN machine.
l’m on vacation and decided to make an experiment. I said myself - forget about “bigs” and try to do everything on the little cutie.
There are several encouraging nice IDE appeared on Android recently: PyDroid3, C# shell.
I also found very impressive Devxpress, Syncfusion charts (you can find all of them on the google play), and thought why not to do the same with ROOT?
I’ve just read Rene’s article about the future of the HEP software and IMHO Rene’s ingineous intution didn’t notice the blast of smartphone software.

++
I’m afraid of Olivier statement.
It sounds like ROOT team is afraid of innovatons. I hope that I’m wrong.

Best regards.
Wish to see you & me & couple of cantine beers :slight_smile:

Valeriy

  • List item

Support for Android is not in the plan of work (I think this might be the first time it was ever requested) but as you know things might change if there is enough request for it.

Cheers,
Enrico

Enrico,
It’s a pity to hear it from you :slight_smile:
driving by user request is a bad way for software development, because outstanding programs usually appeared with zero user community and common user often do not know what he/she wants.
Software developer must always open up new horizons for user view, always make suprizes and only then expect & follow user requests.

Cheers. Valeriy

++
at present the only disgusting thing in programming on smarty is thumb text input. There is also no good editor because emacs, vim and nano are ugly.
Is there any portable&compact bluetooth keyboard for smartphone?

cmake -Dx11=off -DCMAKE_INSTALL_PREFIX=…/root_install …/root_src > q.log 2>&1

cat q.log
– Looking for Python – Could NOT find Python2 (missing: Python2_NumPy_INCLUDE_DIRS NumPy) (found version “2.7.18”) – ROOT Platform:
– ROOT Compiler: Clang 12.0.1
– ROOT Processor: aarch64
– ROOT Architecture:
– Build Type: ‘RelWithDebInfo’ (flags = ‘-O2 -g -DNDEBUG’)
– Compiler Flags: -std=c++14 -Wc++11-narrowing -Wsign-compare -Wsometimes-uninitialized -Wconditional-uninitialized -Wheader-guard -Warray-bounds -Wcomment -Wtautological-compare -Wstrncat-size -Wloop-analysis -Wbool-conversion -pthread -O2 -g -DNDEBUG
– ROOT default compression algorithm: zlib
– PyROOT will be built for versions 3.10.0 (Main) and 2.7.18
– Looking for ZLib
– Looking for Freetype
– Looking for PCRE
– Looking for LZMA
– Looking for ZSTD
– Looking for xxHash
– Looking for LZ4
– Looking for GSL
– Looking for LibXml2
– Looking for PostgreSQL
– Looking for SQLite
– Looking for FFTW3
– Downloading and building XROOTD version
– Cannot select cudnn without selecting cuda or tmva-gpu. Option is ignored
– Looking for BLAS for optional parts of TMVA
– Building LLVM in ‘Release’ mode.
– Could NOT find Z3: Found unsuitable version “0.0.0”, but required is at least “4.7.1” (found Z3_LIBRARIES-NOTFOUND)
– Could NOT find Backtrace (missing: Backtrace_LIBRARY Backtrace_INCLUDE_DIR)
– Native target architecture is AArch64
– Threads disabled.
– Doxygen disabled.
– Go bindings disabled.
– Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
– OCaml bindings disabled.
– LLVM host triple: aarch64-unknown-linux-gnu
– LLVM default target triple: aarch64-unknown-linux-gnu
– Building with -fPIC
– Constructing LLVMBuild project information
CMake Error at interpreter/llvm/src/CMakeLists.txt:715 (message):
Unexpected failure executing llvm-build:
/data/data/com.termux/files/usr/bin/python3.10: can’t open file
‘/sdcard/wrk/root_src/interpreter/llvm/src/utils/llvm-build/llvm-build’:
[Errno 2] No such file or directory

– Configuring incomplete, errors occurred!
See also “/sdcard/wrk/root_build/CMakeFiles/CMakeOutput.log”.
See also “/sdcard/wrk/root_build/CMakeFiles/CMakeError.log”.
…/wrk/root_build $

Hi
Is it possible to compile llvm (c++ repl) on android (aarch64 v8 sdk30)?

Please help me.

Regards. Valery

depending on what you want to achieve, using go-hep/groot may be an option.
groot can read/write ROOT files, handle TTrees, TGraphs and TH{1,2}s.
it’s written in pure-Go so can be easily cross-compiled to one of the OS/platforms supported by Go:

$> go tool dist list
aix/ppc64
android/386
android/amd64
android/arm
android/arm64
darwin/amd64
darwin/arm64
dragonfly/amd64
freebsd/386
freebsd/amd64
freebsd/arm
freebsd/arm64
illumos/amd64
ios/amd64
ios/arm64
js/wasm
linux/386
linux/amd64
linux/arm
linux/arm64
linux/mips
linux/mips64
linux/mips64le
linux/mipsle
linux/ppc64
linux/ppc64le
linux/riscv64
linux/s390x
netbsd/386
netbsd/amd64
netbsd/arm
netbsd/arm64
openbsd/386
openbsd/amd64
openbsd/arm
openbsd/arm64
openbsd/mips64
plan9/386
plan9/amd64
plan9/arm
solaris/amd64
windows/386
windows/amd64
windows/arm
windows/arm64

With termux and proot, you can run linux without root on android device. For example, https://github.com/EXALAB/AnLinux-App

When you have a linux on your android phone, it is easy to install root, vnc server and even code server in your phone. You can do nearly everything as what you can do in your computer! :grinning: