Installing Threading Building Blocks for Open Street Routing Machine

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP

Installing Threading Building Blocks for Open Street Routing Machine



I am trying to build open street routing machine on an RaspberryPi 2 running Raspbian. However, it requires Threading Building Blocks library. I have tried several apt-get commands, but it keeps telling me it cannot find the repository. specifically, it says:


Package libtbb-dev is not available,but is refered to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libtbb-dev' has no installation candidate.



I finally broke down and downloaded the TBB source and built that. From what I can tell, threading building blocks built succesfully, but trying to build OSRM I still get the error that the TBB libraries cannot be found. I have tried copying the built TBB directory into where I think OSRM is looking for them ("/opt/intel/tbb" , "/usr/include"), but nothing is working.



Does anyone have an idea of what I might be doing wrong?



edit: This is the error I'm receiving when trying to build OSRM:


ERROR: Intel TBB NOT found!
-- Looked for Threading Building Blocks in /opt/intel/tbb;/usr/local/include;/usr/include
CMake Error at cmake/FindTBB.cmake:272 (message):
Could NOT find TBB library.
Call Stack (most recent call first):
CMakeLists.txt:191 (find_package)





Can you at least provide the related error messages?
– scai
Nov 6 '15 at 13:04





ERROR: Intel TBB NOT found! -- Looked for Threading Building Blocks in /opt/intel/tbb;/usr/local/include;/usr/include CMake Error at cmake/FindTBB.cmake:272 (message): Could NOT find TBB library. Call Stack (most recent call first): CMakeLists.txt:191 (find_package)
– thedude
Nov 6 '15 at 13:42






This might not really help you with your current problem but could help to get something ;)karussell.wordpress.com/2014/01/09/…
– Karussell
Nov 6 '15 at 14:23





Did you read Building OSRM? It says you need to install libtbb-dev on Debian. There are also various other howtos for installing OSRM on Debian or Ubuntu.
– scai
Nov 6 '15 at 15:17


libtbb-dev





Yes I did. When I try to install libtbb-dev, this is what I get--- Package libtbb-dev is not available,but is refered to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'libtbb-dev' has no installation candidate. ---This is why I tried building the source
– thedude
Nov 6 '15 at 15:39





1 Answer
1



TBB makefile does not support system-wide installation. It puts files neither in /opt nor in /usr. This is usually done either by Intel Composer/Compiler/Parallel Studio installers (in /opt/intel) or by Linux distribution itself (in /usr). But your distribution seems like not providing tbb package for installation.


/opt


/usr


/opt/intel


/usr



So, if you want to use TBB binaries which you compiled yourself, go to $TBBROOT/build/linux*_release/ directory and source tbbvars.sh script from there in order to setup your environment before compiling your program (you will be able to compile TBB examples):


$TBBROOT/build/linux*_release/


tbbvars.sh



$ source ./tbbvars.sh


source ./tbbvars.sh



or



$ . ./tbbvars.sh


. ./tbbvars.sh



(note: executing it directly gives you nothing, because your environment will not be modified)



Though, CMake's FindTBB module might be stupid enough to still report that TBB is not found because TBB does not officially support CMake. In this case, you might need either to fix the FindTBB module for looking into the env variables for TBB paths or to do the system-wide-like installation manually through copying shared library and include files to the place where CMake expects them to be located.



The layout of files in /opt/intel/tbb is the following (modified/shortened ls -R output):


/opt/intel/tbb


ls -R


/opt/intel/tbb/:
/opt/intel/tbb/include:
#copy tbb includes here
/opt/intel/tbb/include/tbb:
*.h
/opt/intel/tbb/include/tbb/compat:
*.h
/opt/intel/tbb/include/tbb/internal:
*.h
/opt/intel/tbb/include/tbb/machine:
*.h
/opt/intel/tbb/lib:
/opt/intel/tbb/lib/ia32_lin:
/opt/intel/tbb/lib/ia32_lin/gcc4.1:
/opt/intel/tbb/lib/ia32_lin/gcc4.1/irml:
/opt/intel/tbb/lib/ia32_lin/gcc4.4:
/opt/intel/tbb/lib/ia32_lin/gcc4.4/irml:
/opt/intel/tbb/lib/intel64_lin:
/opt/intel/tbb/lib/intel64_lin/gcc4.1:
/opt/intel/tbb/lib/intel64_lin/gcc4.1/irml:
/opt/intel/tbb/lib/intel64_lin/gcc4.4:
irml/ libtbbmalloc_proxy_debug.so libtbbmalloc.so.2 libtbb.so
libtbb_debug.so libtbbmalloc_proxy_debug.so.2 libtbb_preview_debug.so libtbb.so.2
libtbb_debug.so.2 libtbbmalloc_proxy.so libtbb_preview_debug.so.2
libtbbmalloc_debug.so libtbbmalloc_proxy.so.2 libtbb_preview.so
libtbbmalloc_debug.so.2 libtbbmalloc.so libtbb_preview.so.2





I'm having difficulty determining exactly what cmake is looking for. I've tried copying the entire contents of my tbb folder to the expected directories, but am still getting the same error. I've tried copying only portions of the tbb folder (libraries, specifically), but no change. and, also, what do you mean by source 'tbbvars.sh'? I've ran tbbvars.sh and it showed no errors, so I assume that the environment variables were set up. Do I need to modify it in anyway before running it again?
– thedude
Nov 6 '15 at 18:00






@thedude I've added clarifications to the answer.
– Anton
Nov 6 '15 at 20:00





So you did both ways wrong. Executing tbbvars.sh does nothing, you want to 'include' it by sourcing to your current shell. And copying does not work because there is a different layout of directory and files
– Anton
Nov 6 '15 at 20:02



tbbvars.sh





That worked! Thanks! I had to rename a few directories to match what you posted, but everything went smoothly after
– thedude
Nov 8 '15 at 3:50






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Comments

Popular posts from this blog

Executable numpy error

PySpark count values by condition

Trying to Print Gridster Items to PDF without overlapping contents