Questions about ROOT6 packaging

for Archlinux.

Hello,
I’m packaging (unofficially) ROOT6 for Archlinux, this is build script and ROOT6 configuration (they are a bit different than AUR root-extra package). The package builds fine but I found issues that what to resolve.

  1. Though I enable python binding (python3) after installation (
make install DESTDIR=PKGDIR

) there are no

ROOT.py

and

cmdLineUtils.py

files in

/usr/lib/root

that can be found in precompiled binaries. Is there problem with the configuration? Why python binding is not built?

Side note:

cmdLineUtils.py

in precompiled binaries the first line is

/usr/bin/env @python@

. Is this

@python@

correct? Is this file used by ROOT?

  1. Is it possible to regenerate
*.pcm

files (they are located in

/usr/lib/root

)? The problem is that they have full path to these files but pointing to build directory. This is true for precompiled binaries too. Is it OK? Or they are not used?

  1. Returning to my old question. Now I reconsider some points mentioned there. Consider following proposal:
  • move following directories from /etc/root to /usr/lib/root:
    cling
    dictphc
    plugins
    
  • move following directories from /etc/root to /srv/root
    html
    http
    notebook
    
  • move file
    /etc/root/allDict.cxx.pch
    
    to
    /usr/lib/root
    

In previous thread I was told that

html

is from old doc system but still I think it is worth to move to that directory.

As for

notebook

I still think that as this is “web application” then it is worth to place it into

/srv/root
1 Like

Just a comment on this one line. This looks as though this is a file that is intended to be configured by CMake and have `@python@ replaced with the python version indicated during the configuration.

Hi @vp1981, I intend to work on packaging ROOT for some Linux distributions in the next year, and on making it easier for others to package it in other distros too. The idea is to provide scripts for configuring and compiling ROOT and to make ROOT follow FHS more closely, as you propose above. As for the question you have, let me answer it in parts.

About Python

I saw in your configuration that you have python=OFF and python3=ON, please invert that to python=ON and python3=OFF, regardless of what version of python you are trying to use. If you need to compile ROOT against a specific Python interpreter, please set -DPYTHON_EXECUTABLE=/full/path/to/python with CMake. That should solve the problem that you have. There is a minor bug with the python3 option in CMake, so it only works if you are compiling against Python 3.5.

At the moment, there are still some hard paths in the build system, so it’s difficult to make ROOT work if you set configuration directories individually, like you are doing in your build script. I recommend that for the time being, you install ROOT into /opt/root and add /opt/root/bin to $PATH and /opt/root/lib to $PYTHONPATH. Please make sure to configure ROOT with -Drpath=ON and -Dsoversion=ON, and use the same compiler that is used for the rest of the system to avoid ABI incompatibilities.

In the future, we will try to make the installed files go automatically into the right places according to their purpose instead of many of them going to /etc/ as happens now. Please let us know if you have any other questions. It will be nice if we can make ROOT available to at least the major distributions in the next coming months.

Thank you amadio.

As for python, it is a bit confusing to have ‘python’ and ‘python3’ options and that only the first one has effect. I’ll change configuration settings and recompile the ROOT package.

1 Like

Hello Amadio.

Got it, but I don’t get this one:

What do you mean saying “install ROOT”? Do you mean to do

make install

in build directory? But that is against the whole idea to build on some system the package and install it on other ones.

I compile ROOT for Archlinux (the Archlinux package) and install it on Archlinux hosts where I need it. I also compile ROOT for Ubuntu (not Ubuntu package, that’s too difficult to me) and do

make install

(prefix is set to /usr/local/opt/root), that’s the only system where I run that command (I don’t use Ubuntu, I make tar.xz archive of /usr/local/opt/root for my students).

I wondered about *.pcm files because they contain information about full path to build directory (just look into pcm in precompiled binaries provided by root.cern.ch), so I suspected that they are either useless (it is unlikely that users will download precompiled binaries, unpack them, check the build path stored in *.pcm files and unpack the tar.gz archive in corresponding place) or that full path is not used at all (why then it is written to pcm file?) or there is easy way to regenerate them with correct current path.


Vladimir Lomov

No, that is not what I meant. I meant that you should configure ROOT with prefix equal to /opt/root (or /usr/local/opt/root as you have), then make install, which will install ROOT into that directory with consistent file paths. Don’t configure ROOT to install into the build directory, that is a bad idea. However, you should not build it in one system to install on another (e.g. build on Arch, install on Ubuntu), because that will most likely not work. The reason is that each system uses its own compiler, and the libraries generated in one system may not be ABI compatible with libraries from another system.

BTW, once you have ROOT built in your build directory, you may run cpack to produce the tarball directly, without needing to install it in your system first.

The PCMs are precompiled files that ROOT loads during runtime; they are not useless. They will have the right path in them once you install ROOT.

Hello Amadio,

sorry, I misunderstood your answer and replied in wrong way. Let’s try again.

like this

cmake -DCMAKE_INSTALL_PREFIX=/opt/root

or -DCMAKE_INSTALL_PREFIX=/usr/local/opt/root.

I’m not sure either this assumes that -Dgnuinstall=OFF or not but. Still as I understand this means that ROOT will be installed in that directory but all these files there are NOT controlled by package manager (pacman in case of Archlinux). That is OPPOSITE I try to do.

I’m deliberately building ROOT package (as Archlinux package) on system with enough space, memory and with high CPU (I must “thanks” clang) in order to install the package on other hosts with Archlinux on them.

I mentioned Ubuntu in previous message because I’m using Archlinux but most my students are using Ubuntu, so I have to compile ROOT for Ubuntu (17.10) in VM and install ROOT into /usr/local/opt/root, after that I’m just do

cd /usr/local/opt
tar cf ~/tmp/root.tar root
xz -v ~/tmp/root.tar

and give them the tar.xz archive.

I didn’t know, will use (for Ubuntu of course), thank you.

And I don’t this at all. I downloaded precompiled binaries from root site: for Fedora 24, for CentOS7, Ubuntu 16 and MacOS x64-10.13-clang90, unpacked them, cd ~/tmp/root/$OS/lib and did, for example for fedora

$ strings libASImageGui_rdict.pcm
root
TFile
/mnt/build/workspace/root-release-6.10/BUILDTYPE/Release/COMPILER/native/LABEL/fedora24/build/root_v6.10.08-cmake/lib/libASImageGui_rdict.pcm
/mnt/build/workspace/root-release-6.10/BUILDTYPE/Release/COMPILER/native/LABEL/fedora24/build/root_v6.10.08-cmake/lib/libASImageGui_rdict.pcm
TObject
EMPTY
Basic ROOT object
TFile
/mnt/build/workspace/root-release-6.10/BUILDTYPE/Release/COMPILER/native/LABEL/fedora24/build/root_v6.10.08-cmake/lib/libASImageGui_rdict.pcm
TObject
EMPTY
Basic ROOT object
TFile
/mnt/build/workspace/root-release-6.10/BUILDTYPE/Release/COMPILER/native/LABEL/fedora24/build/root_v6.10.08-cmake/lib/libASImageGui_rdict.pcm

Is this OK? I don’t know, because I’m free to unpack root_v6.10.08.Linux-fedora24-x86_64-gcc6.1.tar.gz to any directory I have write access (into ~/opt or /opt/root or /usr/local/opt/root if I’m an admin), so these paths will certainly be wrong if they are used.

This one is not so important, as long as you unpack ROOT into the same directory when installing the package in Arch. If you want to prepare the tarball without installing, you can do env DESTDIR=/tmp/root cmake --build . --target install, and cmake will install into /tmp/root/ but leave the relevant paths pointing to /opt/root/ as you configured. Then you can tar the installed files into your Arch package.

As for the PCM paths, it’s probably a bug. It is probably harmless, but the paths should point to the right place. I will follow this up and file a JIRA issue if needed. Cheers,

Hello Amadio.

That what package manager usually do.

I’ll try this one (I do make DESTDIR=PATH_TO_DESTDIR install).

Thank you Amadio, esp. for your patience.

It’s the same thing, the advantage of using cmake is that it will also work if you use ninja as a generator.

Well, let us know if you have any more questions, and if an official package for ROOT lands on Arch, let us know too!

Thank you,

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