I’m trying to compile a cabal project using the ghc-wasm-meta 9.8 compiler, but I’m getting the following error:
wasm-ld: error: unable to find library -lHSrts-1.0.2_thr
my cabal.project and each name.cabal have the following ghc-options:
program options/library
ghc-options: -no-hs-main -optl-mexec-model=reactor "-optl-Wl"
something I noticed is that if I run build using --verbose , the call to wasm32-wasi-ghc doesn’t have any of the ghc-options I’ve set. Maybe it’s got something to do with the Setup.hs? but that file just has the usual:
The problem is that singletons-base uses Cabal’s build-type: Customhere. Custom setup is not supported by the WASM backend, as they involve running compiled code during the build process; but Cabal doesn’t know how to run .wasm files. You should be able to proceed by simply changing that line to build-type: Simple.