[swift-users] Sporadically undefined symbols during linking

Ryan Conway theconmethod at gmail.com
Fri Apr 1 21:19:44 CDT 2016


Hey swift-users,

I'm experiencing a linking issue that causes builds to sometimes complete
and sometimes fail, without code changes. I'm not sure if the problem is
with Swift, Xcode, or my usage of either.

My Xcode 7.3 project target is a Swift framework with no dependencies other
than Foundation. Compiling always succeeds, but linking fails about 75% of
the time with errors like the following:

Undefined symbols for architecture x86_64:
"__TWPuRx16ostrichframework11OperandTypexS_8ReadablexS_9WriteablewxPS1_8ReadTypezVs6UInt16wxPS2_9WriteTypezS4_ERRzS4_ERRzS4_ERRzSiERRzSiERRzSiERRzSirGVS_5DEC16x_S_11InstructionS_",
referenced from:
      ostrichframework.Z80.getInstruction () ->
ostrichframework.Instruction? in Z80.o
ld: symbol(s) not found for architecture x86_64

The other 25% of the time, the framework will be built fine, with its user
application working as expected.

Has anyone experienced issues like this, or does anyone have advice on
troubleshooting it? I've tried cleaning, deleting DerivedData, and building
on a different machine, to no avail.

If it helps, the failing project is "ostrichframework" found in the Xcode
workspace here: https://github.com/PumpMagic/ostrich

Any help is greatly appreciated.

Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20160401/0fbaa9e6/attachment.html>


More information about the swift-users mailing list