# Cannot open gdml file

**URL:** <https://root-forum.cern.ch/t/cannot-open-gdml-file/32744>\
**Category:** Newbie\
**Created:** [February 14, 2019, 4:07pm UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744 "2019-02-14T16:07:25Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![DanielBjorkman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@DanielBjorkman](https://root-forum.cern.ch/u/DanielBjorkman)\
**Post date:** [February 14, 2019, 4:07pm UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/1 "2019-02-14T16:07:26Z")

</div>

Hi everyone

Im a complete beginner using ROOT so please be patient

I guess there is something that is not imported yet. Do any of you have any ideas?

Im trying to import my gdml file with “TGeoafTGeoManager::Import(“tileFingerPos.gdml”);”

The error message:  
“Error: Function Import(“tileFingerPos.gdml”) is not defined in current scope (tmpfile):1:  
\*\*\* Interpreter error recovered \*\*\*”

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/1/3/13f3f7f0f4956c9a0c216ce47d9cbde1cb1d54d3.png)

Many thanks

Daniel

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [February 14, 2019, 4:16pm UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/2 "2019-02-14T16:16:13Z")

</div>

Try to execute `root-config --has-python` and `root-config --has-gdml` and see if you get “yes” in both cases.

---

<div class="post-metadata">

**Author:** ![DanielBjorkman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@DanielBjorkman](https://root-forum.cern.ch/u/DanielBjorkman)\
**Post date:** [February 14, 2019, 4:32pm UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/4 "2019-02-14T16:32:30Z")

</div>

Yes these seems to be correct:

![image](https://root-forum.cern.ch/uploads/default/original/3X/f/1/f1bfce4e026171e1a24f0f5ba1e3df0e70204e1d.png)

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [February 14, 2019, 4:48pm UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/5 "2019-02-14T16:48:10Z")

</div>

In your first post, I can see a “misspelled” command `TGeoafTGeoManager::Import("tileFingerPos.gdml");` and this “misspelled” class name will generate the error that you get in ROOT 5 (ROOT 6 will give you another error message). However, if you try the proper command `TGeoManager::Import("tileFingerPos.gdml");` then it should work fine.

---

<div class="post-metadata">

**Author:** ![DanielBjorkman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@DanielBjorkman](https://root-forum.cern.ch/u/DanielBjorkman)\
**Post date:** [February 15, 2019, 8:14am UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/6 "2019-02-15T08:14:59Z")

</div>

Thanks for the answer

The command was misspelled in the text, but it was correct in the image. The “TGeoManager::Import(“tileFingerPos.gdml”);” does still not work for me:

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/a/a/aa244cb5f6689ef8cc347488a2004dd655896d47.png)

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [February 15, 2019, 9:06am UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/7 "2019-02-15T09:06:34Z")

</div>

What is your ROOT version and how did you install it?

---

<div class="post-metadata">

**Author:** ![DanielBjorkman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@DanielBjorkman](https://root-forum.cern.ch/u/DanielBjorkman)\
**Post date:** [February 15, 2019, 9:10am UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/8 "2019-02-15T09:10:05Z")

</div>

I believe ROOT 5.34/38 was already installed on my VM. Is this version too old?

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/e/f/ef175d7c240b906677aff737520c1350375411eb.png)

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [February 15, 2019, 9:11am UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/9 "2019-02-15T09:11:29Z")

</div>

That should still be fine.  
Somehow, it behaves like it did not know the “TGeoManager” class.  
Try to execute (there should be “libGeom”, “libGeomBuilder” and “libGeomPainter”):

```auto
ls -al ${ROOTSYS}/lib/libGeom*

```

---

<div class="post-metadata">

**Author:** ![DanielBjorkman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@DanielBjorkman](https://root-forum.cern.ch/u/DanielBjorkman)\
**Post date:** [February 15, 2019, 9:50am UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/11 "2019-02-15T09:50:47Z")

</div>

Finally I added the variables like this:  
export ROOTSYS=/home/cbjorkma/root/root  
export PATH=$ROOTSYS/bin:$PATH  
export LD\_LIBRARY\_PATH=$ROOTSYS/lib:LD\_LIBRARY\_PATH And with this variable definitions can I now access the libraries with "ls -al {ROOTSYS}/lib/libGeom\*"

But even then the error message is the same when I try to open my gdml file:

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/2/8/2815c775ec91fd031e94338cbffcebeef680c865.png)

Any idea of where the error could be?

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [February 15, 2019, 9:57am UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/12 "2019-02-15T09:57:46Z")

</div>

Try to first run “source /home/cbjorkma/root/root/bin/thisroot.sh” and then in the same terminal session start root.

---

<div class="post-metadata">

**Author:** ![DanielBjorkman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@DanielBjorkman](https://root-forum.cern.ch/u/DanielBjorkman)\
**Post date:** [February 15, 2019, 11:08am UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/13 "2019-02-15T11:08:26Z")

</div>

I tried and it gave me this error message:

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/8/2/8265e2f0d8432d7e0b63e6c97715c630ed4a94ea.png)

Im very confused of why this is. Any ideas?

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [February 15, 2019, 3:35pm UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/14 "2019-02-15T15:35:02Z")

</div>

It seems you are canned in a Win-dose so, maybe @bellenot could help you get free.

---

<div class="post-metadata">

**Author:** ![bellenot](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/bellenot/32/29217_2.png) [@bellenot](https://root-forum.cern.ch/u/bellenot)\
**Post date:** [February 15, 2019, 3:39pm UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/15 "2019-02-15T15:39:07Z")

</div>

It looks like you’re using a cygwin version. It should behave the same (more or less) than Linux. But note that it is not officially supported…

---

<div class="post-metadata">

**Author:** ![DanielBjorkman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@DanielBjorkman](https://root-forum.cern.ch/u/DanielBjorkman)\
**Post date:** [February 18, 2019, 2:38pm UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/16 "2019-02-18T14:38:13Z")

</div>

So I take it that I need to get a new version?

I tried installing root using “sudo yum install root” into /usr/bin/root:. This is now running version 6.14/08 and the error message from “TGeoManager::Import(“tileFingerPos.gdml”);” looks different:

 ![image](https://root-forum.cern.ch/uploads/default/original/3X/3/3/338c0043244a78d14bc98a428864a45bee77d6f2.png)

Im also trying to install root via [https://root.cern.ch/building-root](https://root.cern.ch/building-root), but without any luck. The cmake doesnt configure the files successfully. Would you recommend one way or the other to install the program?

---

<div class="post-metadata">

**Author:** ![DanielBjorkman](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/d/eb8c5e/32.png) [@DanielBjorkman](https://root-forum.cern.ch/u/DanielBjorkman)\
**Post date:** [February 19, 2019, 8:39am UTC](https://root-forum.cern.ch/t/cannot-open-gdml-file/32744/17 "2019-02-19T08:39:23Z")

</div>

Hi again

I tried installing root from scratch but my cmake doesnt work correctly

Any idea of why this is?

The cmake error file:

"  
Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.  
Compiler: /usr/bin/cc  
Build flags:  
Id flags:

The output was:  
1  
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86\_64-redhat-linux/4.8.5/…/…/…/libc.so when searching for -lc  
/usr/bin/ld: skipping incompatible //lib/libc.so when searching for -lc  
/usr/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc  
/usr/bin/ld: cannot find -lc  
collect2: error: ld returned 1 exit status

Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” failed.  
Compiler: /usr/bin/c++  
Build flags:  
Id flags:

The output was:  
1  
/usr/lib/gcc/x86\_64-redhat-linux/4.8.5/libstdc++.so: error adding symbols: File format not recognized  
collect2: error: ld returned 1 exit status

Determining if the C compiler works failed with the following output:  
Change Dir: /home/cbjorkma/install/root/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" “cmTC\_8d217/fast”  
/usr/bin/gmake -f CMakeFiles/cmTC\_8d217.dir/build.make CMakeFiles/cmTC\_8d217.dir/build  
gmake[1]: Entering directory `/home/cbjorkma/install/root/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_8d217.dir/testCCompiler.c.o /usr/bin/cc -o CMakeFiles/cmTC_8d217.dir/testCCompiler.c.o -c /home/cbjorkma/install/root/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_8d217 /usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_8d217.dir/link.txt --verbose=1 /usr/bin/cc CMakeFiles/cmTC_8d217.dir/testCCompiler.c.o -o cmTC_8d217 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libc.so when searching for -lc /usr/bin/ld: skipping incompatible //lib/libc.so when searching for -lc /usr/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status gmake[1]: *** [cmTC_8d217] Error 1 gmake[1]: Leaving directory`/home/cbjorkma/install/root/CMakeFiles/CMakeTmp’  
gmake: \*\*\* [cmTC\_8d217/fast] Error 2

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.  
Compiler: /usr/bin/cc  
Build flags:  
Id flags:

The output was:  
1  
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86\_64-redhat-linux/4.8.5/…/…/…/libc.so when searching for -lc  
/usr/bin/ld: skipping incompatible //lib/libc.so when searching for -lc  
/usr/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc  
/usr/bin/ld: cannot find -lc  
collect2: error: ld returned 1 exit status

Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” failed.  
Compiler: /usr/bin/c++  
Build flags:  
Id flags:

The output was:  
1  
/usr/lib/gcc/x86\_64-redhat-linux/4.8.5/libstdc++.so: error adding symbols: File format not recognized  
collect2: error: ld returned 1 exit status

Determining if the C compiler works failed with the following output:  
Change Dir: /home/cbjorkma/install/root/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" “cmTC\_46a2a/fast”  
/usr/bin/gmake -f CMakeFiles/cmTC\_46a2a.dir/build.make CMakeFiles/cmTC\_46a2a.dir/build  
gmake[1]: Entering directory `/home/cbjorkma/install/root/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_46a2a.dir/testCCompiler.c.o /usr/bin/cc -o CMakeFiles/cmTC_46a2a.dir/testCCompiler.c.o -c /home/cbjorkma/install/root/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_46a2a /usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_46a2a.dir/link.txt --verbose=1 /usr/bin/cc CMakeFiles/cmTC_46a2a.dir/testCCompiler.c.o -o cmTC_46a2a /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libc.so when searching for -lc /usr/bin/ld: skipping incompatible //lib/libc.so when searching for -lc /usr/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status gmake[1]: *** [cmTC_46a2a] Error 1 gmake[1]: Leaving directory`/home/cbjorkma/install/root/CMakeFiles/CMakeTmp’  
gmake: \*\*\* [cmTC\_46a2a/fast] Error 2

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.  
Compiler: /usr/bin/cc  
Build flags:  
Id flags:

The output was:  
1  
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86\_64-redhat-linux/4.8.5/…/…/…/libc.so when searching for -lc  
/usr/bin/ld: skipping incompatible //lib/libc.so when searching for -lc  
/usr/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc  
/usr/bin/ld: cannot find -lc  
collect2: error: ld returned 1 exit status

Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” failed.  
Compiler: /usr/bin/c++  
Build flags:  
Id flags:

The output was:  
1  
/usr/lib/gcc/x86\_64-redhat-linux/4.8.5/libstdc++.so: error adding symbols: File format not recognized  
collect2: error: ld returned 1 exit status

Determining if the C compiler works failed with the following output:  
Change Dir: /home/cbjorkma/install/root/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" “cmTC\_f5ef6/fast”  
/usr/bin/gmake -f CMakeFiles/cmTC\_f5ef6.dir/build.make CMakeFiles/cmTC\_f5ef6.dir/build  
gmake[1]: Entering directory `/home/cbjorkma/install/root/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_f5ef6.dir/testCCompiler.c.o /usr/bin/cc -o CMakeFiles/cmTC_f5ef6.dir/testCCompiler.c.o -c /home/cbjorkma/install/root/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_f5ef6 /usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_f5ef6.dir/link.txt --verbose=1 /usr/bin/cc CMakeFiles/cmTC_f5ef6.dir/testCCompiler.c.o -o cmTC_f5ef6 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libc.so when searching for -lc /usr/bin/ld: skipping incompatible //lib/libc.so when searching for -lc /usr/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status gmake[1]: *** [cmTC_f5ef6] Error 1 gmake[1]: Leaving directory`/home/cbjorkma/install/root/CMakeFiles/CMakeTmp’  
gmake: \*\*\* [cmTC\_f5ef6/fast] Error 2

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.  
Compiler: /usr/bin/cc  
Build flags:  
Id flags:

The output was:  
1  
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86\_64-redhat-linux/4.8.5/…/…/…/libc.so when searching for -lc  
/usr/bin/ld: skipping incompatible //lib/libc.so when searching for -lc  
/usr/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc  
/usr/bin/ld: cannot find -lc  
collect2: error: ld returned 1 exit status

Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” failed.  
Compiler: /usr/bin/c++  
Build flags:  
Id flags:

The output was:  
1  
/usr/lib/gcc/x86\_64-redhat-linux/4.8.5/libstdc++.so: error adding symbols: File format not recognized  
collect2: error: ld returned 1 exit status

Determining if the C compiler works failed with the following output:  
Change Dir: /home/cbjorkma/install/root/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" “cmTC\_6ce87/fast”  
/usr/bin/gmake -f CMakeFiles/cmTC\_6ce87.dir/build.make CMakeFiles/cmTC\_6ce87.dir/build  
gmake[1]: Entering directory `/home/cbjorkma/install/root/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_6ce87.dir/testCCompiler.c.o /usr/bin/cc -o CMakeFiles/cmTC_6ce87.dir/testCCompiler.c.o -c /home/cbjorkma/install/root/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_6ce87 /usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_6ce87.dir/link.txt --verbose=1 /usr/bin/cc CMakeFiles/cmTC_6ce87.dir/testCCompiler.c.o -o cmTC_6ce87 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libc.so when searching for -lc /usr/bin/ld: skipping incompatible //lib/libc.so when searching for -lc /usr/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status gmake[1]: *** [cmTC_6ce87] Error 1 gmake[1]: Leaving directory`/home/cbjorkma/install/root/CMakeFiles/CMakeTmp’  
gmake: \*\*\* [cmTC\_6ce87/fast] Error 2

Compiling the C compiler identification source file “CMakeCCompilerId.c” failed.  
Compiler: /usr/bin/cc  
Build flags:  
Id flags:

The output was:  
1  
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86\_64-redhat-linux/4.8.5/…/…/…/libc.so when searching for -lc  
/usr/bin/ld: skipping incompatible //lib/libc.so when searching for -lc  
/usr/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc  
/usr/bin/ld: cannot find -lc  
collect2: error: ld returned 1 exit status

Compiling the CXX compiler identification source file “CMakeCXXCompilerId.cpp” failed.  
Compiler: /usr/bin/c++  
Build flags:  
Id flags:

The output was:  
1  
/usr/lib/gcc/x86\_64-redhat-linux/4.8.5/libstdc++.so: error adding symbols: File format not recognized  
collect2: error: ld returned 1 exit status

Determining if the C compiler works failed with the following output:  
Change Dir: /home/cbjorkma/install/root/CMakeFiles/CMakeTmp

Run Build Command:"/usr/bin/gmake" “cmTC\_439b2/fast”  
/usr/bin/gmake -f CMakeFiles/cmTC\_439b2.dir/build.make CMakeFiles/cmTC\_439b2.dir/build  
gmake[1]: Entering directory `/home/cbjorkma/install/root/CMakeFiles/CMakeTmp' Building C object CMakeFiles/cmTC_439b2.dir/testCCompiler.c.o /usr/bin/cc -o CMakeFiles/cmTC_439b2.dir/testCCompiler.c.o -c /home/cbjorkma/install/root/CMakeFiles/CMakeTmp/testCCompiler.c Linking C executable cmTC_439b2 /usr/bin/cmake3 -E cmake_link_script CMakeFiles/cmTC_439b2.dir/link.txt --verbose=1 /usr/bin/cc CMakeFiles/cmTC_439b2.dir/testCCompiler.c.o -o cmTC_439b2 /usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libc.so when searching for -lc /usr/bin/ld: skipping incompatible //lib/libc.so when searching for -lc /usr/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc /usr/bin/ld: cannot find -lc collect2: error: ld returned 1 exit status gmake[1]: *** [cmTC_439b2] Error 1 gmake[1]: Leaving directory`/home/cbjorkma/install/root/CMakeFiles/CMakeTmp’  
gmake: \*\*\* [cmTC\_439b2/fast] Error 2

"
