Home | News | Documentation | Download

Error linking against binary disrtibution of root

Trying to build link my software (happens to be garfield) against ROOT taken from a binary distribution (https://root.cern/download/root_v6.16.00.Linux-ubuntu16-x86_64-gcc5.4.tar.gz), I get the following:

make[2]: *** No rule to make target '/mnt/build/ws/BUILDTYPE/Release/LABEL/ROOT-ubuntu16/build/lib/libtbb.so', needed by 'lib/libGarfield.so.0.2.0'.  Stop.

The origin of which is the following entry in the ROOT binary distribution:

./cmake/ROOTConfig-targets.cmake:  INTERFACE_LINK_LIBRARIES "ROOT::Core;ROOT::Thread;/mnt/build/ws/BUILDTYPE/Release/LABEL/ROOT-ubuntu16/build/lib/libtbb.so

I think I managed to work around the problem, by editing the so many makefiles produced by my cmake (or so I think: I haven’t checked execution-time behaviour).

…But what is the recommended procedure in such a case? Would it make sense to modify the files in “./cmake” directory of the distribution, so that they do not refer to “/mnt/build/ws/BUILDTYPE/Release”? Or is there something else one can do?


ROOT Version: 6.16
Platform: ubuntu 16.04
Compiler: 5.4

Well, your binary ROOT distribution does contain “${ROOTSYS}/lib/libtbb.so”.
You could try to additionally install the one from the operating system:

sudo apt-get install libtbb-dev


But why is there this reference to “mnt/build/…etc…” in “$ROOTSYS/cmake/ROOTConfig-targets.cmake”?

Why not instead “/usr/lib/x86_64-linux-gnu/libtbb.so”?

Or even better “$ROOTSYS/lib/libtbb.so”?

That would make things simpler, wouldn’t it?

I think that binary ROOT distributions provide a “builtin_tbb” (see root-config --features).

@Axel So, it seems to me that it is a bug that it tries to access “/mnt/build/ws/...” (I assume it is the original place where the ROOT was built).

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

Indeed, this is a problem with ROOT. No CMake file should point to things in the build directory.
This has actually already been reported as ROOT-10030.

1 Like