Few questions about ROOT installation

Hello,
I have several questions about files that ROOT installs into /etc directory and one about cling/llvm/clang. At first, some background info: I’m using Archlinux x86_64, to build and install ROOT I use distribution tool, pacman. ROOT is configured with options:

gnuinstall=ON CMAKE_INSTALL_PREFIX=/usr CMAKE_INSTALL_SYSCONFDIR=/etc/root
(this is just some of them).

Questions:

  1. In directory /etc/root/plugins I see subdirectories with @@ in they names, like /etc/root/plugins/ROOT@@Math@@DistSampler
    The same directories I see in source directory under the path etc/plugins
    Are these directories names Ok, or they are leftover from some process?
  2. Also, shouldn’t this directory goes into, e.g., /usr/share/root ?
  3. Some directories seem don’t belong /etc, like /etc/root/cling and /etc/root/dictpch because they contain header files. IMHO, this especially concerns the directory /etc/root/cling. Is there any option to specify the location for these directories under /usr/include, for example, to put them into /usr/include/root? If there is no such option, is it safe to move them to /usr/include/cling and /usr/include/root/dictpch manually?
  4. AFAIU, the /etc/root/notebook/kernels/root directory should go into /usr/share/jupyter/kernels. Is there any option to specify the path at configuration time (cmake)?
  5. According to the name of the directory: /etc/root/notebook the rest subdirectories in there, JsMVA custom html are needed for jupyter kernel, is that right? If so, shouldn’t they be in /usr/share/root/notebook or other directory searched by jupyter?
  6. I’m not sure about directories /etc/root/html and /etc/root/http, what the purpose of these directories? If they are needed for external web server it will require extra configuration step in any case, so may be they should go into /srv. If they are used by ROOT itself then may be they should be put into /usr/share/root

The last question is about building ROOT with exteral llvm/clang: am I right that this is currently not possible and seems to be impossible ever?

Thank you in advance,
Vladimir Lomov

Hi Vladimir!

  1. Yes the names are okay; that’s the output of our mangling, not a left-over :slight_smile:
  2. These are similar to udev files: they are plugin configurations. So I’d argue that /etc/root/plugins is okay. You could actually edit them and / or replace them and / or add to them.
  3. These files should go under /usr/share/root - they are runtime files, not headers in the traditional sense. I.e. client code should not include or use them. sft.its.cern.ch/jira/browse/ROOT-8588 tracks that
    4, 5) I have created sft.its.cern.ch/jira/browse/ROOT-8590 for that.
  4. http: that’s sft.its.cern.ch/jira/browse/ROOT-8591; for html: that’s our old doc generator; these are config files that people can replace to create their own headers / footers / CSS etc.
  5. We are working on allowing ROOT to build with an external llvm. That’s already a big step :slight_smile: I am hesitant to state anything about eternity, but building against an external clang will take a bit longer.

Thanks for your reports!

Axel.

Hello Alex,
first of all, thank you for your answers and if you don’t mind I have other questions to clarify points.

I didn’t find clear information about this but according to https://root.cern.ch/root/htmldoc/guides/users-guide/ROOTUsersGuide.html#plugins-runtime-library-dependencies-for-linking I would guess that these “plugins” add some functions (functionality) into interactive session either automatically (at every interactive run) or manually when user runs specific function though names for files and functions a bit unfriendly. Correct me if I’m wrong about these “plugins” but if I’m right then from my POV it is Ok for the directory to be in /etc/root/plugins (though it is much more like profile files for bash than udev rules because, for example, in my distribution /etc/udev almost empty: two files and two empty directories; most of files are lived in /usr/lib/udev).

Thank you to open a ticket for this.

Seems that I misunderstood the whole idea of jupyter kernels. I followed the links https://github.com/jupyter/jupyter/wiki/Jupyter-kernels, https://github.com/root-mirror/root/tree/master/bindings/pyroot/JupyROOT and in last one I saw

[quote]Start using ROOTbooks

Set up the ROOT environment (. $ROOTSYS/bin/thisroot.[c]sh) and type in your shell:

root --notebook

This will start a ROOT-flavoured notebook server in your computer.

Alternatively, if you would like to use the Jupyter command directly, you can do on Linux:

cp -r $ROOTSYS/etc/notebook/kernels/root ~/.local/share/jupyter/kernels
jupyter notebook

and on OSx:

cp -r $ROOTSYS/etc/notebook/kernels/root /Users/$USER/Library/Jupyter/kernels/
jupyter notebook

Once the server is up, you can use ROOT with two kernels:

ROOT C++: new kernel provided by ROOT
Python 2: already provided by Jupyter

[/quote]

Therefore I thought that if this directory /etc/root/notebook/kernels/root is related with jupyter kernels then it should be in proper place. The quoted text tells about personal installation (it mentions $ROOTSYS, i.e. not gnuinstall) and copying stuff into proper local directory, so in case of “global” installation this directory should be there where jupyter can find it. But I’m newbie to jupyter kernels and don’t know much about how it (jupyter) works.

(please note that I explicitly put URL into BBCode because otherwise engine treats ‘;’ as part of URL)

About http: IIUC, this URL https://root.cern.ch/root/htmldoc/guides/HttpServer/HttpServer.html describes exactly that functionality. Seems that this is unrelated with notebook (jupyter?) but as well gives access to ROOT through web technology.

That is very inspiring news!


WBR, Vladimir Lomov

Hi Vladimir,

I let our Jupyter people reply on that part. The plugins react e.g. to "TFile::Open(“myProtocol://foo/bar”) - you can register a handler for “myProtocol” within the TFile context. And yes, udev is a bad example because they have changes the location about three times, and distros disagree as much as possible with udev :slight_smile:

I said “for http: Jira ticket” and then, same line right after but different topic: “for html: that’s our old doc generator”. Sorry if that was confusing.

Cheers, Axel.

Hi Vladimir,

I think there is nothing wrong with having the Jupyter-related files for ROOT in /etc/root/notebook/, including the kernel. When the user runs “root --notebook”, these files will be made available to Jupyter, so no need to do any copy, one can just work with “root --notebook”.

Moreover, only the users that actually invoke ROOT will find their ROOT C++ kernel in the Jupyter list (plus other ROOT-related customisations of Jupyter), while this won’t show up for those that might be interested in working with different kernels of Jupyter (which they might have installed in $HOME/.local).

Cheers,

Enric

Hello Enric,
thank you for answer. I’m still not sure about rationale of current path to notebook files when gnuinstall=ON but I came to following ideas. Correct me if I’m wrong with them.

If one runs

$ root --notebook

then root invokes (internally?) jupyter passing to it the path to ROOT kernel files. IMO, this hides from an user that he/she needs jupyter to be installed. If ROOT kernel files were installed in proper place (into /usr/share/jupyter/kernels according to https://jupyter.readthedocs.io/en/latest/projects/jupyter-directories.html) the user may run just

$ jupyter notebook

and choose root kernel from list of kernels. I think this is consistent way to choose different jupyter kernels. So, I would say that when ROOT is installed by distribution package manager (in my case it is pacman) then the proper place for jupyter kernel is in /usr/share/jupyter/kernels and it is a packager duty to inform the user that he/she must install jupyter package as well.

I see only one drawback of this scheme: the documentation. The documentation has to explicitly say that when ROOT is installed by means of package manager then jupyter kernel files are located under /usr/share/jupyter/kernels and the ROOT kernel must be launched as any other kernel by running

$ jupyter notebook

and choosing ROOT kernel from list of kernels. But when ROOT is installed by a user, i.e. manual installation, the user either has to copy kernel files into ~/.local/share/jupyter/kernels and run as usual

$ jupyter notebook

or run command

$ root --notebook

WBR, Vladimir Lomov

Hello Vladimir,

If a user runs “root --notebook” and Jupyter is not installed, she is informed of that fact. I believe it’s good to keep the “root --notebook” entry point because, besides the kernels, this opens the door to do some customization of Jupyter for ROOT usage.

However, please note that using ROOT does not necessarily imply using Jupyter (one can also interact with the interpreter via the ROOT prompt). In that sense, it is not a strong dependency. Only if a user really wants to use ROOT with notebooks, via “root --notebook”, she will have to install Jupyter and ROOT will take care of the rest. I find this more convenient than placing the ROOT kernel always in the standard Jupyter folder.

Kind regards,

Enric

Hello Enric,
thank you for your patience.