Skip to content

fix: compilation on x86_64-swift-linux-musl#5

Merged
p-x9 merged 1 commit intop-x9:mainfrom
asevko:fix-linux-compilation
Apr 1, 2026
Merged

fix: compilation on x86_64-swift-linux-musl#5
p-x9 merged 1 commit intop-x9:mainfrom
asevko:fix-linux-compilation

Conversation

@asevko
Copy link
Copy Markdown
Contributor

@asevko asevko commented Mar 31, 2026

When building for x86_64-swift-linux-musl

swift build --configuration release --swift-sdk x86_64-swift-linux-musl --product ObjectArchiveKit

the build failed with ambiguous use of 'ARFMAG':

/Users/asevko/work/forks/ObjectArchiveKit/Sources/ObjectArchiveKit/Model/ArchiveMemberHeader.swift:61:23: error: ambiguous use of 'ARFMAG'
 59 | extension ArchiveMemberHeader {
 60 |     public var isValid: Bool {
 61 |         guard fmag == ARFMAG,
    |                       `- error: ambiguous use of 'ARFMAG'
 62 |               Int(_size) != nil else {
 63 |             return false

ObjectArchiveKitC.ARFMAG:1:12: note: found this candidate in module 'ObjectArchiveKitC'
1 | public var ARFMAG: String { get }
  |            `- note: found this candidate in module 'ObjectArchiveKitC'

linux_ar.ARFMAG:1:12: note: found this candidate in module 'linux_ar'
1 | public var ARFMAG: String { get }
  |            `- note: found this candidate in module 'linux_ar'

That PR resolves that ambiguity via specifying usage of ARFMAG from ObjectArchiveKitC.

Note: the x86_64-swift-linux-musl toolchain is installed via swiftly; the active toolchain should also be managed by swiftly. In my case that was:

swiftly link 6.2.3

@p-x9
Copy link
Copy Markdown
Owner

p-x9 commented Apr 1, 2026

Thank you

@p-x9 p-x9 merged commit 96d782a into p-x9:main Apr 1, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants