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-14595] Cannot build project with Swift package dependencies if Undefined Behavior Sanitizer is on #4423

Open
swift-ci opened this issue May 5, 2021 · 3 comments
Labels

Comments

@swift-ci
Copy link
Contributor

swift-ci commented May 5, 2021

Previous ID SR-14595
Radar rdar://82021188
Original Reporter xy (JIRA User)
Type Bug
Additional Detail from JIRA
Votes 9
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 4488b0eb3b5c3b63d73df892b67d2b4d

Issue Description:

Given an Xcode project that defines an application target, if Undefined Behavior Sanitizer is on in the current scheme, then the compilation will fail with the error, "Could not open or create -dependency_info file"

@swift-ci
Copy link
Contributor Author

Comment by Josh Miller (JIRA)

I experience a similar bug related to a dynamic dependency that stopped building once I enabled Thread Sanitizer for my tests. The package is Resolver and it has three products defined, all wrapping the same target. The build issue came up using the "Resolver-Dynamic" product as one of my dependencies. It even happens while opening the Resolver package directly and trying to test it.

A workaround that I found was to remove the "Resolver-Dynamic" product and set the "Resolver" product to dynamic. So it would appear to be related to how "Resolver-Dynamic" was a renaming of the "Resolver" target.

@swift-ci
Copy link
Contributor Author

Comment by Goppinath Thurairajah (JIRA)

I had the same issue after enabling the `Thread Sanitizer` in Xcode.

  1. Xcode 12.5.1 compiles without any issue.

  2. Xcode 13 compiling for real devices have also had no issues.

  3. Attaching SMP as `static` works and as `dynamic` gives the following error.

`Could not open or create -dependency_info file: DerivedData/<App>-ejgvodpbtmuyqicggqbhmmulndip/Build/Intermediates.noindex/Core.build/Debug-iphonesimulator/Core product.build/Objects-normal-tsan/x86_64/Core_dependency_info.dat`

Renaming the `Objects-normal` directory to `Objects-normal-tsan` let the App to compile successfully.

@kabiroberai
Copy link
Contributor

I'm able to reproduce the same issue with the Address Sanitizer as of Xcode 13.2b1. goppinath (JIRA User)'s suggestion to rename the directory fixes the problem (thanks!)

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants