Swift 5.5.1, ubuntu 20.0.4, error: symbol ... is in generated IR file, but not in TBD file"

We're fairly new to swift and are trying to develop some cross platform code that works in macOS and Ubuntu.

The macOS code builds and runs just fine. Both in Xcode and from the command line.

But when we do

swift run our-code our params

The build fails

error: symbol '$s14TableReadWrite12LineSequenceC4fromACSg10Foundation3URLV_tYacfcTu' (async function pointer to TableReadWrite.LineSequence.init(from: Foundation.URL) async -> Swift.Optional<TableReadWrite.LineSequence>) is in generated IR file, but not in TBD file

:0: error: please submit a bug report (Swift.org - Contributing) and include the project, and add '-Xfrontend -validate-tbd-against-ir=none' to squash the errors

How do we fix this? I'm not sure how to do '-Xfrontend -validate-tbd-against-ir=none'

code builds and runs just fine on macOS. In ubuntu I tried both swift-5.5 and swift-5.5.1 ARM build and get the same errors.

1 Like

We were able to get the error to go away by adding

swiftSettings: [
.unsafeFlags(["-Xfrontend", "-validate-tbd-against-ir=none"])
]

to .target in the package file.

Same error on docker-builds, when using async Init functions. This fixed it. Thanks so much!

Sounds like a bug. Is it possible for you to file a bug on bugs.swift.org with your code example?

Terms of Service

Privacy Policy

Cookie Policy