Build failure w/ no explanation, and after successful configure.

21 views
Skip to first unread message

David Banas

unread,
Apr 21, 2013, 9:56:39 AM4/21/13
to thecom...@googlegroups.com
I'm getting a build failure with no explanation, after a successful configure:

dbanas@dbanas-lap:~/Plush/plush-master$ cabal clean
cleaning...
dbanas@dbanas-lap:~/Plush/plush-master$ cabal configure -fProduction
Resolving dependencies...
[1 of 1] Compiling Main             ( Setup.hs, dist/setup/Main.o )
Linking ./dist/setup/setup ...
Configuring plush-0.4.0.0...
dbanas@dbanas-lap:~/Plush/plush-master$ cabal build
setup: failed
dbanas@dbanas-lap:~/Plush/plush-master$



Mark Lentczner

unread,
Apr 21, 2013, 11:25:34 AM4/21/13
to thecom...@googlegroups.com
Hmmm... that means the custom setup failed.... 

Is git on your PATH? Plush's Setup.hs (called during cabal configure) runs "git describe --always --dirty" in the current directory to get the revision id for what you're building, and then modifies the Version number for the build to incorporate it.

Several ideas:
  1. Check that "git describe --always --dirty" works from the root of your plush tree. Perhaps you have version of git that this doesn't work on?
  2. Are you building directly out of a git clone? If you are building out of a tree copy without the git repo information, this won't work. If you want to build in such a place you could "git init" there, just so it will build...
  3. Are you using some hermetic build system - like cabal-dev, or the newer cabal sandbox feature? I haven't tried the later and I suppose it may run the Setup in a place that isn't within the git repo...
In any event, you can temporarily get past this by disabling the custom setup. Simple edit plush.cabal so instead of "Build-type: Custom" it reads "Build-type: Simple". The custom build is only there to insert the git revision in the version, and to adjust the profiling build option. Neither of these is needed for a running Plush.

Let me know what you find. I'll try to make Setup.hs more robust if we can figure out why it failed on your system.

- Mark

Reply all
Reply to author
Forward
0 new messages