Skip to content

[SR-6326] File to small (length = 0) error #48876

@keith

Description

@keith
Previous ID SR-6326
Radar rdar://problem/19945961
Original Reporter @keith
Type Bug
Additional Detail from JIRA
Votes 1
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 80323f2b7fb37f60938f5895a1fc1d6d

Issue Description:

Sometimes when compiling a Swift app, the linking phase fails with this error:

ld: file too small (length=0) file 'path/to/foo.o' for architecture x86_64

It's hard to tell exactly what the problem is here, although it might happen when a previous build is cancelled during compilation.

In this case we can easily resolve this by removing all `.o` files of size 0 from derived data. I've previously filed a related radar (31521765) about the fact that Xcode doesn't parse this error, but the actual cause seems to be related to Swift and not Xcode.

This isn't a new issue but I haven't been able to find a report for this so I wanted to add one to track any info known about this issue already.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.compilerThe Swift compiler itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions