Swift library link errors with Trunk (mac)?

In Chromium, we're building a bunch of interop tests just fine with Swift5.7. However, when I switch the toolchain to the latest Trunk toolchain, I get a bunch of link errors:

ld64.lld: error: library not found for -lswiftstd
ld64.lld: error: library not found for -lswiftCxx
ld64.lld: error: library not found for -lswiftCompatibility56
ld64.lld: error: library not found for -lswiftstd
ld64.lld: error: library not found for -lswiftCxx
ld64.lld: error: library not found for -lswiftCompatibility56
ld64.lld: error: library not found for -lswiftstd
ld64.lld: error: library not found for -lswiftCxx
ld64.lld: error: library not found for -lswiftCompatibility56
ld64.lld: error: library not found for -lswiftstd
ld64.lld: error: library not found for -lswiftCxx
ld64.lld: error: library not found for -lswiftCompatibility56
ld64.lld: error: library not found for -lswiftstd
ld64.lld: error: library not found for -lswiftCxx
ld64.lld: error: library not found for -lswiftCompatibility56
ld64.lld: error: library not found for -lswiftstd
ld64.lld: error: library not found for -lswiftCxx
ld64.lld: error: library not found for -lswiftCompatibility56
ld64.lld: error: library not found for -lswiftstd
ld64.lld: error: library not found for -lswiftCxx
ld64.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)

Has anyone seen anything like this? We're definitely not directly including any of these libraries.

We figured it out partially, our build system was looking in the wrong place for compat libraries.

https://chromium-review.googlesource.com/c/chromium/src/+/3930584

That said, this still breaks our catalyst build because the compat libraries are not present in the ToT snapshot when building for catalyst. Is this just an oversight?

Could you post the error you get when building for Mac Catalyst?

ld64.lld: error: ../../third_party/swift-toolchain/usr/lib/swift/macosx/libswiftCompatibilityConcurrency.a(CompatibilityConcurrency.cpp.o) has platform macOS, which is different from target platform macCatalyst

(Cribbed from chromium | buildbucket/cr-buildbucket/8801593085733033281/+/u/compile/raw_io.output_text_failure_summary_ | LogDog )

Hmm, I'm not sure if the open source toolchain builds the Mac Catalyst enabled slices for the compatibility libraries. @edymtt do you happen to know where we stand with Mac Catalyst support?

I confirmed that that's indeed the case (i.e. we do not build the Mac Catalyst builds in the open source toolchain yet). I will check to see what we can do to unblock your testing to avoid this issue.

Thanks Alex. Should I bother filing a bug at github?

For sure, it would be helpful as then we could update it when it's resolved.

Filed Open source builds do not support MacCatalyst target · Issue #61418 · apple/swift · GitHub

1 Like

There hasn't been any update on the bug, when we might see this in the upstream toolchain?