Problem with swift overlays for C++ standard library

Hey all,

I tried to run the following code with swift -enable-experimental-cxx-interop foo.swift

// foo.swift
import CxxStdlib

let str = std.string("")

print(str.debugDescription)

However, I got the following error, Any idea what I'm missing?

JIT session error: Symbols not found: [ _$sSo3stdO3__1O056__CxxTemplateInstNSt3__112basic_stringIcNS_11char_traitsh15EENS_9allocatorH4EEEEV0B6StdlibE16debugDescriptionSSvg, _$sSo3stdO3__1O056__CxxTemplateInstNSt3__112basic_stringIcNS_11char_traitsh15EENS_9allocatorH4EEEEV0B6StdlibE0G7LiteralAFSS_tcfC ]
Failed to materialize symbols: { (main, { _$ss5print_9separator10terminatoryypd_S2StFfA0_, _$s5test13strSo3stdO3__1O056__CxxTemplateInstNSt3__112basic_stringIcNS_11char_traitsj15EENS_9allocatorJ4EEEEVvp, _$ss5print_9separator10terminatoryypd_S2StFfA1_, _$ss27_finalizeUninitializedArrayySayxGABnlF, _got.$ss14_BridgeStorageVMn, ___swift_instantiateConcreteTypeFromMangledName, _$ss14_BridgeStorageV14endCOWMutationyyF, _$ss12_ArrayBufferV14endCOWMutationyyF, _symbolic _____y_____G s14_BridgeStorageV s017__ContiguousArrayB4BaseC, _got.$ss28__ContiguousArrayStorageBaseCMn, _$sSayxGlWOh, _$ss14_BridgeStorageVys017__ContiguousArrayB4BaseCGMD, _$sSa12_endMutationyyF, _main, __swift_FORCE_LOAD_$_swiftDarwin_$_test1 }) }

Many thanks :)

Interesting, thanks for bringing up this issue!

Is the error reproducible if instead of interpreting the source file, you compile it with swiftc -enable-experimental-cxx-interop -o binary foo and then run the resulting binary?

Thanks for the reply!

The error is not reproducible when I compile and run the binary.