https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90050
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |INVALID
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
The -lstdc++fs requirement for std::filesystem in GCC 8 is documented in
several places:
https://gcc.gnu.org/onlinedocs/gcc-8.3.0/libstdc++/manual/manual/using.html#manual.intro.using.flags
https://gcc.gnu.org/onlinedocs/gcc-8.3.0/libstdc++/manual/manual/status.html#status.iso.2017
https://gcc.gnu.org/onlinedocs/gcc-8.3.0/libstdc++/manual/manual/using_dynamic_or_shared.html#manual.intro.using.linkage.experimental
I don't know why it crashes with Ubuntu, it should be a linker error. I suspect
Ubuntu is doing something silly like providing libstdc++.so from GCC 9, which
defines std::filesystem::path differently, and so is not compatible with C++17
code compiled using GCC 8.