AU on XCode 10: ResMerger Error

We updated from XCode 9 to XCode 10 and now the AU build target produces this error (VST2&3, Standalone and AUv3 are fine):

file <inputFile>: 
### /Applications/Xcode.app/Contents/Developer/usr/bin/ResMerger - ERROR: errFSBadFSRef

where <inputFile> = <myProjectBuildDir>/Builds/MacOSX/Build/Intermediates.noindex/<myProjectName>.build/Debug/<myProjectName> - AU.build/ResourceManagerResources/<myBinaryName>.rsrc

Turns out, the input file <inputFile> does not exist. I can’t see what we could have done wrong here, so it seems like a wrong XCode Project configuration or maybe an internal XCode error. With XCode 9 on High Sierra it works perfectly fine.

Has anyone seen this?

Details:

  • Xcode 10.3
  • Mojave
  • JUCE 5.4.3 and JUCE 5.4.4 (others not tested)

To be clear: This happens after creating a new audio plugin project and selecting AU as the desired plugin format. No other changes were made to the code generated by Projucer.

Could someone try to reproduce this error on their system?

Here’s what creates the error on our systems:

  1. Open Projucer (JUCE 5.4.4)
  2. Create a new plugin project, choose AU as the target
  3. Open in XCode and compile

I have the exact same error. It builds fine with XCode 10.1, but not 10.3

1 Like

What about 11?

Same error on Xcode 11. Had to drop back to 10.1.

So we’ve had a few people run into this now, but we’ve not been able to reproduce it. Any pointers on how to get things to break would be appreciated.

I just went from xcode9 to xcode11, and had a rez error when building my project.

But the usual trick fixed it for me:

:sparkles: pull the latest juce, rebuild the projucer, resave your project with the projucer

(edit: sorry, I’ve misread, my error was different than the one reported above actually. hope it can help anyway)

Fresh install of Xcode 11.1 and Mojave 10.14.6, JUCE 5.4.3

Audio Unit plugin will not build.

Error:

Rez Error - Command /Applications/Xcode.app/Contents/Developer/usr/bin/Rez failed with exit code 3

failed to find AUComponent/AUComponent.r

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AudioUnit.framework/Headers/AudioUnit.r:18: ### Rez - noErr (0) during open of “AUComponent.r”.

Fatal Error!

/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AudioUnit.framework/Headers/AudioUnit.r:18: ### Rez - Fatal Error, can’t recover.

AUComponent.r: ### Rez - Since errors occurred, /Users/Mac/Library/Developer/Xcode/DerivedData/Plugin-fdgrkkaynbuvclcykrwbuqxzopls/Build/Intermediates.noindex/Plugin.build/Debug/Articulate Plugin - AU.build/ResourceManagerResources/Objects/include_juce_audio_plugin_client_AU.rsrc’s resource fork was not completely updated.

Command /Applications/Xcode.app/Contents/Developer/usr/bin/Rez failed with exit code 3

Same project builds fine in Xcode 10.3 on 10.14.6

What happens if you replace /Applications/Xcode.app/Contents/Developer/usr/bin/Rez with the Rez executable from from an Xcode 10 install?

did you try to re-save your xcode project with the projucer?

Thanks for the suggestion - gave that a go, but same error

Thanks - tried that again to be sure, but still same issue

Just ran into the same issue with 11.0 on Catalina (>_<). I will install 11.1 and see if that fixes anything.

Okay, fixed it on my machine with the following steps:

  1. XCode 11.1 wouldn’t install properly through the App Store. I found a few posts on the XCode forums that suggested that users should delete XCode manually first. For me, this just consisted of deleting the XCode.app. For others, they also needed to manually delete the developer library folders (https://forums.developer.apple.com/thread/124031).
  2. After deleting XCode, I was able to reinstall through the App Store.
  3. After reinstalling XCode 11.1, the Rez step worked properly.

If I didn’t need to test our products on Catalina, I would have stayed on Mojave indefinitely. :man_facepalming:

For an error similar to this

For an error like this one, I found out that I had to have the following paths in my project “Rez Search Paths” (REZ_SEARCH_PATHS) build setting:

/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers

$(DEVELOPER_DIR)/Extras/CoreAudio/AudioUnits/AUPublic/AUBase

$(DEVELOPER_DIR)/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioUnit.framework/Headers
1 Like
Rez build/PitchMonster.build/Release/PitchMonster\ -\ AU.build/ResourceManagerResources/Objects/include_juce_audio_plugin_client_AU.rsrc /Users/jenkins/Home/workspace/Pitchmonster\ OSX\ New/JuceLibraryCode/include_juce_audio_plugin_client_AU.r
    cd "/Users/jenkins/Home/workspace/Pitchmonster OSX New/Builds/MacOSX"
    /Applications/Xcode.app/Contents/Developer/usr/bin/Rez -o /Users/jenkins/Home/workspace/Pitchmonster\ OSX\ New/Builds/MacOSX/build/PitchMonster.build/Release/PitchMonster\ -\ AU.build/ResourceManagerResources/Objects/include_juce_audio_plugin_client_AU.rsrc -d SystemSevenOrLater=1 -useDF -script Roman -d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_YES -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I /Applications/Xcode.app/Contents/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase -arch x86_64 -i /Users/jenkins/Home/workspace/Pitchmonster\ OSX\ New/Builds/MacOSX/build/Release -i /Users/jenkins/Home/workspace/Pitchmonster\ OSX\ New/Builds/MacOSX/../../Source -i /Users/jenkins/Home/workspace/Pitchmonster\ OSX\ New/Builds/MacOSX/../../JuceLibraryCode -i /Users/jenkins/Home/workspace/Pitchmonster\ OSX\ New/Builds/MacOSX/../../Source/CPU_Features -i /Users/jenkins/Home/workspace/Pitchmonster\ OSX\ New/Builds/MacOSX/build/Release -i /Users/jenkins/Home/workspace/Pitchmonster\ OSX\ New/Builds/MacOSX/build/Release/include -i ../../vst3 -i ../../JuceLibraryCode -i ../../aaxsdk -i ../../aaxsdk/Interfaces -i ../../aaxsdk/Interfaces/ACF -i ../../../Pitchmonster\ OSX\ New -i ../../juce/modules -i ../.. -i ../../juce/modules -i ../../juce/modules/juce_audio_plugin_client -i /Users/jenkins/Home/workspace/Pitchmonster\ OSX\ New/Builds/MacOSX/build/Release/include -i ../../vst3 -i ../../JuceLibraryCode -i ../../aaxsdk -i ../../aaxsdk/Interfaces -i ../../aaxsdk/Interfaces/ACF -i ../../../Pitchmonster\ OSX\ New -i ../../juce/modules -i ../.. -i ../../juce/modules -i ../../juce/modules/juce_audio_plugin_client -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk /Users/jenkins/Home/workspace/Pitchmonster\ OSX\ New/JuceLibraryCode/include_juce_audio_plugin_client_AU.r
failed to find AUComponent/AUComponent.r
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AudioUnit.framework/Headers/AudioUnit.r:18: ### Rez - noErr (0) during open of "AUComponent.r".
Fatal Error!
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/AudioUnit.framework/Headers/AudioUnit.r:18: ### Rez - Fatal Error, can't recover.
AUComponent.r: ### Rez - Since errors occurred, /Users/jenkins/Home/workspace/Pitchmonster OSX New/Builds/MacOSX/build/PitchMonster.build/Release/PitchMonster - AU.build/ResourceManagerResources/Objects/include_juce_audio_plugin_client_AU.rsrc's resource fork was not completely updated.
Command /Applications/Xcode.app/Contents/Developer/usr/bin/Rez failed with exit code 3

This is a patched version of JUCE 5.3.2 (you can enable legacy build using a commandline option on xcodebuild). With I think latest version of Xcode 10.

Jims-Mac-mini:/ jim$ find / 2>/dev/null | grep AUComponent.r 2>/dev/null
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioUnit.framework/Versions/A/Headers/AUComponent.r
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioUnit.framework/Versions/A/Headers/AUComponent.r

These are the locations that I have the missing AUComponent.r file on my new build mac which has the rez error.

And, on my normal Xcode 9 builds work fine Mac I have it in these locations:

/Users/jim/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AudioUnit.framework/Versions/A/Headers/AUComponent.r
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk/System/Library/Frameworks/AudioUnit.framework/Versions/A/Headers/AUComponent.r
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/AudioUnit.framework/Versions/A/Headers/AUComponent.r

So I don’t think that looks too surprising. Base SDK is set to default, so i assume both systems should be finding it in the folder /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/

Rez maybe has the wrong search path?

I’ll see if I can get it to give up its secrets.

Ok so ‘noErr’ looks weird. I’m going to run Rez inside dtruss when I get to the office, as I can’t dind a way to disable SIP so I can actually use dtruss remotely and find out why Rez feels the need to die … arrrrgh :slight_smile: .

Update:

bash-3.2# grep Err log
csrctl(0x0, 0x7FFEE690545C, 0x4)		 = -1 Err#1
access("/AppleInternal/XBS/.isChrooted\0", 0x0, 0x0)		 = -1 Err#2
stat64("/AppleInternal\0", 0x7FFEE6903660, 0x0)		 = -1 Err#2
gettid(0x7FFEE6902228, 0x7FFEE690222C, 0x0)		 = -1 Err#3
open_nocancel("/etc/.mdns_debug\0", 0x0, 0x0)		 = -1 Err#2
openat(0xFFFFFFFFFFFFFFFE, "/Library/Preferences/Logging/com.apple.diagnosticd.filter.plist\0", 0x1000104, 0xFFFFFFFFE6901B08)		 = -1 Err#2
openat(0xFFFFFFFFFFFFFFFE, "/Library/Preferences/Logging/com.apple.diagnosticd.filter.plist\0", 0x1000104, 0xFFFFFFFFE6903F48)		 = -1 Err#2
access("/System/Library/taggedstringsoff\0", 0x4, 0x0)		 = -1 Err#2
workq_kernreturn(0x4, 0x0, 0x0)		 = 0 Err#-2
workq_kernreturn(0x40, 0x70000DA38B80, 0x0)		 = 0 Err#-2
workq_kernreturn(0x100, 0x70000DA38B80, 0x1)		 = 0 Err#-2
workq_kernreturn(0x4, 0x0, 0x0)		 = 0 Err#-2
stat64("/usr/share/icu/icudt62l/keyTypeData.res\0", 0x7FFEE6904448, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/supplementalData.res\0", 0x7FFEE69052D8, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/likelySubtags.res\0", 0x7FFEE69024D8, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/en_GB.res\0", 0x7FFEE6902A08, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/pool.res\0", 0x7FFEE69028D8, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/en_001.res\0", 0x7FFEE6902A28, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/en.res\0", 0x7FFEE6902A28, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/root.res\0", 0x7FFEE6902A38, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/numberingSystems.res\0", 0x7FFEE6902A98, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/curr/supplementalData.res\0", 0x7FFEE6902B38, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/curr/pool.res\0", 0x7FFEE6902A08, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/curr/en_GB.res\0", 0x7FFEE6902A38, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/curr/en_001.res\0", 0x7FFEE6902A58, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/curr/en.res\0", 0x7FFEE6902A58, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/curr/root.res\0", 0x7FFEE6902A68, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/en_US_POSIX.res\0", 0x7FFEE6902E68, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/en_US.res\0", 0x7FFEE6902E88, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/zone/en_GB.res\0", 0x7FFEE6904478, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/zone/pool.res\0", 0x7FFEE6904348, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/zone/en_001.res\0", 0x7FFEE6904498, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/zone/en.res\0", 0x7FFEE6904498, 0x0)		 = -1 Err#2
stat64("/usr/share/icu/icudt62l/zone/root.res\0", 0x7FFEE69044A8, 0x0)		 = -1 Err#2
stat64("/System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers\0", 0x7FFEE6905908, 0x0)		 = -1 Err#2
stat64("/Applications/Xcode.app/Contents/Developer/Extras/CoreAudio/AudioUnits/AUPublic/AUBase\0", 0x7FFEE6905908, 0x0)		 = -1 Err#2
stat64("/Users/jenkins/Home/workspace/Pitchmonster OSX New/Builds/MacOSX/build/Release/include\0", 0x7FFEE6905908, 0x0)		 = -1 Err#2
stat64("/Users/jenkins/Home/workspace/Pitchmonster OSX New/Builds/MacOSX/build/Release/include\0", 0x7FFEE6905908, 0x0)		 = -1 Err#2
open("/Users/jenkins/Home/workspace/Pitchmonster OSX New/Builds/MacOSX/build/PitchMonster.build/Release/PitchMonster - AU.build/ResourceManagerResources/Objects/include_juce_audio_plugin_client_AU.rsrc\0", 0xA00, 0x1B6)		 = -1 Err#17
__semwait_signal(0x1303, 0x0, 0x1)		 = -1 Err#60
__semwait_signal(0x1303, 0x0, 0x1)		 = -1 Err#60
workq_kernreturn(0x40, 0x70000D9B5B80, 0x1)		 = 0 Err#-2
workq_kernreturn(0x100, 0x70000DA38B80, 0x1)		 = 0 Err#-2

Shows complete list of errors for Rez.

Thanks - that fixed the issue. Cheers.