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-10134] Swift 5 SwiftPM doesn't track what to recompile correctly #4723

Open
weissi opened this issue Mar 20, 2019 · 2 comments
Open

[SR-10134] Swift 5 SwiftPM doesn't track what to recompile correctly #4723

weissi opened this issue Mar 20, 2019 · 2 comments
Labels

Comments

@weissi
Copy link
Member

weissi commented Mar 20, 2019

Previous ID SR-10134
Radar rdar://problem/49069443
Original Reporter @weissi
Type Bug
Additional Detail from JIRA
Votes 1
Component/s Package Manager
Labels Bug
Assignee None
Priority Medium

md5: 096a3b5097efc4b9d80d9d3cd7b751ab

Issue Description:

I just had a compiler crash (SR-10133) that happened with TSan, so I just wanted to recompile without TSan which lead to linker errors. I think SwiftPM doesn't seem to track correctly what to recompile and recompiled too little.

Repro:

git clone https://github.com/apple/swift-nio
cd swift-nio
git fetch origin
git reset --hard 164f9b12d616bfcbd13b6a89ce52099c815188d4
/Library/Developer/Toolchains/swift-5.0-DEVELOPMENT-SNAPSHOT-2019-03-10-a.xctoolchain/usr/bin/swift build --sanitize=thread

now verify that this compilation has failed (SR-10133) and after than run

/Library/Developer/Toolchains/swift-5.0-DEVELOPMENT-SNAPSHOT-2019-03-10-a.xctoolchain/usr/bin/swift build

(note: no TSan)

expected

no more errors

actual

Undefined symbols for architecture x86_64:
  "___tsan_init", referenced from:
      _tsan.module_ctor in FileDescriptor.swift.o
      _tsan.module_ctor in Linux.swift.o
      _tsan.module_ctor in LinuxCPUSet.swift.o
      _tsan.module_ctor in Resolver.swift.o
      _tsan.module_ctor in Selectable.swift.o
ld: symbol(s) not found for architecture x86_64
<unknown>:0: error: link command failed with exit code 1 (use -v to see invocation)

workaround

rm -rf .build
/Library/Developer/Toolchains/swift-5.0-DEVELOPMENT-SNAPSHOT-2019-03-10-a.xctoolchain/usr/bin/swift build
@belkadan
Copy link

I checked that we declared -sanitize as being incremental-affecting at the swiftc level, so this does indeed sound like a package-manager-level bug.

@ankitspd
Copy link
Member

@swift-ci create

@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

4 participants