Here's my build command:
swift build --product API -c release --static-swift-stdlib -Xlinker -L/usr/lib64 -Xlinker -lc++
That was the result of ChatGPT's guidance. But I also tried these:
swift build --product API -c release --static-swift-stdlib
swift build --product API -c release --static-swift-stdlib -Xlinker -lc++
swift build --product API -c release --static-swift-stdlib -Xlinker -L/usr/lib64
Here's the output of the top command:
Building for production...
error: link command failed with exit code 1 (use -v to see invocation)
/usr/bin/ld.gold: error: cannot find -lstdc++
/usr/bin/ld.gold: error: cannot find -lc++
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(umsg.ao):umsg.cpp:DW.ref.__gxx_personality_v0: error: undefined reference to '__gxx_personality_v0'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(unum.ao):unum.cpp:function unum_clone_65_swift: error: undefined reference to '__dynamic_cast'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(unum.ao):unum.cpp:function unum_clone_65_swift: error: undefined reference to '__dynamic_cast'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(unum.ao):unum.cpp:function unum_getAttribute_65_swift: error: undefined reference to '__dynamic_cast'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(unum.ao):unum.cpp:function unum_setAttribute_65_swift: error: undefined reference to '__dynamic_cast'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(decimfmt.ao):decimfmt.cpp:function __clang_call_terminate: error: undefined reference to '__cxa_begin_catch'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(decimfmt.ao):decimfmt.cpp:function __clang_call_terminate: error: undefined reference to 'std::terminate()'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(decimfmt.ao):decimfmt.cpp:typeinfo for icu_65_swift::DecimalFormat: error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(dcfmtsym.ao):dcfmtsym.cpp:typeinfo for icu_65_swift::DecimalFormatSymbols: error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(dcfmtsym.ao):dcfmtsym.cpp:typeinfo for icu_65_swift::(anonymous namespace)::DecFmtSymDataSink: error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(dcfmtsym.ao):dcfmtsym.cpp:typeinfo for icu_65_swift::(anonymous namespace)::CurrencySpacingSink: error: undefined reference to 'vtable for __cxxabiv1::__si_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(rbnf.ao):rbnf.cpp:function icu_65_swift::RuleBasedNumberFormat::operator==(icu_65_swift::Format const&) const: error: undefined reference to '__cxa_bad_typeid'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(rbnf.ao):rbnf.cpp:vtable for icu_65_swift::LocalizationInfo: error: undefined reference to '__cxa_pure_virtual'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(rbnf.ao):rbnf.cpp:vtable for icu_65_swift::LocalizationInfo: error: undefined reference to '__cxa_pure_virtual'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(rbnf.ao):rbnf.cpp:vtable for icu_65_swift::LocalizationInfo: error: undefined reference to '__cxa_pure_virtual'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(rbnf.ao):rbnf.cpp:vtable for icu_65_swift::LocalizationInfo: error: undefined reference to '__cxa_pure_virtual'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(rbnf.ao):rbnf.cpp:typeinfo for icu_65_swift::UMemory: error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(calendar.ao):calendar.cpp:function icu_65_swift::Calendar::isEquivalentTo(icu_65_swift::Calendar const&) const: error: undefined reference to '__cxa_bad_typeid'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(calendar.ao):calendar.cpp:function icu_65_swift::LocaleCacheKey<icu_65_swift::SharedCalendar>::operator==(icu_65_swift::CacheKeyBase const&) const: error: undefined reference to '__cxa_bad_typeid'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(timezone.ao):timezone.cpp:function icu_65_swift::TimeZone::operator==(icu_65_swift::TimeZone const&) const: error: undefined reference to '__cxa_bad_typeid'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(reldatefmt.ao):reldatefmt.cpp:typeinfo for icu_65_swift::FormattedRelativeDateTime: error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(number_affixutils.ao):number_affixutils.cpp:typeinfo for icu_65_swift::number::impl::TokenConsumer: error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(number_affixutils.ao):number_affixutils.cpp:typeinfo for icu_65_swift::number::impl::SymbolProvider: error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(number_decimalquantity.ao):number_decimalquantity.cpp:typeinfo for icu_65_swift::IFixedDecimal: error: undefined reference to 'vtable for __cxxabiv1::__class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(number_decimalquantity.ao):number_decimalquantity.cpp:typeinfo for icu_65_swift::number::impl::DecimalQuantity: error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(number_fluent.ao):number_fluent.cpp:function icu_65_swift::number::impl::MicroProps::~MicroProps(): error: undefined reference to 'operator delete(void*)'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(number_formatimpl.ao):number_formatimpl.cpp:typeinfo for icu_65_swift::number::impl::EmptyModifier: error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(number_longnames.ao):number_longnames.cpp:typeinfo for icu_65_swift::number::impl::LongNameHandler: error: undefined reference to 'vtable for __cxxabiv1::__vmi_class_type_info'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(numparse_impl.ao):numparse_impl.cpp:function icu_65_swift::numparse::impl::AffixPatternMatcher::~AffixPatternMatcher(): error: undefined reference to 'operator delete(void*)'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(numparse_affixes.ao):numparse_affixes.cpp:function icu_65_swift::numparse::impl::AffixPatternMatcherBuilder::~AffixPatternMatcherBuilder(): error: undefined reference to 'operator delete(void*)'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicui18nswift.a(numparse_affixes.ao):numparse_affixes.cpp:function non-virtual thunk to icu_65_swift::numparse::impl::AffixPatternMatcherBuilder::~AffixPatternMatcherBuilder(): error: undefined reference to 'operator delete(void*)'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::UMutex::getMutex(): error: undefined reference to 'std::__once_callable'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::UMutex::getMutex(): error: undefined reference to 'std::__once_call'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::UMutex::getMutex(): error: undefined reference to '__once_proxy'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::UMutex::getMutex(): error: undefined reference to 'std::__throw_system_error(int)'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::umtx_init(): error: undefined reference to 'std::condition_variable::condition_variable()'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function umtx_lock_65_swift: error: undefined reference to 'std::__throw_system_error(int)'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::umtx_initImplPreInit(icu_65_swift::UInitOnce&): error: undefined reference to 'std::__once_callable'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::umtx_initImplPreInit(icu_65_swift::UInitOnce&): error: undefined reference to 'std::__once_call'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::umtx_initImplPreInit(icu_65_swift::UInitOnce&): error: undefined reference to '__once_proxy'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::umtx_initImplPreInit(icu_65_swift::UInitOnce&): error: undefined reference to 'std::condition_variable::wait(std::unique_lock<std::mutex>&)'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::umtx_initImplPreInit(icu_65_swift::UInitOnce&): error: undefined reference to 'std::__throw_system_error(int)'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::umtx_initImplPostInit(icu_65_swift::UInitOnce&): error: undefined reference to 'std::condition_variable::notify_all()'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::umtx_initImplPostInit(icu_65_swift::UInitOnce&): error: undefined reference to 'std::__throw_system_error(int)'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function icu_65_swift::umtx_cleanup(): error: undefined reference to 'std::condition_variable::~condition_variable()'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(umutex.ao):umutex.cpp:function void std::call_once<void (&)()>(std::once_flag&, void (&)())::{lambda()#2}::__invoke(): error: undefined reference to 'std::__once_callable'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(unifiedcache.ao):unifiedcache.cpp:function icu_65_swift::UnifiedCache::getInstance(UErrorCode&): error: undefined reference to 'std::condition_variable::condition_variable()'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(unifiedcache.ao):unifiedcache.cpp:function icu_65_swift::UnifiedCache::_putIfAbsentAndGet(icu_65_swift::CacheKeyBase const&, icu_65_swift::SharedObject const*&, UErrorCode&) const: error: undefined reference to 'std::condition_variable::notify_all()'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(unifiedcache.ao):unifiedcache.cpp:function icu_65_swift::UnifiedCache::_put(UHashElement const*, icu_65_swift::SharedObject const*, UErrorCode) const: error: undefined reference to 'std::condition_variable::notify_all()'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(unifiedcache.ao):unifiedcache.cpp:function icu_65_swift::UnifiedCache::_poll(icu_65_swift::CacheKeyBase const&, icu_65_swift::SharedObject const*&, UErrorCode&) const: error: undefined reference to 'std::condition_variable::wait(std::unique_lock<std::mutex>&)'
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static/linux/libicuucswift.a(unifiedcache.ao):unifiedcache.cpp:function unifiedcache_cleanup(): error: undefined reference to 'std::condition_variable::~condition_variable()'
...
... (truncated due to character limits)
...
std::__detail::_Hashtable_traits<true, false, true> >::_M_rehash_aux(unsigned long, std::integral_constant<bool, true>): error: undefined reference to 'std::__throw_bad_alloc()'
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
[0/1] Linking API
Here's the output of ldconfig -v 2>/dev/null | grep -v ^$'\t'
:
/usr/lib64//bind9-export:
/usr/lib64/dyninst:
/usr/lib64/mysql:
/lib:
/lib64:
/lib/sse2: (hwcap: 0x0000000000000001)
/lib64/sse2: (hwcap: 0x0000000000000001)
/lib64/tls: (hwcap: 0x8000000000000000)
Here's the output of: sudo find /usr/lib64 /lib /lib64 -name "libstdc++*"
/usr/lib64/libstdc++.so.6.0.24
/usr/lib64/libstdc++.so.6
So it appears to me that the libstdc++ is present on my Amazon Linux 2 instance. But apparently it's not capable of being found during linking. I've faced a building issue with Docker in the past on a Intel Mac and the issue was with running out of memory while building. I increased the ram of the Docker instance and everything started working properly. In this case I'm on an AWS EC2 instance with 16GB of ram, so I don't think that's the problem this time around.
Here's the output of specifying the library directly with the -v
parameter:
swift build --product API -c release --static-swift-stdlib -Xlinker -L/usr/lib64 -Xlinker /usr/lib64/libstdc++.so.6.0.24 -v
Planning build
Building for production...
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/bin/swiftc -module-name _NIODataStructures -incremental -emit-dependencies -emit-module -emit-module-path "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/_NIODataStructures.swiftmodule" -output-file-map "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/_NIODataStructures.build/output-file-map.json" -parse-as-library -whole-module-optimization -num-threads 4 -c "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-nio/Sources/_NIODataStructures/Heap.swift" "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-nio/Sources/_NIODataStructures/PriorityQueue.swift" -I "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release" -target x86_64-unknown-linux-gnu -swift-version 5 -O -g -j4 -DSWIFT_PACKAGE -module-cache-path "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/ModuleCache" -static-stdlib -parseable-output -parse-as-library -color-diagnostics -v -suppress-warnings
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/bin/swiftc -module-name Backtrace -incremental -emit-dependencies -emit-module -emit-module-path "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/Backtrace.swiftmodule" -output-file-map "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/Backtrace.build/output-file-map.json" -parse-as-library -whole-module-optimization -num-threads 4 -c "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-backtrace/Sources/Backtrace/Backtrace.swift" "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-backtrace/Sources/Backtrace/Demangle.swift" -I "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release" -target x86_64-unknown-linux-gnu -swift-version 5 -O -g -j4 -DSWIFT_PACKAGE -Xcc "-fmodule-map-file=/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/CBacktrace.build/module.modulemap" -Xcc -I -Xcc "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-backtrace/Sources/CBacktrace/include" -module-cache-path "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/ModuleCache" -static-stdlib -parseable-output -parse-as-library -color-diagnostics -v -suppress-warnings
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/bin/swiftc -module-name NIOConcurrencyHelpers -incremental -emit-dependencies -emit-module -emit-module-path "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/NIOConcurrencyHelpers.swiftmodule" -output-file-map "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/NIOConcurrencyHelpers.build/output-file-map.json" -parse-as-library -whole-module-optimization -num-threads 4 -c "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-nio/Sources/NIOConcurrencyHelpers/NIOAtomic.swift" "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-nio/Sources/NIOConcurrencyHelpers/atomics.swift" "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-nio/Sources/NIOConcurrencyHelpers/lock.swift" -I "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release" -target x86_64-unknown-linux-gnu -swift-version 5 -O -g -j4 -DSWIFT_PACKAGE -Xcc "-fmodule-map-file=/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/CNIOAtomics.build/module.modulemap" -Xcc -I -Xcc "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-nio/Sources/CNIOAtomics/include" -module-cache-path "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/ModuleCache" -static-stdlib -parseable-output -parse-as-library -color-diagnostics -v -suppress-warnings
/root/swift-5.7.1-RELEASE-amazonlinux2/usr/bin/swiftc -module-name Logging -incremental -emit-dependencies -emit-module -emit-module-path "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/Logging.swiftmodule" -output-file-map "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/Logging.build/output-file-map.json" -parse-as-library -whole-module-optimization -num-threads 4 -c "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-log/Sources/Logging/Locks.swift" "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-log/Sources/Logging/LogHandler.swift" "/root/spaces/Uncommonly Good/API/.build/checkouts/swift-log/Sources/Logging/Logging.swift" -I "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release" -target x86_64-unknown-linux-gnu -swift-version 5 -O -g -j4 -DSWIFT_PACKAGE -module-cache-path "/root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/ModuleCache" -static-stdlib -parseable-output -parse-as-library -color-diagnostics -v -suppress-warnings
remark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimizationremark: Incremental compilation has been disabled: it is not compatible with whole module optimizationSwift version 5.7.1 (swift-5.7.1-RELEASE)Swift version 5.7.1 (swift-5.7.1-RELEASE)Target: x86_64-unknown-linux-gnuTarget: x86_64-unknown-linux-gnuSwift version 5.7.1 (swift-5.7.1-RELEASE)Target: x86_64-unknown-linux-gnuSwift version 5.7.1 (swift-5.7.1-RELEASE)Target: x86_64-unknown-linux-gnu/root/swift-5.7.1-RELEASE-amazonlinux2/usr/bin/swift-frontend -frontend -c /root/spaces/Uncommonly Good/API/.build/checkouts/swift-log/Sources/Logging/Locks.swift /root/spaces/Uncommonly Good/API/.build/checkouts/swift-log/Sources/Logging/LogHandler.swift /root/spaces/Uncommonly Good/API/.build/checkouts/swift-log/Sources/Logging/Logging.swift -emit-module-path /root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/Logging.swiftmodule -emit-module-doc-path /root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/Logging.swiftdoc -emit-module-source-info-path /root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/Logging.swiftsourceinfo -emit-dependencies-path /root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/Logging.build/Logging.d -target x86_64-unknown-linux-gnu -disable-objc-interop -I /root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release -color-diagnostics -g -module-cache-path /root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/ModuleCache -suppress-warnings -swift-version 5 -O -D SWIFT_PACKAGE -new-driver-path /root/swift-5.7.1-RELEASE-amazonlinux2/usr/bin/swift-driver -empty-abi-descriptor -resource-dir /root/swift-5.7.1-RELEASE-amazonlinux2/usr/lib/swift_static -use-static-resource-dir -module-name Logging -parse-as-library -num-threads 4 -o /root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/Logging.build/Locks.swift.o -o /root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/Logging.build/LogHandler.swift.o -o /root/spaces/Uncommonly Good/API/.build/x86_64-unknown-linux-gnu/release/Logging.build/Logging.swift.o
...
... (truncated due to character limit)
...
error: link command failed with exit code 1 (use -v to see invocation)
clang version 13.0.0 (https://github.com/apple/llvm-project.git 65411f5b90f6f72550341b4856e9b678f4162d83)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /root/swift-5.7.1-RELEASE-amazonlinux2/usr/bin
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/10
Found candidate GCC installation: /usr/lib/gcc/x86_64-redhat-linux/7
Selected GCC installation: /usr/lib/gcc/x86_64-redhat-linux/10
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
...
... (truncated due to character limit)
...
/usr/bin/ld.gold: error: cannot find -lstdc++
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
Anyone understand why it's complaining about not finding lstdc++ when I'm specifying the exact location of it?