Error building hledger-web #98

simonmichael opened this Issue Apr 8, 2013 · 8 comments


None yet

1 participant


Original author: (January 12, 2013 19:23:47)

[ usual steps ...]

❤ cabal-dev install hledger-web
Loading package hjsmin-0.1.4 ... linking ... done.
[ 3 of 17] Compiling Settings.StaticFiles ( Settings/StaticFiles.hs, dist/build/Settings/StaticFiles.o )
[ 4 of 17] Compiling Hledger.Web.Options ( Hledger/Web/Options.hs, dist/build/Hledger/Web/Options.o )
[ 5 of 17] Compiling Foundation ( Foundation.hs, dist/build/Foundation.o )

Exception when trying to run compile-time code:
Called widgetFileNoReload on "normalize", but no template were found.
Code: widgetFile "normalize"
In a stmt of a 'do' block: $(widgetFile "normalize")
In the second argument of ($)', namelydo { $(widgetFile "normalize");
addStylesheet $ StaticR css_bootstrap_css;
toWidgetHead (\ _render_acWT -> do { ... });
addScript $ StaticR jquery_url_js;
.... }'
In a stmt of a 'do' block:
pc <- widgetToPageContent
$ do { $(widgetFile "normalize");
addStylesheet $ StaticR css_bootstrap_css;
toWidgetHead (\ _render_acWT -> do { ... });
addScript $ StaticR jquery_url_js;
.... }
Failed to install hledger-web-0.19.4
cabal: Error: some packages failed to install:
hledger-web-0.19.4 failed during the building phase. The exception was:
ExitFailure 1

Original issue:


From on January 23, 2013 16:55:13
Any news on this issue? Thanks.


From on January 23, 2013 17:10:41
Hi Eric, thanks for the reminder. It seems web directories like "static" and "template" are not in the current directory as you build with cabal-dev (only). Maybe you can symbolic-link them to that place, or try cabal or hsenv ?


From on January 23, 2013 17:21:20
Thank, Simon. I'll give it a shot.

I know cabal-dev isn't the official way to build hledger, but I've had so much trouble with dependencies when using cabal, trying to keep copies of hledger and pandoc up-to-date.


From on January 23, 2013 18:10:57
Hm, I seem to get the same error running:

❤ cabal-dev -s ../cabal-dev/ install hledger-web

in the hledger-web dir.


From on January 24, 2013 16:00:08
I haven't been able to reproduce this. I'm sitting in the top level of an up-to-date hledger development tree. Usually I have symbolic links to hledger-web/{static,template} here ("make link-web-dirs"), but even without them, cabal-dev install ./hledger-lib ./hledger ./hledger-web works fine here.


From on January 24, 2013 16:23:35
This is the sequence of commands that does not work:

$ cd hledger
$ cabal-dev update
$ rm -rf cabal-dev # just to clean out the environment
$ cabal-dev add-source hledger
$ cabal-dev add-source hledger-lib
$ cabal-dev add-source hledger-web
$ cabal-dev install hledger-web

Adding the files in templates/ to extra-source-files: in hledger-web.cabal seems to fix the issue. (see patch)

Thanks for your help with this! I am still learning haskell builds, so I am doing a bit of fumbling about.


From on January 24, 2013 17:30:29
This turns out to be just like #97 of course. :-| I had forgotten that one, and also the error message seemed more related to static/ . I assume some or all of these template files are actually being used (can't quite see just at the moment) and if I had released without them, the release would have been broken in more than just the above scenario, so thanks a lot for the report!

Moral: I always forget to add new files to cabal, and I need an easy way to detect that.. and maybe cabal-dev add-source PKG; cabal-dev install PKG is it..


From on January 24, 2013 18:00:26
Thanks for your help, Simon!

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