haskell / haskell/cabal

Non-profiling dyn objects not built for test suites when profiling is enabled

Open
#5,013 2 comments 2 reactions 0 assignees View on GitHub
Cabal: cmd/build type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

With `--enable-library-profiling` and `--enable-executable-profiling`, non-profiling static and dynamic objects are built for the library's objects, but not for the test suite's. This causes test suites that use TH on their own source code, such as `th-abstraction-2.6.0.0`, to fail:

> Building test suite 'unit-tests' for th-abstraction-0.2.6.0..
> [1 of 3] Compiling Harness ( test/Harness.hs, dist/build/unit-tests/unit-tests-tmp/Harness.p_o )
> [2 of 3] Compiling Types ( test/Types.hs, dist/build/unit-tests/unit-tests-tmp/Types.p_o )
> [3 of 3] Compiling Main ( test/Main.hs, dist/build/unit-tests/unit-tests-tmp/Main.p_o )
>
> : error:
> test/Main.hs:83:3: fatal:
> cannot find object file ‘dist/build/unit-tests/unit-tests-tmp/Harness.dyn_o’
> while linking an interpreted expression

I'm not sure if this is specific to testsuites or also hits executables as well.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.