Repository navigation
Closed
Labels
cabal-install: v2-build systemAffecting v2-build and related commands that use v2-architecture (aka "nix local builds").resolution: duplicatetype: bug
Description
Edit @ezyang. Simplified the test case; you only need to depend on bifunctors or one of the Kmett packages. Seems to be related to custom setup.
Compiling my project with profiling does not work. A test cabal file is pasted below. Running the following:
$ cabal new-build --enable-profiling --enable-library-profiling
stops building dependencies half way through, and when I look at the log file ~/.cabal/logs/bifunctors-5.3.log I see at the bottom:
src/Data/Bifunctor/Tannen.hs:35:8:
Could not find module ‘Control.Comonad’
Perhaps you haven't installed the profiling libraries for package ‘comonad-5@comon_BPwjoCtOoUPAMJakPkbNa0’?
Use -v to see a list of the files searched for.
When I run the command again, it tries again to build the failed dependencies, and fails in the same way. Running plain cabal new-build works fine.
Here is a complete test case. Run this as root on a fresh Ubuntu 14.04 install:
#!/bin/bash
# Install ghc and cabal-install
add-apt-repository -y ppa:hvr/ghc
apt-get update
apt-get install -y ghc-7.10.3 ghc-7.10.3-prof cabal-install-1.24
# Add a regular unix user
useradd -m -s /bin/bash -U captain
echo "PATH=/opt/ghc/7.10.3/bin:/opt/cabal/1.24/bin:"'$PATH' >> /home/captain/.profile
cat << 'EOF' | sudo -u captain -i
cabal update
mkdir test
cd test
curl -O https://gist.githubusercontent.com/bitc/b9a75eec6da145b5a151254bcc906a53/raw/6e68a763dba63ff8f32026a8d1ab90ec6504d33b/test.cabal
cabal new-build
echo "Finished regular new-build with exit code: $?"
cabal new-build --enable-profiling --enable-library-profiling
echo "Finished prof new-build with exit code: $? (but check the logs!)"
EOFtest.cabal
name: test
version: 0.1.0.0
license: BSD3
license-file: LICENSE
author: captain
maintainer: <>
build-type: Simple
extra-source-files: ChangeLog.md
cabal-version: >=1.10
library
exposed-modules:
build-depends: base,
bifunctors
hs-source-dirs: src
default-language: Haskell2010
Metadata
Metadata
Assignees
Labels
cabal-install: v2-build systemAffecting v2-build and related commands that use v2-architecture (aka "nix local builds").resolution: duplicatetype: bug
Activity
23Skidoo commentedon Jun 7, 2016
/cc @dcoutts
ezyang commentedon Sep 6, 2016
Confirm that I can reproduce.
ezyang commentedon Sep 6, 2016
Known facts:
Current hypothesis: Cabal 1.22 didn't know how to install profiling objects; Cabal 1.24 does know how, so we need to force a newer custom setup in this case.
ezyang commentedon Sep 6, 2016
OK, hypothesis verified. Workaround: add
constraints: Cabal >= 1.24to your Cabal file.ezyang commentedon Sep 19, 2016
OK this is a dupe of #3790 which diagnoses the problem more directly.
23Skidoo commentedon Sep 21, 2016
Closing in favour of #3790, which has been now fixed.