cabal keeps relinking on FreeBSD in rebuilds and retests #2384

Open
trygub opened this Issue Jan 23, 2015 · 1 comment

Projects

None yet

2 participants

@trygub
trygub commented Jan 23, 2015

I ran the following five commands:

cabal clean
cabal build
cabal test
cabal build
cabal test

For the second build and test commands there are extra "Linking ..." messages when compared to the same output from a Linux box:

10a11

[1 of 1] Compiling CabalTest ( src/CabalTest.hs, dist/build/CabalTest.p_o )
14a16,17
[1 of 2] Compiling CabalTest ( src/CabalTest.hs, dist/build/cabalTest/cabalTest-tmp/CabalTest.p_o )
[2 of 2] Compiling Main ( src/cabalTest.hs, dist/build/cabalTest/cabalTest-tmp/Main.p_o )
25d27
< Linking dist/build/cabalTest/cabalTest ...
27c29

< [1 of 1] Compiling Main ( test/cabalTest.hs, dist/build/CabalTestTest/CabalTestTest-tmp/Main.o )

[1 of 1] Compiling Main ( test/cabalTest.hs, dist/build/CabalTestTest/CabalTestTest-tmp/Main.p_o )
39d40
< Linking dist/build/cabalTest/cabalTest ...
41d41
< Linking dist/build/CabalTestTest/CabalTestTest ...
47d46
< Linking dist/build/cabalTest/cabalTest ...
49d47
< Linking dist/build/CabalTestTest/CabalTestTest ...

This was discussed on Haskell-Cafe (post with subject "cabal keeps relinking").

I've re-run the test since then with the latest cabal

cabal --version
cabal-install version 1.22.0.0
using version 1.22.0.0 of the Cabal library

, and the problem is still present (although one Linking ... line has disappeared when moving from 1.20):

There's an improvement in both "cabal test" steps when moving to 1.22 in the sense
that the following lines have disappeared:

Building cabalTest-0.1.0.0...
Preprocessing executable 'cabalTest' for cabalTest-0.1.0.0...
Linking dist/build/cabalTest/cabalTest ...

(i.e., when running test target the exe itself (named cabalTest) is no longer relinked unnecessarily,
only the test for it (named cabalTestTest).

However, when compared with old output on Linux there are still some
extra relinks present:

For the second run of "cabal bulid" I still see

Linking dist/build/cabalTest/cabalTest …
Linking dist/build/CabalTestTest/CabalTestTest …

For the second run of "cabal test" I still see

Linking dist/build/CabalTestTest/CabalTestTest ...

So it seems that the problem is still present in the latest version.

@ttuegel
Member
ttuegel commented Apr 24, 2015

Do you see extra relinking steps on FreeBSD when using GHC by itself? IIRC Cabal does not control when GHC chooses to relink.

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