Potential new libstdc++ modularization issue

I'm running into what might be another issue with C++ standard library modularization here: Track CIRCT Changes · GeorgeLyon/circt-swift-interop@0f409ae · GitHub

The relevant error seems to be

/usr/lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/utility:378:27: error: redefinition of '__is_in_place_type_v<in_place_type_t<_Tp>>'
    inline constexpr bool __is_in_place_type_v<in_place_type_t<_Tp>> = true;

Am I correct in thinking we need another update to the module map? @egor.zhdan, have you thought any more about how we can fix issues like this without a compiler change, such as maybe providing the modulemap with a command line argument?

Yes, this might be a modularization issue. Are you using Ubuntu/Debian or some other distro?

One way you can do this right now is to deploy a module.modulemap file into the C++ stdlib path, that way Swift will use your own modulemap instead of the one bundled with the Swift toolchain.

I'm on Ubuntu 22.04

1 Like

I just tried it on the 11/3 snapshot, and I end up with the same error: Track CIRCT Changes · GeorgeLyon/circt-swift-interop@6e8fcc8 · GitHub

I'm a bit confused though because both utility and functional were placed in the modulemap in your earlier patch: [cxx-interop] Move included stdlib headers from libstdcxx.h to the modulemap by egorzhdan · Pull Request #60722 · apple/swift · GitHub, which is what I was about to do to "fix" the issue. Any other ideas about what may be wrong?

Hello Vishnu here, I am new to development can you please tell me how to start, I am completely confused and overwhelmed :D