Offline Build Update


We have been attempting to build ROOT for some offline machines, but have run into issue downloading “hidden” dependencies such as TBB. This issue has been mentioned in a number of places around the forum and an open bug, but I have not seen a complete answer on how to build while offline.

First is there a list of the built-ins that I need to downlaod to build ROOT?

Secondly, why does the CMake ignore the builtin flags? For example, I’ve installed TBB to avoid the download and set -Dbuiltin_tbb=OFF, but it switches back to ON and again attempts to download.


ROOT Version: 6.16.00
Platform: Not Provided
Compiler: Not Provided

Hi, not many people complain about this, so it’s not a high priority item to solve, unfortunately. Please vote on the JIRA item so I can convince others that it’s important to resolve this. If you have builtin_tbb getting enabled back it’s because ROOT cannot find your installation of TBB, or because you have an installed version that is too old. Several builtins require a network connection to work, so if you want to build offiline reliably, I’d use -Dminimal=ON or -Dgminimal=ON and then enable only the things you want on top. This should disable most optional features. With grep -B1 ^builtin CMakeCache.txt (in the build directory) you can check which builtins have been enabled (and which of them require an active network connection, see below for an example). Most of the setup for the builtins is in cmake/modules/SearchInstalledSoftware.cmake, so you can look there to see why each builtin was enabled. You can then either install missing dependencies on your system, or disable the option that requires the builtin. For TBB, just use -Dimt=OFF. Cheers,

$ grep -B1 ^builtin CMakeCache.txt
//Build bundled copy of libAfterImage
//Build CFITSIO internally (requires network)
//Build bundled copy of Clang
//Build Davix internally (requires network)
//Build FFTW3 internally (requires network)
//Build bundled copy of freetype
//Build bundled copy of FTGL
//Build bundled copy of gl2ps
//Build bundled copy of GLEW
//Build GSL internally (requires network)
//Build bundled copy of LLVM
//Build bundled copy of lz4
//Build bundled copy of lzma
//Build OpenSSL internally (requires network)
//Build bundled copy of PCRE
//Build TBB internally (requires network)
//Build bundled copy of unuran
//Build Vc internally (requires network)

//Build VDT internally (requires network)
//Build VecCore internally (requires network)

//Build XRootD internally (requires network)
//Build bundled copy of xxHash
//Build bundled copy of zlib

Alternatively, you can run this in the source directory:

$ grep -r 'requires network'
cmake/modules/RootBuildOptions.cmake:ROOT_BUILD_OPTION(builtin_cfitsio OFF "Build CFITSIO internally (requires network)")
cmake/modules/RootBuildOptions.cmake:ROOT_BUILD_OPTION(builtin_davix OFF "Build Davix internally (requires network)")
cmake/modules/RootBuildOptions.cmake:ROOT_BUILD_OPTION(builtin_fftw3 OFF "Build FFTW3 internally (requires network)")
cmake/modules/RootBuildOptions.cmake:ROOT_BUILD_OPTION(builtin_gsl OFF "Build GSL internally (requires network)")
cmake/modules/RootBuildOptions.cmake:ROOT_BUILD_OPTION(builtin_openssl OFF "Build OpenSSL internally (requires network)")
cmake/modules/RootBuildOptions.cmake:ROOT_BUILD_OPTION(builtin_tbb OFF "Build TBB internally (requires network)")
cmake/modules/RootBuildOptions.cmake:ROOT_BUILD_OPTION(builtin_vc OFF "Build Vc internally (requires network)")
cmake/modules/RootBuildOptions.cmake:ROOT_BUILD_OPTION(builtin_vdt OFF "Build VDT internally (requires network)")
cmake/modules/RootBuildOptions.cmake:ROOT_BUILD_OPTION(builtin_veccore OFF "Build VecCore internally (requires network)")
cmake/modules/RootBuildOptions.cmake:ROOT_BUILD_OPTION(builtin_xrootd OFF "Build XRootD internally (requires network)")

Thanks for the tips, if I get some more time to work on this I’ll investigate which flags need to be set.

It turns out the the binary build for ROOT 18.04 was nearly what we needed, so we have used that. It is however missing the python 3 bindings, which is odd because python3 is installed by default.

I went to vote on the issue and see that I am already following it, so I can’t throw anymore weight at it.

Do you have any suggestion as how to implement a check to see if one of these packages is available? I’ve had issues download TBB in the past and it would be nice to see CMake ExternalPacakge allow one to set a pacakage as optional or pass a variable that the download failed with killing the entire build. I assume this would help solve the offline build issues.

Not sure what you mean here. You mean in the system? The check is done with find_package().

If you download a package into the place where CMake expects to find it, or download into ROOT’s subdir and change URL in the call to ExternalProject_Add() to ${CMAKE_SOURCE_DIR} it will work offline. TBB is already optional, but our option names are not so intuitive, I guess. You can disable it with -Dimt=OFF.

As for Python support, our binaries come with bindings for whatever /usr/bin/python is. So in Ubuntu that’s Python 2.x, even though Python 3.x may be installed. In the future we plan to support both at the same time.

Since all options requiring a network connection are now documented, I believe that you can easily avoid problems when building offline. My suggestion is to use -Dminimal=ON and enable by hand things you want, such as -Droofit=ON -Dtmva=ON, etc. If you look at the options docstrings (i.e. by running cmake -LH in the build directory after first configuration), you will know which enabled options require the network and can disable them. For example, with cmake -LH | grep -A1 network you can see only the options that require an active network connection. You just have to make sure that for each enabled builtin_pkg you also disable the equivalent pkg so ROOT doesn’t enable it back.

Sorry I may have convoluted two issues. One is trying to build ROOT for a system where it is entirely disconnected, which I believe you have provided enough information to track down.

Another issue is when a single package is unavailable from the internet. This has occurred int he past for me with TBB:

My question was if it is possible to have CMake not stop on these sort of failed downloads and instead just provide a warning and a flag that an optional package wasn’t available and then continue with the build.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.