Try to fix Xcode 12 build (outputPaths from build-mogenerator-Info-plist.sh seems wrong) #390
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When looking at Homebrew packages that no longer build correctly ( Homebrew/homebrew-core#65000 ) I decided to take a quick look at mogenerator although I didn't know anything about the package before.
The build failure at first seemed very odd. The final link was failing with:
At first I assumed that the
build-mogenerator-Info-plist.sh
script either did not run or failed to produce the expected file. However, after adding some more debugging statements that does not seem to be the case. The script definitely runs and you can see the output from PlistBuddy in the build output:(The first message comes from the use of the
-c "Clear"
line sinceClear
is supposed to take an argument I guess.. however that seems unrelated to the build failure)Digging more into the
.pbxproj
file I noticed that theoutputPaths
from thebuild-mogenerator-Info-plist.sh
build step seems to be wrong... perhaps just a typo. I fixed that and the build worked. My theory is that sincexcodebuild
wasn't seeing the proper dependency graph it maybe started the link before the plist was finished being written out?Anyway it looks like the outputPaths were wrong and repairing that made this package build again for me. YMMV.