https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119627
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> --- (In reply to Andrew Sayers from comment #0) > ./cross-compiled: symbol lookup error: ./cross-compiled: undefined symbol: > _ZNSt12__shared_ptrINSt10filesystem7__cxx114_DirELN9__gnu_cxx12_Lock_policyE2 > EEC1EOS5_, version GLIBCXX_3.4.26 > > I assume that's an unrelated error, and it's easily worked around > by not cross-compiling with `-O0`. I think that was Bug 108636 and is fixed in GCC 12.3 (you should really use the latest release on the branch, which is currently 12.4)