-
Notifications
You must be signed in to change notification settings - Fork 282
Cannot build DependentApp with xcodebuild #73
Comments
It's worth pointing out that Xcode these days is never building with targets, always schemes, even when you are using an xcodeproj file, it's using the scheme inside. I haven't figured out why, but it seems that the workspace/scheme combo is resolving the search paths for the resulting framework/headers with no issues, the straight up target build does not. xcodebuild still uses a project/target model if you give it no arguments. If the ultimate plan is to convince this to build from the command line, go modern and tell it to use the workspace. This goes off without a hitch: |
Ok, I spent a little more time trying to understand why the project/target build flow is broken, and it's like I thought, it's just a search path issue. One of the annoying things about the old target build flow is that each subproject ends up creating its own build directory at its source root. When DependentApp builds the Serenity project, the resulting framework ends up The following does work: Unfortunately, things start to get a bit hairy here. We technically want to use a search path like ${SRCROOT}/../Serenity/build/${CONFIGURATION}-${PLATFORM_NAME}/. If the framework search paths were set in a build configuration, these environment values would resolve. Command builds require a bit more hoop jumping. Suddenly, you start to see all the reasons why workspaces are generally more awesome than the old way. |
How much do I owe you? Awesome stuff. Nice work. |
Hey jerry, I am using Pleas help. Thanks |
DependentApp project builds fine in Xcode. Does NOT build in xcodebuild.
Looks like any file that imports <Serenity/Serenity.h> will fail.
schwa@moth ~/D/i/s/DependentApp /master> xcodebuild -version
Xcode 5.0.2
Build version 5A3005
Error:
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, F) [F = <lambda at /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:168:73>]
Thread: <NSThread: 0x7fb7ee20ae90>{name = (null), num = 12}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
2013-12-19 13:32:00.606 xcodebuild[10913:4307] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-3575/Xcode3Sources/XcodeIDE/Frameworks/DevToolsBase/pbxcore/SpecificationTypes/XCGccMakefileDependencies.m:78
Details: Failed to load dependencies output contents from ``/Users/schwa/Desktop/iOS-Framework/sample/DependentApp/build/DependentApp.build/Release-iphoneos/DependentApp.build/Objects-normal/armv7/AppDelegate.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “AppDelegate.d” couldn’t be opened because there is no such file." UserInfo=0x7fb7ee209da0 {NSFilePath=/Users/schwa/Desktop/iOS-Framework/sample/DependentApp/build/DependentApp.build/Release-iphoneos/DependentApp.build/Objects-normal/armv7/AppDelegate.d, NSUnderlyingError=0x7fb7ebef6b90 "The operation couldn’t be completed. No such file or directory"}. User info: {
NSFilePath = "/Users/schwa/Desktop/iOS-Framework/sample/DependentApp/build/DependentApp.build/Release-iphoneos/DependentApp.build/Objects-normal/armv7/AppDelegate.d";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 "The operation couldn\U2019t be completed. No such file or directory"";
}.
The text was updated successfully, but these errors were encountered: