NLeSC / root-conda-recipes

Conda recipes for building ROOT 5 and ROOT 6 binaries, root_numpy, rootpy, root_pandas, with both Python 2 and Python 3 support.
29 stars 18 forks source link

installation on mac OS 10.11 #2

Closed CyrilGrignon closed 6 years ago

CyrilGrignon commented 9 years ago

Hi,

I tried to install root 5 and python 6 on mac OS 10.11 and I have an error related to the graphical interface I guess.

So once I activate the environment, I get: discarding /Users/cyril/anaconda3/bin from PATH prepending /Users/cyril/anaconda3/envs/testenv/bin to PATH ROOT has been sourced. Environment settings are ready. ROOTSYS=/Users/cyril/anaconda3/envs/testenv

But then if I type root: root dyld: Symbol not found: _CGLGetCurrentContext Referenced from: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo Expected in: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL i n /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo

The thing is that I can import ROOT in python, save things in a root file but I can not draw: python Python 3.4.3 |Continuum Analytics, Inc.| (default, Oct 20 2015, 14:27:51) [GCC 4.2.1 (Apple Inc. build 5577)] on darwin Type "help", "copyright", "credits" or "license" for more information.

import ROOT ROOT.TFile("test.root","recreate") <ROOT.TFile object ("test.root") at 0x100462f20> f = ROOT.TF1("f","x_x",-100,100) f.Write() 281 f.Draw("pl") Error in TMacOSXSystem::DynamicPathName: ASImage[.so | .dll | .dylib | .sl | .dl | .a] does not exist in .:/Users/cyril/anaconda3/envs/testenv/lib::/Users/cyril/anaconda3/envs/testenv/cint/cint/stl Error in TMacOSXSystem::DynamicPathName: ASImage[.so | .dll | .dylib | .sl | .dl | .a] does not exist in .:/Users/cyril/anaconda3/envs/testenv/lib::/Users/cyril/anaconda3/envs/testenv/cint/cint/stl Error in TGHScrollBar::TGHScrollBar: arrow_.xpm not found Error in TMacOSXSystem::DynamicPathName: ASImage[.so | .dll | .dylib | .sl | .dl | .a] does not exist in .:/Users/cyril/anaconda3/envs/testenv/lib::/Users/cyril/anaconda3/envs/testenv/cint/cint/stl Error in TMacOSXSystem::DynamicPathName: ASImage[.so | .dll | .dylib | .sl | .dl | .a] does not exist in .:/Users/cyril/anaconda3/envs/testenv/lib::/Users/cyril/anaconda3/envs/testenv/cint/cint/stl Error in TGVScrollBar::TGVScrollBar: arrow*.xpm not found Error in TMacOSXSystem::DynamicPathName: ASImage[.so | .dll | .dylib | .sl | .dl | .a] does not exist in .:/Users/cyril/anaconda3/envs/testenv/lib::/Users/cyril/anaconda3/envs/testenv/cint/cint/stl

To be sure, I also uninstalled root so that it does not get in the way. Any ideas how to solve this ? Cheers,

Cyril

remenska commented 9 years ago

Thanks for reporting. The MacOS conda builds of root are a bit flaky, so far ROOT I/O should work, but I haven't been able to get the graphics to work also. Could you bring back root again (conda install root=5 python=3 if you're in the environment) and post the output of conda list ?

CyrilGrignon commented 9 years ago

Yes the I/O works well so this is great. You can find the output of conda list here: https://gist.github.com/CyrilGrignon/e4c6ea942f01a824e985 Cheers

remenska commented 9 years ago

Doing conda remove libx11 sqlite should make root work, i.e., show the command prompt, but the visualization problem with TBrowser or Draw still remains. I'll investigate further.

remenska commented 9 years ago

Ok, I think the graphics should work now, can you create a new small test enviroment doing:

conda create ---name=py3root5 root=5 python=3
source activate py3root5
conda remove sqlite

and then try TBrowser/Draw or anything with graphics?

Please let me know, and thanks upfront!

CyrilGrignon commented 9 years ago

This solved something. Now I can open root in the py3root5 environment, the OpenGL error is gone. But if I create a TBrowser in python, there is the following error: https://gist.github.com/CyrilGrignon/40ae1ebaa96cdf3f810e

remenska commented 9 years ago

That's really puzzling. What is the output from:

ls /Users/cyril/anaconda3/envs/py3root5/lib | grep ASImage ? There should be the library, and if it's not, maybe anaconda picked up old cached version of root5. From the environment, can you try: conda install root=5 --force

Close any ROOT browsers you may have open.

CyrilGrignon commented 9 years ago

As you already guessed, I don't have this library. Using the force option works ! Thanks, that is great ! So now, I can type python, import root and draw things without problems: the issue opened here is then solved.

But there is still something strange: if I simply type root in the environment, I am back with the old error: dyld: Symbol not found: _CGLGetCurrentContext Referenced from: /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo Expected in: /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL in /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo

It is not a big problem because I normally use root alone out of the environment, but it is weird. I tried to remove sqlite but does not solve it.

remenska commented 9 years ago

Okay, doing --force is not what I would typically recommend, as it replaces the binary but some parts/libs from the old package may be left behind, and in addition it doesn't pick up the dependencies. Conda is sometimes not so smart to figure this out and do proper cleanup. Well, it wasn't so smart to download a fresh version without it, that's why I suggested to use the force as a last resort ;) But it may have been my fault not to increase the build counter when I pushed the new binary.

Maybe doing conda remove libx11 libpng would solve it temporary, but I hope to solve the OpenGL problem soon, and all macos issues for good, so you don't have to mess around anymore.

I typically do conda remove --name=testenv --all and remove the environment altogether, then start with a fresh one, when I try such unorthodox stuff like --force ;)