Cabal 3.2.0.0, run okay with profiling enabled, but installed exe NO profiling enabled

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

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.

I'm using a multi-package project with `profiling: True` defined in cabal.project.local, and my cabal.project is generated by tools, so maybe this workaround doesn't work around 3.2.0.0? ``` $ cat cabal.project.local profiling: True profiling-detail: all-functions optimization: 0 $ cat cabal.project -- Please change Cabal project settings per your needs -- FOLLOWING CONTENTS GONNA BE OVERWRITTEN BY EPM -- -- * this file should be: -- /fw/m3cyue/edh-universe/cabal.project packages: ./e-wrks/edh/lossless-decimal/lossless-decimal.cabal ./e-wrks/edh/elr/elr.cabal ./e-wrks/edh/host.hs/edh.cabal ./e-wrks/nedh/host.hs/nedh.cabal ./e-wrks/sedh/host.hs/sedh.cabal ./e-wrks/hasdim/host.hs/hasdim.cabal ./e-wrks/haskit/host.hs/haskit.cabal ./e-wrks/els/host.hs/els.cabal $ ```
On 2021-02-24, at 03:25, Albert Y. C. Lai
wrote: 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.
_______________________________________________ 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.
participants (2)
-
Albert Y. C. Lai
-
YueCompl