简体   繁体   English

iPhone应用程序构建第一次失败,即使在“清理所有目标”之后也第二次成功

[英]iPhone application build fails first time, succeeds second time even after “Clean All Targets”

I'm the build engineer for a new iPhone application and I've run into the following extremely weird situation. 我是新iPhone应用程序的构建工程师,遇到了以下极其奇怪的情况。 We're using git with Xcode 3.2.4 under Snow Leopard. 我们在Snow Leopard下的Xcode 3.2.4中使用git。

This happens whether I'm using the Xcode GUI or using xcodebuild on the command line. 无论我使用Xcode GUI还是在命令行上使用xcodebuild,都会发生这种情况。

  • I clone a clean copy of the repository and run "Build" or "Build and Archive". 我克隆存储库的干净副本,然后运行“构建”或“构建并存档”。
  • The build fails with a bunch of compile errors. 构建失败,并出现大量编译错误。
  • I run "Clean All Targets" with "Also clean dependencies" and "Also remove precompiled headers" checked 我运行“清理所有目标”并选中“也清理依赖项”和“也删除预编译头文件”
  • I run "Build" or "Build and Archive" again. 我再次运行“构建”或“构建并存档”。
  • Build succeeds. 构建成功。

The errors all seem to be of the form "file-something.h no such file or directory", but the files it claims it can't find are actually there. 错误似乎都是“ file-something.h没有这样的文件或目录”的形式,但是它声称找不到的文件实际上在那里。

Does anyone have any idea what is going on here? 有人知道这里发生了什么吗? The git repo uses submodules, and as far as I can tell, all the "missing" files are contained in one of the submodules. git repo使用子模块,据我所知,所有“缺失”文件都包含在一个子模块中。 However, as I noted, the files are present in the working directory, and the submodules have been inited and updated correctly. 然而,正如我所提到的,文件存在于工作目录和子模块已经inited和正确更新。

It turns out that if I manually create all the build directories and their subdirectories before running a build (after a fresh clone), the build succeeds. 事实证明,如果我在运行构建之前(在新克隆之后)手动创建所有构建目录及其子目录,则构建成功。 Because of the submodules, there are actually three build/ directories (one in the main project, one in each submodule) and the submodule ones have a bunch of subdirectories. 由于有子模块,因此实际上有三个build /目录(在主项目中一个,在每个子模块中一个),并且子模块中有一堆子目录。

This has to be due to a bug somewhere, and I will continue to research it, but at least for the moment I have a workaround and can get on with creating my automated build. 可能是由于一个错误的地方,我会继续研究它,但至少在目前,我有一种变通方法,可与我创建自动化构建得到。

Edit: And in fact, this appears to be due to a bug in the build of one of the two submodules, three20 . 编辑:实际上,这似乎是由于两个子模块three20之一的构建中的错误所致 I'm guessing that it creates the build directories after it tries to use one or more of them. 我猜测它尝试使用一个或多个构建目录会创建它们。 I will take this up with the three20 developers. 我将与three20开发人员联系。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 第一次加载某个纹理时GLKTextureLoader失败,但第二次加载成功 - GLKTextureLoader fails when loading a certain texture the first time, but succeeds the second time 清除所有目标/清空缓存后,iPhone生成错误 - iPhone building errors after clean all targets / empty caches iPhone Facebook状态更新第二次失败 - iphone facebook status update fails second time 如何在iphone上首次确定负载应用? - how to determine load application on iphone at first time? NSXMLParser解析第一次无法调用委托…但是在iPhone应用程序任务重新启动后可以工作 - NSXMLParser parse fails to call delegate first time… But works after the iPhone app task restart 首次运行iphone应用程序时会激发任何代表吗? - Is there any delegate that fires when I run the iphone application for the first time? 如果第一次CoreData为空,则再次执行ExecuteFetchRequest - ExecuteFetchRequest a second time if the first time CoreData was empty 从UIImageJPEGRepresentation()获取的iPhone iOS保存数据第二次失败:ImageIO:CGImageRead_mapData'open'失败 - iPhone iOS saving data obtained from UIImageJPEGRepresentation() fails second time: ImageIO: CGImageRead_mapData 'open' failed iPhone首次安装时崩溃 - iphone crashes on the first time installed 在iPhone中启动应用程序后,如何减少进入主控制器的时间 - How to decrease the time to go main controller after application is launched in iPhone
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM