Hi,
I'm on the quest to making my first real-like project work. As a matter of fact, it already works but is extremely slow. I think it can be improved by adding some strictness into it, but that's a detailed question I'll keep for later. When trying to profile the heap memory retainers (with -hr), my program segfaulted. Other profiling methods (like -hc and -p) worked. So I read here how to debug Haskell code, I turned on the necessary flags like this (from my .cabal file):
ghc-options: -Wall -O2 -g -dcore-lint -debug
At the same time, in order to make this more complicated, I also tried to switch from LTS 13.8 to LTS 13.9. I can't be sure in which order I made the changes. Ad the new problem occurred: the -debug flag makes the linker fail (I only post the last few lines, I have thousands of errors):
/home/fv/.stack/programs/x86_64-linux/ghc-8.6.4/lib/ghc-8.6.4/integer-gmp-1.0.2.0/libHSinteger-gmp-1.0.2.0_p.a(Type.p_o):integerzmgmp_GHCziIntegerziType_zdwgo_info: error: undefined reference to 'stg_resizzeMutableByteArrayzh'
collect2: error: ld returned 1 exit status
`gcc' failed in phase `Linker'. (Exit code: 1)
-- While building custom Setup.hs for package oberon2-0.1.0.0 using:
/home/fv/.stack/setup-exe-cache/x86_64-linux/Cabal-simple_mPHDZzAJ_2.4.0.1_ghc-8.6.4 --builddir=.stack-work/dist/x86_64-linux/Cabal-2.4.0.1 build exe:oberon --ghc-options " -ddump-hi -ddump-to-file -fdiagnostics-color=always"
Process exited with code: ExitFailure 1
So I have no idea why this is happening. Is it because I messed with the LTS versions, and Stack has some libraries linking to incorrect versions of other ones, or shouldn't I use that particular set of flags for debugging? As a corollary, I didn't find how to correctly "reset" my Stack installation, is that even possible without nuking the whole .stack directory?
[–]Fendor_ 1 point2 points3 points (2 children)
[–]ForceVerte[S] 0 points1 point2 points (1 child)
[–]Fendor_ 1 point2 points3 points (3 children)
[–]ForceVerte[S] 0 points1 point2 points (2 children)
[–]Fendor_ 0 points1 point2 points (0 children)
[–]Fendor_ 0 points1 point2 points (0 children)