prusa3d / PrusaSlicer

G-code generator for 3D printers (RepRap, Makerbot, Ultimaker etc.)
https://www.prusa3d.com/prusaslicer/
GNU Affero General Public License v3.0
7.73k stars 1.93k forks source link

TBB library cannot be found. Consider set TBBROOT environment variable. #3183

Closed norre-daroy closed 4 years ago

norre-daroy commented 4 years ago

Version

version_2.1.0-485-g050a9adf3

Operating system type + version

macOS Mojave 10.14.6

Behavior

Any help is appreciated. Thank you so much :)

Screen Shot 2019-11-13 at 12 54 38 AM

Is this a new feature request? No

tamasmeszaros commented 4 years ago

Its hard to tell from this error message only. Check the CMake prefix path and if TBB is built properly there (should be a static library). Also if you use the deps directory to build the dependencies, and then configure PrusaSlicer project, make sure you have -DSLIC3R_STATIC=ON when calling cmake.

norre-daroy commented 4 years ago

Hello. Thank you so much for replying. When you said check the CMake prefix path is it this command cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local". Because all I did was build the dependencies as per instructed in the deps directory with cmake .. then make. And I got some make errors. I am not sure where to build TBB Screen Shot 2019-11-13 at 10 04 17 AM

But I ignored these errors and proceeded to build PrusaSlicer with mkdir build, cd build, cmake .. -DCMAKE_PREFIX_PATH="$PWD/../deps/build/destdir/usr/local". What step am I missing and where should I add-DSLIC3R_STATIC=ON when calling cmake?

In this screenshot, it says my SLIC3R_STATIC is already ON. But CMAKE_PREFIX_PATH element does not exist. Screen Shot 2019-11-13 at 10 08 17 AM

Thank yo so much for your help

lukasmatena commented 4 years ago

@norre-daroy Your deps build failed on building boost, so it never got to build TBB. That's why it wasn't found. Boost was, because you have it installed on your system.

As to why it failed, I don't know. There is something wrong in the path around the WebDev directory. Is there some chance it has a trailing space at the end? If so, I'd repeat what you were doing in e.g. /Users/ninja.n/PrusaSlicer to see what happens.

The -DSLIC3R_STATIC=ON should be passed as another argument to cmake when building PrusaSlicer (not the dependencies).

norre-daroy commented 4 years ago

@lukasmatena you were right. I had some trailing space at the end. I successfully built it.

italocjs commented 4 years ago

Hi, how did you fix this? i'm stuck in a similar error, i never used visual studio before and i'm totally lost

vitasimek commented 4 years ago

I have same problem on Debian Bullseye. TBB installed by apt.

senseisimple commented 4 years ago

I have same problem on Debian Bullseye. TBB installed by apt.

If it's installed by apt, you'll probably need to add -DTBB_LIBRARIES=/usr/include/tbb to your cmake command.

i.e. cmake .. -DSLIC3R_STATIC=1 -DCMAKE_PREFIX_PATH=/opt/PrusaSlicer -DTBB_LIBRARIES=/usr/include/tbb

boromyr commented 4 years ago

I am also stuck with the tbb libraries, I keep getting this error from CMake all the time, despite having entered the correct path. Latest stable release downloaded from https://github.com/oneapi-src/oneTBB, but there is no instruction on how to install it.

italocjs commented 4 years ago

its been quite some time i fixed this, but i think i did a fresh install on C:/ instead of default directory.

boromyr commented 4 years ago

Should I then install boost and tbb in C:\?

Drachenkaetzchen commented 3 years ago

If you are on Windows, use absolute paths. I stumbled on this when I tried to be smart and used a relative path like ..\..\PrusaSlicer-deps\usr\local, which resulted in this error. A full path like C:\src\PrusaSlicer-deps\usr\local did work.

spuder commented 2 years ago

TBB library cannot be found. Consider set TBBROOT environment variable. (missing: TBB_INCLUDE_DIRS TBB_LIBRARIES)

After fighting this for hours on OSX 11.6, I finally worked around it by resetting the deps directory in git.

rm -rf deps/build
rm -rf deps
git checkout deps/*
mkdir -p deps/build
cd deps/build
cmake ..

🎉

If you are running into issues, also check the output of PrusaSlicer/deps/CMakeFiles/CMakeOutput.log and PrusaSlicer/deps/CMakeFiles/CMakeError.log