This is correct. We have enabled by default ‘imt’ (implicit multi-threading) and this requires TBB. If not found in the system it tries to download and build it. Should this behaviour change? Most of today’s installations rely on network connectivity.
All the checks are done at configuration time (the cmake step). If you want to fail if imt cannot fulfil its requirements then you can enable -Dfail-on-missing=ON. If you do not want to fail and you don’t want to install TBB, then simply disable imt wth -Dimt=OFF. I think there are enough possibilities to install ROOT in disconnected computers.
Hmmm, what I wanted to say is ROOT should not guess that I have an internet connection during the cmake step. If cmake does not detect tbb, then “imt” should be OFF. This is already the case for other components. For example, if gsl is not installed then “mathmore” will be OFF automatically, ROOT will not try to download and install gsl by internet; I think it should be the same for all components to be consistent.
I agree that there is some inconsistencies, for example, between mathmore and imt that both require external packages to be installed. In the case of mathmore the option is switched off if GSL is not found, with the corresponding message from cmake. In the case of imt we wanted to expose the new functionality very widely to the users, and because of the implicit it should be as transparent as possible. If we report that TBB is not installed in the system and switch off the option, very likely the user will not be aware of it and the new functionality will not be enabled. The question is what is the percentage of users that will not look carefully at the warnings messages during the cmake phase compared to the the users that do not have an internet connection. I would guess the first case will be a majority. Therefore we have tuned the defaults to cover the maximum number of users. We are aware that whatever defaults we set, there will be cases not covered. You could argue also to embed the sources of TBB in the source tarball of ROOT, but then we penalyse users that have TBB installed in the system.
I think TBB is in a different category than packages like g++ and cmake. These latter have to be installed before ROOT. TBB and the other externals are downloaded on-demand by ROOT’s build system, so the average user should not care.
I agree it would be good to document which externals are required by which compilation flag (and which of these flags are on by default). Just my two cents
I just wanted to second pamputt’s comment about offline building. We have a similar situation at our lab with many computers on private networks where this will fail. I just wasted a LOT of time trying to figure this TBB issue out because the warning and error messages are completely inadequate. During the cmake stage, it only subtly says TBB is not found and it is switching to builtin_tbb. Nothing about requiring a network connection. Then, far into the build, I get an error which does point to some log file that finally indicates a download error. I go back to cmake and try turning off “builtin_tbb” which seems to be the source of the problem, but it won’t turn off and it doesn’t print any message indicating why. Without this forum post, I can’t imagine how I would know to turn off “imt”. (Nothing about that connection during the build or on the page https://root.cern.ch/building-root).
I’ve been building ROOT for years so was really caught off guard by the network requirement. I think adding the <4MB of TBB source to the 153MB is not so evil a burden for those with TBB already installed since I’m guessing it saves a lot more resources (of the human kind) to not have to track this issue down in the way pamputt and I did.