# Issues with MacOS build

**URL:** https://qa.fmod.com/t/issues-with-macos-build/20435
**Category:** Unreal Engine
**Created:** [July 18, 2023, 5:21pm UTC](https://qa.fmod.com/t/issues-with-macos-build/20435 "2023-07-18T17:21:05Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![anfisakrdsh](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anfisakrdsh](https://qa.fmod.com/u/anfisakrdsh)
#### Post date: [July 18, 2023, 5:21pm UTC](https://qa.fmod.com/t/issues-with-macos-build/20435/1 "2023-07-18T17:21:05Z")

</div>

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

---

<div class="post-metadata">

### Author: ![anfisakrdsh](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anfisakrdsh](https://qa.fmod.com/u/anfisakrdsh)
#### Post date: [July 19, 2023, 12:46pm UTC](https://qa.fmod.com/t/issues-with-macos-build/20435/2 "2023-07-19T12:46:29Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Andrew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/andrew/32/261_2.png) [@Andrew](https://qa.fmod.com/u/Andrew)
#### Post date: [July 20, 2023, 3:36am UTC](https://qa.fmod.com/t/issues-with-macos-build/20435/3 "2023-07-20T03:36:00Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![anfisakrdsh](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anfisakrdsh](https://qa.fmod.com/u/anfisakrdsh)
#### Post date: [July 20, 2023, 6:36am UTC](https://qa.fmod.com/t/issues-with-macos-build/20435/4 "2023-07-20T06:36:21Z")

</div>

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](https://pastebin.com/ptjjkwfF)

---

<div class="post-metadata">

### Author: ![Andrew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/andrew/32/261_2.png) [@Andrew](https://qa.fmod.com/u/Andrew)
#### Post date: [July 21, 2023, 4:42am UTC](https://qa.fmod.com/t/issues-with-macos-build/20435/5 "2023-07-21T04:42:47Z")

</div>

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`

---

<div class="post-metadata">

### Author: ![anfisakrdsh](https://avatars.discourse-cdn.com/v4/letter/a/bbe5ce/32.png) [@anfisakrdsh](https://qa.fmod.com/u/anfisakrdsh)
#### Post date: [July 25, 2023, 6:41am UTC](https://qa.fmod.com/t/issues-with-macos-build/20435/6 "2023-07-25T06:41:04Z")

</div>

Hey Andrew,

We’ve tried this and are getting the same issue

---

<div class="post-metadata">

### Author: ![alexvvv1](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@alexvvv1](https://qa.fmod.com/u/alexvvv1)
#### Post date: [July 25, 2023, 7:36am UTC](https://qa.fmod.com/t/issues-with-macos-build/20435/7 "2023-07-25T07:36:29Z")

</div>

Here’s the new crash log:

> **[\-------------------------------------Translated Report (Full Report Below)--...](https://pastebin.com/Vn91kJ8L)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

and latest sysdiagnose log:

> **[sysdiagnose\_2023\_07\_25\_10\_41\_11+0300\_macOS\_MacBookAir10\_1\_23A5286i.gz](https://drive.google.com/file/d/1oo-A7EqzCTE-r26XMdi8wej_tQ8Qx9hQ/view?usp=drive_link)**
>
> Google Drive file.

---

<div class="post-metadata">

### Author: ![alexvvv1](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@alexvvv1](https://qa.fmod.com/u/alexvvv1)
#### Post date: [July 25, 2023, 3:47pm UTC](https://qa.fmod.com/t/issues-with-macos-build/20435/8 "2023-07-25T15:47:50Z")

</div>

Here’s a log with another attempt:

> **[\-------------------------------------Translated Report (Full Report Below)--...](https://pastebin.com/jg3wnuvG)**
>
> Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.

---

<div class="post-metadata">

### Author: ![alexvvv1](https://avatars.discourse-cdn.com/v4/letter/a/35a633/32.png) [@alexvvv1](https://qa.fmod.com/u/alexvvv1)
#### Post date: [July 25, 2023, 6:28pm UTC](https://qa.fmod.com/t/issues-with-macos-build/20435/9 "2023-07-25T18:28:31Z")

</div>

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

---

<div class="post-metadata">

### Author: ![Andrew](https://yyz2.discourse-cdn.com/flex036/user_avatar/qa.fmod.com/andrew/32/261_2.png) [@Andrew](https://qa.fmod.com/u/Andrew)
#### Post date: [July 26, 2023, 3:37am UTC](https://qa.fmod.com/t/issues-with-macos-build/20435/10 "2023-07-26T03:37:35Z")

</div>

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](https://developer.apple.com/forums/thread/706442)

Specifically the section library loading :  
[https://developer.apple.com/forums/thread/706437](https://developer.apple.com/forums/thread/706437)

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

> **[Codesign and notarize Unreal Engine Mac builds for distribution outside of...](https://medium.com/@parthnaik92/codesign-and-notarize-unreal-engine-mac-builds-for-distribution-outside-of-the-mac-store-d2f6e444f3a7)**
>
> I have been developing multiplatform VR experiences in the enterprise space at VECTRE and VRperspectives for most of my professional life…

Let me know if any of this helps.

---

<div class="post-metadata">

### Author: ![Mohan\_Ghimire](https://avatars.discourse-cdn.com/v4/letter/m/90ced4/32.png) [@Mohan\_Ghimire](https://qa.fmod.com/u/Mohan_Ghimire)
#### Post date: [November 29, 2023, 5:37am UTC](https://qa.fmod.com/t/issues-with-macos-build/20435/11 "2023-11-29T05:37:43Z")

</div>

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)
