[Haskell-cafe] cabal keeps relinking
Semen Trygubenko / Семен Тригубенко
semen at trygub.com
Tue Nov 11 12:01:35 UTC 2014
On Fri, Nov 07, 2014 at 10:16:31PM +0100, Niklas Hambüchen wrote:
> Could you detail how cabal relinks for you, e.g. with some cabal -v2 /
> -v3 output?
The -vN outputs are verbose, so I ended up creating a minimalistic
cabal package config that illustrates the problem (attached for reference
— see cabalTest.tar.gz).
This is how the non-verbose outputs look like for builds on FreeBSD:
$ cabal build
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring cabalTest-0.1.0.0...
Building cabalTest-0.1.0.0...
Preprocessing library cabalTest-0.1.0.0...
[1 of 1] Compiling CabalTest ( src/CabalTest.hs, dist/build/CabalTest.o )
In-place registering cabalTest-0.1.0.0...
Preprocessing executable 'cabalTest' for cabalTest-0.1.0.0...
[1 of 2] Compiling CabalTest ( src/CabalTest.hs, dist/build/cabalTest/cabalTest-tmp/CabalTest.o )
[2 of 2] Compiling Main ( src/cabalTest.hs, dist/build/cabalTest/cabalTest-tmp/Main.o )
Linking dist/build/cabalTest/cabalTest ...
$ cabal clean
cleaning...
$ cabal test
Package has never been configured. Configuring with default flags. If this
fails, please run configure manually.
Resolving dependencies...
Configuring cabalTest-0.1.0.0...
Building cabalTest-0.1.0.0...
Preprocessing library cabalTest-0.1.0.0...
[1 of 1] Compiling CabalTest ( src/CabalTest.hs, dist/build/CabalTest.o )
In-place registering cabalTest-0.1.0.0...
Preprocessing executable 'cabalTest' for cabalTest-0.1.0.0...
[1 of 2] Compiling CabalTest ( src/CabalTest.hs, dist/build/cabalTest/cabalTest-tmp/CabalTest.o )
[2 of 2] Compiling Main ( src/cabalTest.hs, dist/build/cabalTest/cabalTest-tmp/Main.o )
Linking dist/build/cabalTest/cabalTest ...
Preprocessing test suite 'CabalTestTest' for cabalTest-0.1.0.0...
[1 of 1] Compiling Main ( test/cabalTest.hs, dist/build/CabalTestTest/CabalTestTest-tmp/Main.o )
Linking dist/build/CabalTestTest/CabalTestTest ...
Running 1 test suites...
Test suite CabalTestTest: RUNNING...
Test suite CabalTestTest: PASS
Test suite logged to: dist/test/cabalTest-0.1.0.0-CabalTestTest.log
1 of 1 test suites (1 of 1 test cases) passed.
and then for rebuilds:
$ cabal build
Building cabalTest-0.1.0.0...
Preprocessing library cabalTest-0.1.0.0...
In-place registering cabalTest-0.1.0.0...
Preprocessing executable 'cabalTest' for cabalTest-0.1.0.0...
Linking dist/build/cabalTest/cabalTest ...
Preprocessing test suite 'CabalTestTest' for cabalTest-0.1.0.0...
Linking dist/build/CabalTestTest/CabalTestTest ...
$ cabal test
Building cabalTest-0.1.0.0...
Preprocessing library cabalTest-0.1.0.0...
In-place registering cabalTest-0.1.0.0...
Preprocessing executable 'cabalTest' for cabalTest-0.1.0.0...
Linking dist/build/cabalTest/cabalTest ...
Preprocessing test suite 'CabalTestTest' for cabalTest-0.1.0.0...
Linking dist/build/CabalTestTest/CabalTestTest ...
Running 1 test suites...
Test suite CabalTestTest: RUNNING...
Test suite CabalTestTest: PASS
Test suite logged to: dist/test/cabalTest-0.1.0.0-CabalTestTest.log
1 of 1 test suites (1 of 1 test cases) passed.
Then I ran the following five commands:
cabal clean
cabal build
cabal test
cabal build
cabal test
three times --- first without, then with -v2 and -v3, on two platforms.
The outputs are here:
http://trygub.com/download/cabalTest-FreeBSD.out.gz
http://trygub.com/download/cabalTest-Linux.out.gz
The behaviour is different on Linux and FreeBSD. This is the diff of the non-verbose outputs:
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 ...
So it seems that what I've observed is FreeBSD-specific — FreeBSD rebuild outputs have extra "Linking ..." messages in them…
Many thanks for your help,
Semen
PS
Linux $ cabal --version
cabal-install version 1.18.0.2
using version 1.18.1.2 of the Cabal library
FreeBSD $ cabal --version
cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library
--
Семен Тригубенко http://trygub.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cabalTest.tar.gz
Type: application/gzip
Size: 974 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141111/5fa2bd5b/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141111/5fa2bd5b/attachment.sig>
More information about the Haskell-Cafe
mailing list