/usr/bin/ld: /home/hcx/Software/Gate/root/root/lib/libImt.so: undefined reference to `tbb::interface7::internal::isolate_within_arena(tbb::interface7::internal::delegate_base&, long)'


_ROOT Version:6.18
_Platform:ubuntu 18.04
Compiler: Not Provided


I got this linking error at the end of make while I was build Gate,in which root play as a important component.According to the message,I think it’s somehow related to root

[100%] Linking CXX executable Gate
/usr/bin/ld: /home/hcx/Software/Gate/root/root/lib/libImt.so: undefined reference to `tbb::interface7::internal::isolate_within_arena(tbb::interface7::internal::delegate_base&, long)'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/Gate.dir/build.make:10354: Gate] Error 1
make[1]: *** [CMakeFiles/Makefile2:73: CMakeFiles/Gate.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Is it because I didn’t build root correctly?The following is what I get when I run root.

ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C x86_64-linux-gnu-g++-7  -O3 -DNDEBUG -xc++ -E -v /dev/null 2>&1 >/dev/null | awk '/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}' | GREP_OPTIONS= grep -E "(c|g)\+\+"
Results was:
With exit code 256
   ------------------------------------------------------------
  | Welcome to ROOT 6.18/00                  https://root.cern |
  |                               (c) 1995-2019, The ROOT Team |
  | Built for linuxx8664gcc on Jun 25 2019, 09:22:23           |
  | From tags/v6-18-00@v6-18-00                                |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0] 

I ignored the '‘ERROR in cling…’'because I can still do calculation with this error existing.
I bothered me for a long time ,any tips will be appreciated!

Hello @carr001,

I assume this is a custom-built root? Did you use a system-installed tbb or the builtin tbb? It looks like an incompatible tbb version.

Hi StephanH,
It is a custom-built root for Gate,and I not sure if I use a system-installed tbb or a builtin tbb,but I find libtbb.so in both directory:

/usr/lib/x86_64-linux-gnu/libtbb.so

and

/home/hcx/Software/Gate/root/root/lib/libtbb.so

The following is my PATH variable:

/home/hcx/geant4_workdir/bin/Linux-g++:/home/hcx/Software/Gate/geant4/geant4.10.05.p01-install/bin:/home/hcx/Software/Gate/geant4/geant4.10.05.p01-install/bin:/home/hcx/Software/Gate/root/root/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/hcx/Software/Gate/root/root/lib

tell me if the information above helps to solve the problem,
best,
carr

Ok, that’s a good start. Can you also check LD_LIBRARY_PATH and run ldd on a library in gate that uses tbb?
One thing that can go wrong is that the system libraries come first in LD_LIBRARY_PATH such that the system library is loaded instead of the root-internal library. That would be fixed by changing their order in LD_LIBRARY_PATH. ldd will tell you which one is getting loaded.

Hi StephanH,

You are right! I build Gate successfully by simply move /home/hcx/Software/Gate/root/root/lib in front of other directories in LD_LIBRARY_PATH variable! Thank you so much!

One thing is still not perfect is that when I run root , I still got the error message below,

ERROR in cling::CIFactory::createCI(): cannot extract standard library include paths!
Invoking:
  LC_ALL=C x86_64-linux-gnu-g++-7  -O3 -DNDEBUG -xc++ -E -v /dev/null 2>&1 >/dev/null | awk '/^#include </,/^End of search/{if (!/^#include </ && !/^End of search/){ print }}' | GREP_OPTIONS= grep -E "(c|g)\+\+"
Results was:
With exit code 256
   ------------------------------------------------------------
  | Welcome to ROOT 6.18/00                  https://root.cern |
  |                               (c) 1995-2019, The ROOT Team |
  | Built for linuxx8664gcc on Jun 25 2019, 09:22:23           |
  | From tags/v6-18-00@v6-18-00                                |
  | Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
   ------------------------------------------------------------

root [0]

I can still do calculation now,but I don’t know if it will go wrong in the future,is there any way to kill this error?
best,
carr

@Axel do you know what cling is looking for?

cling was built with x86_64-linux-gnu-g++-7 as compiler. It needs to figure out what the compiler’s include paths are at cling runtime, and so it’s trying to ask it. But that fails - maybe x86_64-linux-gnu-g++-7 doesn’t exist on that machine?

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.