Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-15629] error: symbol is in generated IR file, but not in TBD file #57925

Closed
hassila opened this issue Dec 20, 2021 · 4 comments
Closed

[SR-15629] error: symbol is in generated IR file, but not in TBD file #57925

hassila opened this issue Dec 20, 2021 · 4 comments
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself Linux Platform: Linux swift 5.5 TBDGen unexpected error Bug: Unexpected error

Comments

@hassila
Copy link

hassila commented Dec 20, 2021

Previous ID SR-15629
Radar None
Original Reporter @hassila
Type Bug

Attachment: Download

Environment
jocke@linux ~/source> uname -a
Linux linux 5.13.0-22-generic #​22-Ubuntu SMP Fri Nov 5 13:22:27 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
jocke@linux ~/source> swift --version
Swift version 5.5.2 (swift-5.5.2-RELEASE)
Target: aarch64-unknown-linux-gnu
jocke@linux ~/source> 
Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug
Assignee None
Priority Medium

md5: 53c852e88e49fdfaca23744162bbe901

Issue Description:

<unknown>:0: error: symbol '$s13PluginManagerAAC8withPath15pluginExtension11loadPluginsAByxG13SystemPackage04FileD0V_SSSgSbtYaKcfcTu' (async function pointer to PluginManager.PluginManager.init(withPath: SystemPackage.FilePath, pluginExtension: Swift.Optional<Swift.String>, loadPlugins: Swift.Bool) async throws -> PluginManager.PluginManager<A>) is in generated IR file, but not in TBD file
<unknown>:0: error: please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the project, and add '-Xfrontend -validate-tbd-against-ir=none' to squash the errors

This is on aarch64, using futurejones pre-built swift package installed using apt, running on a VM on a MacbookPro M1 Max using the UTM VM runtime. Basically, the arm-native VM/OS/toolchain combo readily available.

The attached projects build and run the unit test suite fine on macOS 12.1 with the toolchain:

jocke@max ~> swift --version
swift-driver version: 1.26.21 Apple Swift version 5.5.2 (swiftlang-1300.0.47.5 clang-1300.0.29.30)
Target: arm64-apple-macosx12.0
jocke@max ~>  

But falls over on the linux VM.

To reproduce, just install the attached project on an arm-ubuntu and try to run with the 5.5.2 toolchain from futurejones.

@hassila
Copy link
Author

hassila commented Dec 20, 2021

Adding this to the target helps the build go through and the project works:

swiftSettings: [
  .unsafeFlags(["-Xfrontend", "-validate-tbd-against-ir=none"]) // due to https://bugs.swift.org/browse/SR-15629
] 

@swift-ci
Copy link
Collaborator

Comment by ChecqChe (JIRA)

yes

@hassila
Copy link
Author

hassila commented Dec 21, 2021

Forgot I had a local package there also - added swift-plugin.tar.gz that needs to be a peer directory to swift-plugin-manager for building.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@hassila
Copy link
Author

hassila commented Mar 6, 2023

This is fixed with toolchain:

ubuntu@linux:~/GitHub/SR-15629/swift-plugin-manager$ swift --version
Swift version 5.7.1 (swift-5.7.1-RELEASE)
Target: aarch64-unknown-linux-gnu

@hassila hassila closed this as completed Mar 6, 2023
@AnthonyLatsis AnthonyLatsis added Linux Platform: Linux TBDGen unexpected error Bug: Unexpected error swift 5.5 labels Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A deviation from expected or documented behavior. Also: expected but undesirable behavior. compiler The Swift compiler in itself Linux Platform: Linux swift 5.5 TBDGen unexpected error Bug: Unexpected error
Projects
None yet
Development

No branches or pull requests

3 participants