[MacOS] Library not loaded: @rpath/libtbb.dylib

Hello, I’m having a strange issue and maybe some of you who have a better understanding of the build system can help me.
I am developing a stand-alone process inside my project, which will be executed from my game. However, since I upgraded to UE5, the executable of that process crashes at startup with the following error:

dyld[11299]: Library not loaded: @rpath/libtbb.dylib
  Referenced from: /Users/dpons/Downloads/MySubProcess
  Reason: tried: '/Users/dpons/Downloads/libtbb.dylib' (no such file), '/Users/dpons/Downloads/libtbb.dylib' (no such file), '/Users/dpons/Downloads/../../../../../UnrealEngine/Engine/Binaries/ThirdParty/Intel/TBB/Mac/libtbb.dylib' (no such file), '/Users/dpons/Downloads/libtbb.dylib' (no such file), '/Users/dpons/Downloads/libtbb.dylib' (no such file), '/Users/dpons/Downloads/../../../../../UnrealEngine/Engine/Binaries/ThirdParty/Intel/TBB/Mac/libtbb.dylib' (no such file), '/usr/local/lib/libtbb.dylib' (no such file), '/usr/lib/libtbb.dylib' (no such file)
Abort trap: 6

The problem happens only on MacOS platform, and it didn’t appear when I was using UE4. I have never heard of this libtbb library before and I am not using it anywhere in my code, but it seems something related to Intel and multithreading.

1 Like

I also face same problem in unreal 5 mac build.
My crash log is like this

Time Awake Since Boot: 26000 seconds

System Integrity Protection: enabled

Crashed Thread: 0

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Termination Reason: Namespace DYLD, Code 1 Library missing
Library not loaded: @rpath/libtbb.dylib
Referenced from: /Applications/New_ArtGallery.app/Contents/MacOS/New_ArtGallery
Reason: tried: ‘/Applications/New_ArtGallery.app/Contents/MacOS/libtbb.dylib’ (no such file), ‘/Applications/New_ArtGallery.app/Contents/MacOS/libtbb.dylib’ (no such file), ‘/Applications/libtbb.dylib’ (no such file), ‘/Applications/New_ArtGallery.app/Contents/MacOS/…/…/…/…/ThirdParty/Intel/TBB/Mac/libtbb.dylib’ (no such file), ‘/Applications/New_ArtGallery.app/Contents/MacOS/…/UE/Engine/Binaries/ThirdParty/Intel/TBB/Mac/libtbb.dylib’ (code signature invalid in <6C6BD7A4-4818-33BF-827E-22FE4ED15686> ‘/Applications/New_ArtGallery.app/Contents/UE/Engine/Binaries/ThirdParty/Intel/TBB/Mac/libtbb.dylib’ (errno=1) sliceOffset=0x00004000, codeBlobOffset=0x0003D250, codeBlobSize=0x00005770), ‘/Applications/New_ArtGallery.app/Contents/MacOS/…/…/…/…/ThirdParty/Ogg/Mac/libtbb.dylib’ (no such file), '/Applications/New_ArtGallery.app/Contents/MacOS/…/
(terminated at launch; ignore backtrace)

Waiting for solution.

Any news on this? Running into it as well.

UE5.2 on MacOS X 14 are fine. But I started getting this from UE5.3.

Anyone found a solution?

I switched to trying to use VSCode instead, but now I’m getting a different issue. But you may have better luck. Command I used:

cd /Users/Shared/Epic\ Games/UE_5.3/Engine/Build/BatchFiles/Mac/
./GenerateProjectFiles.sh -project="/Users/<username>/Documents/Unreal Projects/game/MyGame.uproject" -game -vscode

I faced this issue while trying to build the game through Rider. To solve it I built the game once through game editor and then the problem gone - I was able to build the game from Rider and it worked like a charm. Maybe it will help to somebody. Happy coding!

I’m still getting the same issue, even after getting it running in editor.

I have a brand new M3 and was having the same issues when trying to build with Xcode.

I didn’t do anything differently at all, but I installed Rider and compiled with Rider, and now UEditor starts fine with no errors related to libtbb.dylib

I’m not sure what Rider is doing differently than Xcode, but whatever it is, it worked for me.

All of a sudden I’m encountering this now as well with 5.3 on mac os.

libtbb.dylib is not loaded?

Any solutions?

EDIT: In my case I switched to Debug Game from Editor. Although Debugging from Game should be fine I can proceed for now.

I’m using UE 5.3 and Xcode 15.2. I also encountered this error while launching from xcode. However, I then proceeded to launch from the Epic Launcher, and when it asked me to rebuild, I said yes. Don’t know how, but I was able to load the project up after that.

For me, it seems that launching Intermediate/ProjectFiles/MygameEditor (Mac).xcodeproj does the trick. ( Unreal 5.3 )

1 Like

The solution shown in this post worked for me. I was generating the binary using BuildCookRun with UAT. After the process was done, I would run this script to fixup the missing paths:

install_name_tool -add_rpath @executable_path/../UE/Engine/Binaries/ThirdParty/Intel/TBB/Mac Contents/MacOS/YourExeName

If you are using code signing, you will need to re-sign the executable after you run the tool.

You may also need to add this to your entitlements before code signing:

  <key>com.apple.security.cs.disable-library-validation</key>
  <true/>