Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build from source Error: TBB not found. #6297

Closed
handcath opened this issue Aug 7, 2022 · 13 comments · Fixed by #6300
Closed

Build from source Error: TBB not found. #6297

handcath opened this issue Aug 7, 2022 · 13 comments · Fixed by #6300

Comments

@handcath
Copy link

handcath commented Aug 7, 2022

Hi,

Trying to build 5.26 on Mac OS and Ubuntu 22.04. I am getting the following error (on max os or ubuntu 22.04) when running cmake ..
The old fix (#6253) to build OSRM with the -DENABLE_MASON=ON does not work.

ERROR: Intel TBB NOT found!
-- Looked for Threading Building Blocks in /Library/Frameworks/Intel_TBB.framework/Versions
CMake Error at cmake/FindTBB.cmake:274 (message):
Could NOT find TBB library.
Call Stack (most recent call first):
CMakeLists.txt:518 (find_package)

@nitko12
Copy link

nitko12 commented Aug 8, 2022

Ran into the same issue,

it seems they are migrating to Conan package manager instead of Mason.
589becb

You could use the last Mason commit until the docs are updated, that one works for me :)
4e8ee28

Hope someone confirms this, possibly supplying Conan instructions, as my attempt building with it failed.

@nitko12
Copy link

nitko12 commented Aug 8, 2022

Hmm even
4e8ee28
seems to have some bugs, ends up using too much memory and crashing upon extracting maps,
commit before it doesn't.

@SiarheiFedartsou
Copy link
Member

SiarheiFedartsou commented Aug 8, 2022

Hmm even 4e8ee28 seems to have some bugs, ends up using too much memory and crashing upon extracting maps, commit before it doesn't.

Could you elaborate here? What exactly are you doing and have issues?

@handcath
Copy link
Author

handcath commented Aug 9, 2022

4e8ee28 appears to have successfully built, no reported memory usage issues, thank you.
However, when trying to run the example.cpp I get an include error:
/usr/local/include/osrm/engine/api/match_parameters.hpp:31:10: fatal error: 'engine/api/route_parameters.hpp' file not found #include "engine/api/route_parameters.hpp"

The include/osrm/* files don't seem to useable.

@SiarheiFedartsou
Copy link
Member

@handcath did you reinstall OSRM before it with make install? We build example on CI and it works. Also would appreciate if you provide exact steps with commands you are executing.

@nitko12
Copy link

nitko12 commented Aug 9, 2022

Could you elaborate here? What exactly are you doing and have issues?

I'm sorry for hijacking this issue, but could you try running osrm-extract after building 4e8ee28

In particular, I've tried extracting Geofabrik's United States, Midwest and New York just to make sure it wasn't a ram issue, but still failed even on New York, which is not that big of a map (I'm using 128 gb ram on Ubuntu).

I've tried it on macOS Monterey 12.4 and Ubuntu 22.04, having the same result.

The process keeps on allocating more memory, and after filling all ram and swap just terminates with "Killed." message.

I'm building it using Mason.

@SiarheiFedartsou
Copy link
Member

Could you elaborate here? What exactly are you doing and have issues?

I'm sorry for hijacking this issue, but could you try running osrm-extract after building 4e8ee28

In particular, I've tried extracting Geofabrik's United States, Midwest and New York just to make sure it wasn't a ram issue, but still failed even on New York, which is not that big of a map (I'm using 128 gb ram on Ubuntu).

I've tried it on macOS Monterey 12.4 and Ubuntu 22.04, having the same result.

The process keeps on allocating more memory, and after filling all ram and swap just terminates with "Killed." message.

I'm building it using Mason.

Okay, will try to look in the nearest days. Btw master was migrated to Conan already.

@handcath
Copy link
Author

handcath commented Aug 9, 2022

@SiarheiFedartsou.

here are the commands I ran on macOS 12.3:
mkdir -p build && cd build
cmake ..
make install

then to compile the example.cpp file:
g++ -I/usr/local/include ./example.cpp -o ./example. Actually I ran it with or without the -I path.
Throws the following include error:

In file included from ./example.cpp:1:
In file included from /usr/local/include/osrm/match_parameters.hpp:31:
/usr/local/include/osrm/engine/api/match_parameters.hpp:31:10: fatal error: 'engine/api/route_parameters.hpp' file not found
#include "engine/api/route_parameters.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@SiarheiFedartsou
Copy link
Member

@SiarheiFedartsou.

here are the commands I ran on macOS 12.3: mkdir -p build && cd build cmake .. make install

then to compile the example.cpp file: g++ -I/usr/local/include ./example.cpp -o ./example. Actually I ran it with or without the -I path. Throws the following include error:

In file included from ./example.cpp:1:
In file included from /usr/local/include/osrm/match_parameters.hpp:31:
/usr/local/include/osrm/engine/api/match_parameters.hpp:31:10: fatal error: 'engine/api/route_parameters.hpp' file not found
#include "engine/api/route_parameters.hpp"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Example has its own CMakeLists.txt. Try smth like:

cd example
mkdir build
cd build
cmake ..
make 

instead of manually calling g++

@handcath
Copy link
Author

handcath commented Aug 9, 2022

@SiarheiFedartsou, thank you.
./osrm-example built successfully.

However, memory usage as reported by @nitko12 is an issue when building new osrm file.
Following osrm file extract runs from the example folder.
osrm-extract ./osm-maps/britain-and-ireland-latest.osm.pbf -p ../../profiles/car.lua
The process gets killed by the OS. zsh: killed.

NB: I cannot use old(er) osrm files as this is 5.27, which cannot run osrm files built on 5.26.

@SiarheiFedartsou
Copy link
Member

SiarheiFedartsou commented Aug 9, 2022

@SiarheiFedartsou, thank you. ./osrm-example built successfully.

However, memory usage as reported by @nitko12 is an issue when building new osrm file. Following osrm file extract runs from the example folder. osrm-extract ./osm-maps/britain-and-ireland-latest.osm.pbf -p ../../profiles/car.lua The process gets killed by the OS. zsh: killed.

NB: I cannot use old(er) osrm files as this is 5.27, which cannot run osrm files built on 5.26.

~Weird, just tried to run it against england-latest.osm.pbf and it finished for me successfully. With peak RAM usage ~5.5GB.

Reproduced.

@handcath
Copy link
Author

@SiarheiFedartsou, thank you. ./osrm-example built successfully.
However, memory usage as reported by @nitko12 is an issue when building new osrm file. Following osrm file extract runs from the example folder. osrm-extract ./osm-maps/britain-and-ireland-latest.osm.pbf -p ../../profiles/car.lua The process gets killed by the OS. zsh: killed.
NB: I cannot use old(er) osrm files as this is 5.27, which cannot run osrm files built on 5.26.

~Weird, just tried to run it against england-latest.osm.pbf and it finished for me successfully. With peak RAM usage ~5.5GB.

Reproduced.

The only pbf files I can successfully 'osrm-extract' are very small ones, e.g. Andorra with is 2.2MB in size...

@SiarheiFedartsou
Copy link
Member

The only pbf files I can successfully 'osrm-extract' are very small ones, e.g. Andorra with is 2.2MB in size...

Please, see fix in #6304, but we probably need someone with write access to the repo to merge it in master 🤔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants