Skip to content

cabal install silently ignores --enable-profiling flags. #8529

Closed

Description

@AndreasPK

TLDR

Installing a profiled version of an executable seems to be not supported.

Instead cabal seems to silently swallow the flag.

To Reproduce

This does install a non-profiled version of the executable.

andi@horzube:~$ cabal install hasktags --enable-executable-profiling --overwrite-policy=always --enable-profiling
Warning: this is a debug build of cabal-install with assertions enabled.
Resolving dependencies...
Up to date
Warning: installdir is not defined. Set it in your cabal config file or use
--installdir=<path>. Using default installdir: "/home/andi/.cabal/bin"
Symlinking 'hasktags' to '/home/andi/.cabal/bin/hasktags'
andi@horzube:~$ hasktags +RTS -p
hasktags: the flag -p requires the program to be built with -prof
hasktags:

I can build a profiled version of a package by running cabal build and copying over, but that seems unneccesary.

Expected behavior

I would have expected cabal to install a profiled version of the program if I ask it to. In absence of that I would at least expect it to complain about the flag being ignored/incompatible with install.

But I don't think there is a good reason to have profiling not work with the install command.

System information

  • Operating system: Debian
  • cabal, ghc versions: HEAD/9.4.2

Additional context
Add any other context about the problem here.

Activity

  1. Mikolaj commented on Oct 13, 2022

    @Mikolaj
    Member

    Indeed, cabal install ignores some flags (e.g., #7236). I didn't know about this one. Thank you for the report.

  2. self-assigned this
    on Feb 6, 2024
  3. alt-romes commented on Feb 6, 2024

    @alt-romes
    Collaborator

    This should be fixed by #9697.

  4. alt-romes commented on Feb 12, 2024

    @alt-romes
    Collaborator

    Fixed by #9697

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions