Skip to content

[Concurrency] multiple definition of 'swift::threading::fatal' after new Threading library #59444

@kateinoigakukun

Description

@kateinoigakukun

Describe the bug
multiple definition of 'swift::threading::fatal(char const*, ...)' linking failure happens since #59287

To Reproduce

Follow the below steps.

$ cat main.swift
import Dispatch

@main
struct Main {
  static func main() async {}
}

$ /home/katei/.ghq/github.com/kylef/swiftenv/versions/DEVELOPMENT-SNAPSHOT-2022-06-13-a/usr/bin/swiftc -parse-as-library -static-stdlib
error: link command failed with exit code 1 (use -v to see invocation)
/usr/bin/ld.gold: error: /home/katei/.ghq/github.com/kylef/swiftenv/versions/DEVELOPMENT-SNAPSHOT-2022-06-13-a/usr/lib/swift_static/linux/libswiftCore.a(Errors.cpp.o): multiple definition of 'swift::threading::fatal(char const*, ...)'
/usr/bin/ld.gold: /home/katei/.ghq/github.com/kylef/swiftenv/versions/DEVELOPMENT-SNAPSHOT-2022-06-13-a/usr/lib/swift_static/linux/libswift_Concurrency.a(ThreadingError.cpp.o): previous definition here

Expected behavior

No link failure

Environment (please complete the following information):

  • OS: Ubuntu 20.04.4 LTS
  • Swift Version: DEVELOPMENT-SNAPSHOT-2022-06-13-a

Metadata

Metadata

Assignees

Labels

bugA deviation from expected or documented behavior. Also: expected but undesirable behavior.concurrencyFeature: umbrella label for concurrency language featuresstatic stdlib

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions