Closed alexpearce closed 5 years ago
Hi Alex,
There is a ROOT binary with xrootd compiled some time ago. It's not in the main
channel, however; it's in a channel/label called xrootd
(needs some testing). We should at some point switch to conda features rather than labeling different flavours of ROOT.
Woah, cool! That does work. Now I do:
$ conda create --name=exampleenv python=3.4
$ conda install --channel nlesc/label/xrootd root=6
and I can open files over XRootD. I do still have to specify the LD_LIBRARY_PATH
, though:
$ LD_LIBRARY_PATH=/afs/cern.ch/user/a/apearce/miniconda3/envs/exampleenv/lib root -l -b
Is that expected?
Cool, thanks for reporting! No, in principle the point of anaconda environments is that you shouldn't specify any additional environmental variables, for things to work...unless of course the conda binary you install requires them :) Like ROOT needs ROOTSYS/PYTHONPATH after sourcing thisroot.sh.
When you activate the environment, do you see the correct:
Activate: ROOT has been sourced. Environment settings are ready.
ROOTSYS=~/anaconda/envs/testenv
? Or is it this:
Activate: ROOT has been sourced. Environment settings are ready.
ROOTSYS=
I think I compiled this binary before conda changed its mind as to what env variables are available during install/environment-activation time, so that could be the issue. Another possibility is that XRootD just depends on LD_LIBRARY_PATH (less likely). To be honest, I haven't checked that.
Ah, I do get the second one, just ROOTSYS=
.
Oke, then we know, thanks. Need to find time to recompile with the recipe changed a bit :) I will keep this issue open as a reminder, but feel free to give it a try too, if you want. I can always upload your binary to the cloud.
Meanwhile sourcing thisroot.sh
is a "hack".
The NLeSC ROOT Conda package is no longer maintained and does not work properly with current Conda, modern Python, or modern ROOT. Use conda-forge ROOT instead:
conda create -n myrootenv python=3.7 root -c conda-forge
conda activate myrootenv
conda config --env --add channels conda-forge
From then on, use conda activate myrootenv
to get in and conda deactivate
to get out of the env. You should have a recent version of conda.
or
conda config --env --add channels conda-forge
conda install root
Unlike the NLeSC package, this can even be the base environment if you really want to do that (it is not ideal, since it will be rather invasive, adding things like conda's compiler packages that are needed to compile with ROOT and Conda).
Conda-forge ROOT provides ROOT 6.16.00+, and supports Python 3.7, 3.6, and 2.7 on macOS and Linux. It is being tested by the ROOT team, and is automatically build by the conda-forge infrastructure. All default features and a huge number of optional features are turned on, and you can use it anywhere you would use ROOT, JupyROOT, or PyROOT.
I'm unable to load files with ROOT over the [XRootD]() protocol. Below is what I do, and then what I think the problem might be.
Reproducing
I create a conda environment with:
And then I try to load a file over XRootD:
I first get an error about loading
libpcre
:I modify my
LD_LIBRARY_PATH
and try again:I see the same messages if I also
conda install xrootd
.Maybe reasons
There is a guide for installing XRootD with ROOT, and it says XRootD can either be installed by ROOT during the
make
step, or ROOT can be told about an external build. I don't think the NLeSC builds enable either of these options. Would it be possible to do so?