Issues with MacOS build

Hello. we have an issue with FMOD (2.02.13 version) on an Unreal project with MacOS build. Th paths are incorrect after packaging the build to TestFlight, maybe you can help us with this question.

We’ve tried several things which usually resolve such issues - for example we’ve tried the following command:

install_name_tool -add_rpath @executable_path/…/Unreal/YourGame/Plugins/FMODStudio/Libs/Mac /Path/To/YourGame.app/Contents/MacOS/YourGame

The problem is that after packaging, we have the following paths for the FMOD library (please refer to the attached file). We have removed, added, and changed the rpath entries, but the build from TF still cannot load the library.
In our experience usually this command " install_name_tool-add_rpath " is sufficient to fix such stuff, however it doesn’t help somehow this time

This is an example of rpaths when we assemble the build (and it works) without packing it for TF:

otool -l /Users/developerplayjoy/Documents/BuildsMac/ShipBuild/Mac/Sycamore-Mac-Shipping.app/Contents/MacOS/Sycamore-Mac-Shipping | grep -A2 LC_RPATH
cmd LC_RPATH
cmdsize 32
path @loader_path/ (offset 12)

      cmd LC_RPATH
  cmdsize 32
     path @executable_path/ (offset 12)


cmd LC_RPATH
cmdsize 40
path @executable_path/…/…/…/ (offset 12)

      cmd LC_RPATH
  cmdsize 104
     path @loader_path/../../../../../../../FortSolisMacosEngine/Engine/Plugins/FMODStudio/Libs/Mac (offset 12)


cmd LC_RPATH
cmdsize 72
path @loader_path/…/UE/Engine/Plugins/FMODStudio/Libs/Mac (offset 12)

      cmd LC_RPATH
  cmdsize 80
     path @loader_path/../../../../../../Engine/Plugins/FMODStudio/Libs/Mac (offset 12)


cmd LC_RPATH
cmdsize 112
path @loader_path/…/…/…/…/…/…/…/FortSolisMacosEngine/Engine/Binaries/ThirdParty/Intel/TBB/Mac (offset 12)

      cmd LC_RPATH
  cmdsize 72
     path @loader_path/../UE/Engine/Binaries/ThirdParty/Intel/TBB/Mac (offset 12)


cmd LC_RPATH
cmdsize 88
path @loader_path/…/…/…/…/…/…/Engine/Binaries/ThirdParty/Intel/TBB/Mac (offset 12)

      cmd LC_RPATH
  cmdsize 104
     path @loader_path/../../../../../../../FortSolisMacosEngine/Engine/Binaries/ThirdParty/Ogg/Mac (offset 12)


cmd LC_RPATH
cmdsize 72
path @loader_path/…/UE/Engine/Binaries/ThirdParty/Ogg/Mac (offset 12)

      cmd LC_RPATH
  cmdsize 80
     path @loader_path/../../../../../../Engine/Binaries/ThirdParty/Ogg/Mac (offset 12)


cmd LC_RPATH
cmdsize 112
path @loader_path/…/…/…/…/…/…/…/FortSolisMacosEngine/Engine/Binaries/ThirdParty/Vorbis/Mac (offset 12)

      cmd LC_RPATH
  cmdsize 72
     path @loader_path/../UE/Engine/Binaries/ThirdParty/Vorbis/Mac (offset 12)


cmd LC_RPATH
cmdsize 88
path @loader_path/…/…/…/…/…/…/Engine/Binaries/ThirdParty/Vorbis/Mac (offset 12)

Also as far as we know, this issue was already fixed in older versions of FMOD and this shouldn’t have been an issue in the first place

1 Like

This is an urgent issue for us, so we’d appreciate help on this

1 Like

What Unreal version are you using? I can’t see the attached file you mention that contains the broken paths - can you copy/paste it maybe?

We’re using UE version 5.2 (tried with 5.2.1 too). Can’t attach the file due to your site’s restrictions. Here’s the info from the log: Translated Report (Full Report Below)------------------------------------- - Pastebin.com

1 Like

Thanks for the info. According to your log it looks like libfmod.dylib is being found (so your rpath setup is working fine) but it’s failing to load due to an invalid code signature :

‘/Applications/Sycamore-Mac-Shipping.app/Contents/MacOS/…/UE/Engine/Plugins/FMODStudio/Libs/Mac/libfmod.dylib’ (code signature invalid in <6BCD797A-A71A-3AA9-8FC6-8B4253BB388C>

Try running the codesign command to see what’s going on with the signature on libfmod.dylib :

codesign -dvvvv libfmod.dylib

Hey Andrew,

We’ve tried this and are getting the same issue

Here’s the new crash log:

and latest sysdiagnose log:

Here’s a log with another attempt:

This is the output we get from the codesign command:

macbook@MacBook-Air-von-Macbook Mac % codesign -dvvvv libfmod.dylib
Executable=/Applications/Sycamore.app/Contents/UE/Engine/Plugins/FMODStudio/Libs/Mac/libfmod.dylib
Identifier=libfmod
Format=Mach-O universal (x86_64 arm64)
CodeDirectory v=20400 size=9643 flags=0x0(none) hashes=293+5 location=embedded
VersionPlatform=1
VersionMin=720896
VersionSDK=787200
Hash type=sha256 size=32
CandidateCDHash sha1=a10bbba19617a61737f00faa423cc63b352ad05a
CandidateCDHashFull sha1=a10bbba19617a61737f00faa423cc63b352ad05a
CandidateCDHash sha256=72309438cd266d846d9272d85a94b71c397c1e3b
CandidateCDHashFull sha256=72309438cd266d846d9272d85a94b71c397c1e3b88cab4338208079f3a0a21a6
Hash choices=sha1,sha256
CMSDigest=6c3b181498940c4c37f32b6812b9667694cb8492ad698f0862ab120f84e47cd7
CMSDigestType=2
Executable Segment base=0
Executable Segment limit=1032192
Executable Segment flags=0x0
Page size=4096
CDHash=72309438cd266d846d9272d85a94b71c397c1e3b
Signature size=4844
Authority=TestFlight Beta Distribution
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA
Info.plist=not bound
TeamIdentifier=JP7V82RRNY
Sealed Resources=none
Internal requirements count=1 size=88

Thanks for the detailed information. The “codesign -dvvvv libfmod.dylib” command just displays information about the codesign status of libfmod.dylib. According to the output you posted, I can see that Testflight has codesigned the libfmod.dylib :

Authority=TestFlight Beta Distribution
Authority=Apple Worldwide Developer Relations Certification Authority
Authority=Apple Root CA

This is to be expected - everything in your packaged game should be signed as part of your packaging process - but I don’t know why the signature is appearing to be invalid when your app comes out of Testflight. The fact that your game works when you don’t package it for Testflight seems to confirm that the FMOD dylib is being found ok, so it doesn’t look like an rpath problem - everything works fine until you push it through Testflight.

I suspect it may be something to do with your codesigning setup. Unfortunately, these problems get more frequent and more finicky with each new macOS release. A good source of information on troubleshooting these sort of problems is this :
https://developer.apple.com/forums/thread/706442

Specifically the section library loading :
https://developer.apple.com/forums/thread/706437

And here’s an Unreal-specific article that may help :

Let me know if any of this helps.

Hey @alexvvv1 ,
Were you able to resolve this? I am facing the same issue related to libtbb.dylib.
I have signed everything correctly, and the app is running in my machine however when i send it to app store and download it from testflight, it is throwing error (code signature invalid in <6C6BD7A4-4818-33BF-827E-22FE4ED15686> ‘…/UE/Engine/Binaries/ThirdParty/Intel/TBB/Mac/libtbb.dylib’ (errno=1) sliceOffset=0x00004000, codeBlobOffset=0x0003D250, codeBlobSize=0x000056B0)