[swift-build-dev] [swift-users] Swift Compilation - Reaching ARG_MAX limit causing Xcode build failure

Jordan Rose jordan_rose at apple.com
Wed Aug 16 12:51:30 CDT 2017


You're not the only person to run into this. rdar://problem/33635183 <rdar://problem/33635183> tracks the issue within Apple, and since it would need Xcode-side changes as well there's no point in having a report at bugs.swift.org <http://bugs.swift.org/>. I'm afraid we don't have a workaround right now other than what you've mentioned.

Jordan


> On Aug 16, 2017, at 03:17, bhargav gurlanka via swift-users <swift-users at swift.org> wrote:
> 
> We have moderately complex Swift project with around 2,000 Swift files in a single module.
> 
> Most of the Swift source files are deeply nested inside directories and 90% of these files have absolute paths with more than 150 characters (assuming project is in "/Volumes/Macintosh HD2/Project" folder)
> 
> Because Swift compiler (Xcode 8.3.2) takes the absolute paths of all source files while compiling, the ARG_MAX limit is reached and build fails with:
> 
> Build operation failed without specifying any errors. Individual build tasks may have failed for unknown reasons.
> 
> One possible cause is if there are too many (possibly zombie) processes; in this case, rebooting may fix the problem.
> 
> Some individual build task failures (up to 12) may be listed below.
> 
> 
> 
> Have anybody experienced this issue before?
> 
> We temporarily fixed this issue by renaming longer folder names to shorter ones.
> 
> I'm assuming that breaking this monolithic module into smaller ones might fix the issue, but are there any other better solutions?
> 
> _______________________________________________
> swift-users mailing list
> swift-users at swift.org
> https://lists.swift.org/mailman/listinfo/swift-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-build-dev/attachments/20170816/be43de49/attachment.html>


More information about the swift-build-dev mailing list