Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try to fix Xcode 12 build (outputPaths from build-mogenerator-Info-plist.sh seems wrong) #390

Merged
merged 1 commit into from
Dec 22, 2020

Conversation

mitchblank
Copy link
Contributor

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:

error: Build input file cannot be found: '[...]/objroot/mogenerator.build/Release/mogenerator.build/DerivedSources/mogenerator-Info.plist' [...]

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:

Unrecognized Type:
File Doesn't Exist, Will Create: /tmp/mogenerator-20201222-40012-136lzn9/mogenerator-1.32/objroot/mogenerator.build/Release/mogenerator.build/DerivedSources/mogenerator-Info.plist
Initializing Plist...

(The first message comes from the use of the -c "Clear" line since Clear 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 the outputPaths from the build-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 since xcodebuild 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.

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:

  error: Build input file cannot be found: '[...]/objroot/mogenerator.build/Release/mogenerator.build/DerivedSources/mogenerator-Info.plist' [...]

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 definiely runs and you can see the output
from PlistBuddy in the build output:

  Unrecognized Type:
  File Doesn't Exist, Will Create: /tmp/mogenerator-20201222-40012-136lzn9/mogenerator-1.32/objroot/mogenerator.build/Release/mogenerator.build/DerivedSources/mogenerator-Info.plist
  Initializing Plist...

(The first message comes from the use of the '-c "Clear"' line since
"Clear" 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 the "outputPaths"
from the build-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 since xcodebuild 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.
mitchblank added a commit to mitchblank/homebrew-core that referenced this pull request Dec 22, 2020
This formula was no longer building on Xcode 12.  After a lot of
investigation I think I narrowed it down to an issue with file
dependencies inside of its xcode project:
  rentzsch/mogenerator#390
BrewTestBot pushed a commit to Homebrew/homebrew-core that referenced this pull request Dec 22, 2020
This formula was no longer building on Xcode 12.  After a lot of
investigation I think I narrowed it down to an issue with file
dependencies inside of its xcode project:
  rentzsch/mogenerator#390

Closes #67405.

Signed-off-by: Sean Molenaar <[email protected]>
Signed-off-by: BrewTestBot <[email protected]>
@rentzsch rentzsch merged commit 2d7f9b4 into rentzsch:master Dec 22, 2020
ryan-mannion-zocdoc added a commit to ryan-mannion-zocdoc/mogenerator that referenced this pull request Jul 6, 2021
ryan-mannion-zocdoc added a commit to ryan-mannion-zocdoc/mogenerator that referenced this pull request Jul 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants