swiftlang / swiftlang/swift-java

CI: Linux + 6.2 builds are broken with duplicated symbol issues when prebuilt swift-syntax is used

Open
#418 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

blocked bug build
Dominant language
Swift
Stars
1.2k
Forks
123
Avg merge
1d 7h
Merged PRs (30d)
16

Description


/usr/bin/ld.gold: /__w/swift-java/swift-java/.build/x86_64-unknown-linux-gnu/debug/SwiftDiagnostics-tool.build/FixIt.swift.o: previous definition here
/usr/bin/ld.gold: error: /__w/swift-java/swift-java/.build/prebuilts/swift-syntax/602.0.0/swift-6.2-RELEASE-MacroSupport-ubuntu_jammy_x86_64/lib/libMacroSupport.a(FixIt.swift.o): multiple definition of '$s16SwiftDiagnostics5FixItVN'
/usr/bin/ld.gold: /__w/swift-java/swift-java/.build/x86_64-unknown-linux-gnu/debug/SwiftDiagnostics-tool.build/FixIt.swift.o: previous definition here
/usr/bin/ld.gold: error: /__w/swift-java/swift-java/.build/prebuilts/swift-syntax/602.0.0/swift-6.2-RELEASE-MacroSupport-ubuntu_jammy_x86_64/lib/libMacroSupport.a(FixIt.swift.o): multiple definition of '$s16SwiftDiagnostics5FixItV6ChangeON'
/usr/bin/ld.gold: /__w/swift-java/swift-java/.build/x86_64-unknown-linux-gnu/debug/SwiftDiagnostics-tool.build/FixIt.swift.o: previous definition here
/usr/bin/ld.gold: error: /__w/swift-java/swift-java/.build/prebuilts/swift-syntax/602.0.0/swift-6.2-RELEASE-MacroSupport-ubuntu_jammy_x86_64/lib/libMacroSupport.a(IfConfigDecl+IfConfig.swift.o): multiple definition of '$s11SwiftSyntax012IfConfigDeclB0V0acD0E12activeClause2inAA0cdgB0VSg6clause_Say0A11Diagnostics10DiagnosticVG11diagnosticstx_tAD18BuildConfigurationRzlF'
/usr/bin/ld.gold: /__w/swift-java/swift-java/.build/x86_64-unknown-linux-gnu/debug/SwiftIfConfig-tool.build/IfConfigDecl+IfConfig.swift.o: previous definition here
clang: error: linker command failed with exit code 1 (use -v to see invocation)
[1425/1426] Linking swift-javaPackageTests.xctest
Error: Process completed with exit code 1.

Which is rather weird because all we're doing is just a plain old swiftly installation...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Linux Swift 6.2 CI build using the prebuilt swift-syntax installation described in the linker output, and inspect how SwiftDiagnostics and SwiftIfConfig are linked. Done means the Linux build completes without duplicate symbols when the prebuilt swift-syntax packages are used.

Written by the indexing model from the issue text.

Assessment

Tech stack
swift
Domain
build-system, ci-cd
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.