I’ve been experiencing a nasty issue with profiling on Windows. But first, the context of setup:
cabal sandbox init --sandbox=.
cabal sandbox init --sandbox=~/dev/foo_shared
cabal install --only-dependencies --enable-library-profiling --enable-executable-profiling
cabal configure --enable-profiling --enable-executable-profiling
cabal build
Everything builds up correctly, but doesn’t link. I then rebuilt with cabal build -v3
, and this is the linker part (the most interesting part):
c:/program files/haskell platform/2014.2.0.0/mingw/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find -lHSrts_debug_p
I googled that, and IIRC, it’s because I lack the profiling library for the GHC’s RTS. I never found it for Windows :( Last information, I’m on Windows 10, not sure it helps though.
Problem solved. The issue is due to the fact I’m using -debug
on the command line interface to GHC. I’ve been told -debug
and -p
are not compatible, hence the error.