GHC 9.2.1 cannot build text on NetBSD because of interaction between C++ and TemplateHaskell
https://github.com/haskell/text/pull/480 revealed https://cirrus-ci.com/task/6434831672803328?logs=main#L162:
Building test suite 'tests' for text-2.0.1..
[ 1 of 16] Compiling Tests.Lift ( tests/Tests/Lift.hs, /tmp/cirrus-ci-build/dist-newstyle/build/x86_64-netbsd/ghc-9.2.1/text-2.0.1/t/tests/build/tests/tests-tmp/Tests/Lift.o, /tmp/cirrus-ci-build/dist-newstyle/build/x86_64-netbsd/ghc-9.2.1/text-2.0.1/t/tests/build/tests/tests-tmp/Tests/Lift.dyn_o )
<command line>: /tmp/cirrus-ci-build/dist-newstyle/build/x86_64-netbsd/ghc-9.2.1/text-2.0.1/build/libHStext-2.0.1-inplace-ghc9.2.1.so: Undefined symbol "_ZNSt8ios_base4InitD1Ev" (symnum = 2586)
The undefined symbol _ZNSt8ios_base4InitD1Ev
is exactly the same as in #11531 (closed).
I know that NetBSD is not even a Tier 2 platform and that the problem is likely to go away once GHC 9.4 becomes available on NetBSD. It's still slightly surprising that FreeBSD and OpenBSD have no issues of this sort, so opening this ticket for (potential) future reference and other poor souls experimenting with NetBSD.