[Haskell-cafe] Cabal 3.2.0.0, run okay with profiling enabled, but installed exe NO profiling enabled
Albert Y. C. Lai
trebla at vex.net
Tue Feb 23 19:25:10 UTC 2021
3.4.0.0 does the same. I am not sure whether it is a bug or a feature.
Workaround: Write a cabal.project file that goes like:
packages: .
package *
profiling: True
https://cabal.readthedocs.io/en/3.4/cabal-project.html has every
variation and fine-tuning.
On 2021-02-22 9:24 a.m., YueCompl via Haskell-Cafe wrote:
> Dear Cafe,
>
> I'm not sure it is a bug or just designed behavior? But I can't install
> profiling-enabled exe with cabal 3.2.0.0, while direct running works
> correctly.
>
> $ cabal --version
> cabal-install version 3.2.0.0
> compiled using version 3.2.0.0 of the Cabal library
> $cabal run --enable-profiling --enable-executable-profiling exe:els --
> +RTS --info
> Up to date
> [("GHC RTS", "YES")
> ,("GHC version", "8.8.4")
> ,("RTS way", "rts_thr_p")
> ,("Build platform", "x86_64-apple-darwin")
> ,("Build architecture", "x86_64")
> ,("Build OS", "darwin")
> ,("Build vendor", "apple")
> ,("Host platform", "x86_64-apple-darwin")
> ,("Host architecture", "x86_64")
> ,("Host OS", "darwin")
> ,("Host vendor", "apple")
> ,("Target platform", "x86_64-apple-darwin")
> ,("Target architecture", "x86_64")
> ,("Target OS", "darwin")
> ,("Target vendor", "apple")
> ,("Word size", "64")
> ,("Compiler unregisterised", "NO")
> ,("Tables next to code", "YES")
> ,("Flag -with-rtsopts", "-maxN31 -qg")
> ]
> $cabal install --enable-profiling --overwrite-policy=always
> --enable-executable-profiling exe:els && els +RTS --info
> Wrote tarball sdist to
> ...
> Resolving dependencies...
> Up to date
> Copying 'els'
> [("GHC RTS", "YES")
> ,("GHC version", "8.8.4")
> ,("RTS way", "rts_thr")
> ,("Build platform", "x86_64-apple-darwin")
> ,("Build architecture", "x86_64")
> ,("Build OS", "darwin")
> ,("Build vendor", "apple")
> ,("Host platform", "x86_64-apple-darwin")
> ,("Host architecture", "x86_64")
> ,("Host OS", "darwin")
> ,("Host vendor", "apple")
> ,("Target platform", "x86_64-apple-darwin")
> ,("Target architecture", "x86_64")
> ,("Target OS", "darwin")
> ,("Target vendor", "apple")
> ,("Word size", "64")
> ,("Compiler unregisterised", "NO")
> ,("Tables next to code", "YES")
> ,("Flag -with-rtsopts", "-maxN31 -qg")
> ]
> $ cabal install --enable-profiling --overwrite-policy=always
> --enable-executable-profiling exe:els && els +RTS -p
> Wrote tarball sdist to
> ...
> Resolving dependencies...
> Up to date
> Copying 'els'
> els: the flag -p requires the program to be built with -prof
> els:
> els: Usage: <prog> <args> [+RTS <rtsopts> | -RTS <args>] ... --RTS <args>
> els: ...
>
> Is there other options to get a profiling enabled exe installed?
>
> Thanks with regards,
> Compl
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to post.
>
More information about the Haskell-Cafe
mailing list