Cannot draw canvas - root runtime error

Hi. I installed root v5-34-34 patches as instructed in this forum (Trouble Installing) and it seemed as if all was fine. When I try to draw a TGraph, for instance, or execute one of the macros provided ($ root ~/Programs/v5-34-00-patches/tutorials/math/Legendre.C) there is a big error that shows up that I have not encountered before. I did make clean after that and redid the configuration and make but the same problem persists. Is there anyone that can help me with this?

Thanks in advance.

Best regards,
JW Brummer

output.txt (24.3 KB)

have you defined $ROOTSYS ? it seems the ROOT libraries are not seen

I have “source /home/wiggert/Programs/v5-34-00-patches/bin/thisroot.sh” set in my environment which has always worked. Just to be sure, I tried:

export ROOTSYS="/home/wiggert/Programs/v5-34-00-patches"
LD_LIBRARY_PATH=$ROOTSYS/lib
PATH=$PATH:$ROOTSYS/bin

but I still have the same problem. I’m not sure what’s going on as I have installed it exactly as before when it ran without a hitch.

Any other ideas?

Sourcing thisroot.sh is the right thing to do. Are le ROOT libraries visible in $ROOTYS/lib ?

Your path is pretty cluttered (from the output you provide):

/home/wiggert/Programs/v5-34-00-patches/lib:/home/wiggert/Programs/v5-34-00-patches/lib::/usr/local/lib:/home/wiggert/Programs/midas/linux/lib:/usr/local/Trolltech/Qt-4.8.6/lib:/home/wiggert/Programs/CADMesh/build:/home/wiggert/Programs/GEANT4/geant4.10.02.p01-install/:.:/home/wiggert/Programs/v5-34-00-patches/lib::/home/wiggert/Programs/v5-34-00-patches/cint/cint/stl

I would focus on first cleaning that up. For example, I see the same directory added at least three times. You can inspect the path with the following on bash:

printenv LD_LIBRARY_PATH

Then I would look in each directory for the library that is being requested and see if it is actually available. Finally, one can search the filesystem for the library being requested to find out if it lives in a directory that is not in the path as follows:

find / -name libGraf.so

Hi there

So I have a better grasp of the problem. My environment is set correctly I think so I won’t change that. I did “$ ls $ROOTSYS/lib” which does show all the ROOT libraries. When I try to draw a normal TCanvas for example, libGraf.so and libGpad.so are the two that are missing so I used grep to try and find the two missing libraries. They are not present (looked for them manually just to make sure and searched the whole root directory). Only libGraf.rootmap and libGpad.rootmap are there which remotely resembles the missing files. The output for all is attached.

I am not sure why those would be missing after a fresh install but how do I go about fixing it? I am running Ubuntu 18.04 LTS.

search-output.txt (4.8 KB)

Hello again

During my previous installation that worked completely fine, the only other thing I did was to run “make install” after “make”. I know you are not supposed to as Wiley (?) advised me. Normally running “make” is all you need to install ROOT in this way. However, I took a chance and ran “make install” expecting it to fail. It did but in doing so generated the missing library files and everything works as it did before. I tried running an example, generating a TCanvas etc. but all is fine. I think I might just need to do --enable-mathmore as my Legendres weren’t drawing.

Is there an explanation to this? I don’t understand why a command that fails as is not supposed to run completes the installation (so to speak).

Best regards,
JW Brummer

What do you get when you type “which root” … ? it might be you still point to the old installed version and may be there is some mixed up with the new version you made but not “make install”…

No chance of that. I formatted the drive before trying all of this again.

It seems like it isn’t all fixed. It complains that limMathMore does not exist in $ROOTSYS/lib. I configured with --all but running ~/root/tutorials/math/Legendre.C does not yield the correct output.

Any ideas?

I suspect that your operating system is missing the “libgsl-dev” package (and you may need to use “--all --enable-soversion --enable-gsl-shared” for ROOT 5.34).

Note: The ROOT team provides ready-to-use binary distributions for some systems, including “Ubuntu 18 gcc7.3”, which you just need to download and unpack.

Hello Wile_E

Thank you for the input. Firstly, the libgsl-dev was installed. I configured with those options as you stated. There were make errors relating to lib/libFITSIO.so or something but I am able to draw canvasses now and I’m able to draw Legendre polynomials. I didn’t run “make install” or anything like that because it didn’t complain about libGraf.so or libGpad.so being missing this time. I’m just wondering if I should correct this make error and how to do that. I’m sure it might bring problems further down the line and you would probably also advise to have no make errors.

It does mention something about “curl” but I have done “sudo apt-get install curl”.

I see that this has been discussed at length on this forum that Ubuntu 18.04 LTS should be used with cmake to build it. I just don’t know how to use cmake with the options “–all --enable-soversion --enable-gsl-shared”. Can this be used for v5.34?

Best regards,
JW Brummer

make.out.txt (18.9 KB)

If you want FITSIO (i.e. “read images and data from FITS files”), in the “./configure” script replace the line:

check_library "libcfitsio cfitsio" "no" "$cfitsiolibdir" \

with:

check_library "libcfitsio cfitsio" "$enable_shared" "$cfitsiolibdir" \

If you do not need FITSIO, instead of “--all ...”, use “--all --disable-fitsio ...”.

For ROOT 5, use “./configure”, for ROOT 6 use “cmake”.

I disabled it rather. Thank you. It works perfectly now.