Cannot open gdml file

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 ***”

Many thanks

Daniel

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

Yes these seems to be correct:

image

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.

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:

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

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

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”):

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

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:

Any idea of where the error could be?

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

I tried and it gave me this error message:

Im very confused of why this is. Any ideas?

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

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…

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:

Im also trying to install root via 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?

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

"