Problem using TGeoManager::Import with GDML file


I’m having trouble loading any GDML file using the TGeoManager. The previous GDML binding in $ROOTSYS/gdml worked fine, but it appears to be deprecated and removed, now.

Here is the problem that I’m having…

root [0] gSystem->Load(“libGeom”);
root [1] man = new TGeoManager(“test”,“test”);
Info in : Geometry test, test created
root [2] man->Import("/u/ey/jeremym/work/sim/build_exp/slic/examples/solids.gdml");
Info: TGeoManager::Import : Reading geometry from file: /u/ey/jeremym/work/sim/build_exp/slic/examples/solids.gdml
Error: Function StartGDML("/u/ey/jeremym/work/sim/build_exp/slic/examples/solids.gdml") is not defined in current scope (tmpfile):1:
*** Interpreter error recovered ***

The traceback seems to contain no useful information. (I’ll post it if requested.)

The static method to start the GDML processing, defined in $ROOTSYS/gdml/inc/TGDMLParse.h, is not being found by ROOT.

I notice that $ROOTSYS/gdml/ mentions a libGdml, but this was not produced with ‘make; make install’. Could this missing library be the cause of the problem? Or is the GDML processor supposed to be in the libGeom library?

Any help or suggestions appreciated, as I would like to get this working, once again.

Did you enable gdml when you configure your ROOT installation, ie like


Hi, Rene.

Thank you for the prompt reply.

I was missing the gdml configure switch. Enabling this seems to make things work okay.

This is the script I’m using…

void gdmlTest()
char* testfile="./test.gdml";

It would be great to have an example gdml script in tutorials,
or at least have the instructions at $ROOTSYS/gdml/README
updated. The current README still refers to the old python
binding, which no longer works because ROOTBinding is missing.



You are right. We will update the README file


Thanks to Ben Lloyd, there is an updated README in CVS head.

Thanks for the remark.


Hi there,

To go further, it would be really nice if :

  1. the option “–enable-gdml” was mentionned in
  2. the binding was included in the binaries by default
  3. an example was provided in the tutorials

Thanks in advance,

I’m sorry to insist.
Maybe this is a stupid request.
But I haven’t seen anything neither in the manual, nor in the tutorials.
Would it be possible to integrate gdml in the binaries ?
( in $ROOTSYS/lib/)

Thanks, Z


gdml should be included in the binaries, but apparently it has been skipped… sorry about this.
We will rebuild the binaries and let you know. But as I don’t want to rebuild all versions of ROOT, it will be available for 5.18.00 (please let me know if another version is needed)


Great !
Thanks :slight_smile:

Hi Bertrand,
Thanks for fixing this with the version v5-19-02.
Unfortunately, it has not been done for the cygwin version.
Coud you please do it ?
Thanks in advance,

PS: There is still nothing mentioned about the option “–enable-gdml” in the source installation page…

Dear Bertrand,
I know the ROOT team does not want to answer any Cygwin questions.
But as gdml has been included in the binaries for all other versions, why cannot do it fot the cygwin one ? Are there any problems ?
Thanks for keeping me posted.

I have regenerated the wingcc file to include the gdml interface. Can you try again?


That’s fine !
Thanks René

PS: Still nothing mentioned about the option “–enable-gdml” in the source installation page…

The list of all possible options is best seen with
./configure --help

The Install.html page will be substantially revisited when we will give a new face to the web site.



I read and followed suggestions discussed here, I need to open a GDML file in the ROOT, this are steps what I’m doing:

All fine up to here, but when I try to Draw


I’m getting following errors:
Info in TCanvas::MakeDefCanvas: created default TCanvas with name c1
Error in TUnixSystem::FindDynamicLibrary: RGL[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /home/dl/root/root/lib:/home/dl/root/root/lib:.:/home/dl/root/root/lib:/lib/x86_64-linux-gnu/tls/x86_64:/lib/x86_64-linux-gnu/tls:/lib/x86_64-linux-gnu/x86_64:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu/tls/x86_64:/usr/lib/x86_64-linux-gnu/tls:/usr/lib/x86_64-linux-gnu/x86_64:/usr/lib/x86_64-linux-gnu:/lib/tls/x86_64:/lib/tls:/lib/x86_64:/lib:/usr/lib/tls/x86_64:/usr/lib/tls:/usr/lib/x86_64:/usr/lib
Warning in TCanvas::TPad::CreateViewer3D: Cannot create 3D viewer of type: ogl

That I do wrong? Please help. I’m using root 6.04.