Compiling haskell doesn't load modules

Help
2012-02-17
2012-12-06
  • Doug Ransom

    Doug Ransom - 2012-02-17

    You will see the error in the 3d line of the BuildWrapper output - basically it can't load hunit.  It should appear in bold.
     
    I will point out I build buildwrapper and scion-browser from the command line with cabal, as letting eclipsefp to build them on startup always fails.  I am on OS X Lion with the most recently released eclipsefp.

    Also possibly related as sometimes an error pops up "Error rebuilding local database. Check the console log for more details".

    build-wrapper-json:[[["/Library/Frameworks/GHC.framework/Versions/7.0.4-i386/usr/lib/ghc-7.0.4/package.conf.d",[{"e":true,"m":,"d":,"v":"0.5.3.1","n":"zlib"},{"e":true,"m":,"d":,"v":"3000.2.0.4","n":"xhtml"},{"e":true,"m":,"d":,"v":"2.4.2.0","n":"unix"},{"e":true,"m":,"d":,"v":"0.2.2.0","n":"transformers"},{"e":true,"m":,"d":,"v":"1.2.0.3","n":"time"},{"e":true,"m":,"d":,"v":"0.11.1.5","n":"text"},{"e":true,"m":,"d":,"v":"2.5.0.0","n":"template-haskell"},{"e":true,"m":,"d":,"v":"0.3.3","n":"syb"},{"e":true,"m":,"d":,"v":"2.2.0.1","n":"stm"},{"e":true,"m":,"d":,"v":"1.0","n":"rts"},{"e":true,"m":,"d":,"v":"0.95.1","n":"regex-posix"},{"e":true,"m":,"d":,"v":"0.95.1","n":"regex-compat"},{"e":true,"m":,"d":,"v":"0.93.2","n":"regex-base"},{"e":true,"m":,"d":,"v":"1.0.0.3","n":"random"},{"e":true,"m":,"d":,"v":"1.0.1.5","n":"process"},{"e":true,"m":,"d":,"v":"1.0.1.2","n":"pretty"},{"e":true,"m":,"d":,"v":"3.1.1","n":"parsec"},{"e":true,"m":,"d":,"v":"3.1.0.1","n":"parallel"},{"e":true,"m":,"d":,"v":"1.0.0.6","n":"old-time"},{"e":true,"m":,"d":,"v":"1.0.0.2","n":"old-locale"},{"e":true,"m":,"d":,"v":"2.3.0.5","n":"network"},{"e":true,"m":,"d":,"v":"2.0.1.0","n":"mtl"},{"e":true,"m":,"d":,"v":"0.2.0.3","n":"integer-gmp"},{"e":true,"m":,"d":,"v":"1.0.1.2","n":"html"},{"e":true,"m":,"d":,"v":"0.5.0.6","n":"hpc"},{"e":true,"m":,"d":,"v":"1.1.0.1","n":"haskell98"},{"e":false,"m":,"d":,"v":"1.0.0.0","n":"haskell2010"},{"e":true,"m":,"d":,"v":"1.0.1.4","n":"haskell-src"},{"e":true,"m":,"d":,"v":"2011.3.0.0","n":"haskell-platform"},{"e":true,"m":,"d":,"v":"0.2.0.0","n":"ghc-prim"},{"e":false,"m":,"d":,"v":"0.5.0.2","n":"ghc-binary"},{"e":false,"m":,"d":,"v":"7.0.4","n":"ghc"},{"e":true,"m":,"d":,"v":"1.2.0.0","n":"filepath"},{"e":true,"m":,"d":,"v":"5.4.2.4","n":"fgl"},{"e":true,"m":,"d":,"v":"1.0","n":"ffi"},{"e":true,"m":,"d":,"v":"0.1.1.2","n":"extensible-exceptions"},{"e":true,"m":,"d":,"v":"1.1.0.0","n":"directory"},{"e":true,"m":,"d":,"v":"1.1.0.2","n":"deepseq"},{"e":true,"m":,"d":,"v":"0.4.0.0","n":"containers"},{"e":true,"m":,"d":,"v":"3001.1.7.4","n":"cgi"},{"e":true,"m":,"d":,"v":"0.9.1.10","n":"bytestring"},{"e":true,"m":,"d":,"v":"0.0.0.0","n":"bin-package-db"},{"e":true,"m":,"d":,"v":"4.3.1.0","n":"base"},{"e":true,"m":,"d":,"v":"0.3.0.2","n":"array"},{"e":true,"m":,"d":,"v":"2.4.1.1","n":"QuickCheck"},{"e":true,"m":,"d":,"v":"2.2.3.0","n":"OpenGL"},{"e":true,"m":,"d":,"v":"1.2.4.2","n":"HUnit"},{"e":true,"m":,"d":,"v":"4000.1.2","n":"HTTP"},{"e":true,"m":,"d":,"v":"2.1.2.1","n":"GLUT"},{"e":true,"m":,"d":,"v":"1.10.2.0","n":"Cabal"}]],["/Users/doug/.ghc/i386-darwin-7.0.4/package.conf.d",[{"e":true,"m":,"d":,"v":"0.5.3.3","n":"zlib"},{"e":true,"m":,"d":,"v":"0.1.1.7","n":"zip-archive"},{"e":true,"m":,"d":,"v":"1.3.12","n":"xml"},{"e":true,"m":,"d":,"v":"1.0.0.0","n":"wl-pprint-text"},{"e":true,"m":,"d":,"v":"0.4.6.3","n":"warp"},{"e":true,"m":,"d":,"v":"0.4.3","n":"wai"},{"e":true,"m":,"d":,"v":"0.9.1","n":"vector"},{"e":true,"m":,"d":,"v":"0.3.7","n":"utf8-string"},{"e":true,"m":,"d":,"v":"0.1.4.6","n":"unordered-containers"},{"e":true,"m":,"d":,"v":"0.3.0.1","n":"unix-compat"},{"e":true,"m":,"d":,"v":"1.6.5","n":"uniplate"},{"e":true,"m":,"d":,"v":"0.4.1","n":"transformers-base"},{"e":true,"m":,"d":,"v":"0.5.0.4","n":"texmath"},{"e":true,"m":,"d":,"v":"0.2.12","n":"test-framework-quickcheck2"},{"e":true,"m":,"d":,"v":"0.2.7","n":"test-framework-hunit"},{"e":true,"m":,"d":,"v":"0.5","n":"test-framework"},{"e":true,"m":,"d":,"v":"0.3.2.3","n":"terminfo"},{"e":true,"m":,"d":,"v":"0.3.2.0","n":"tar"},{"e":true,"m":,"d":,"v":"0.12.6","n":"tagsoup"},{"e":true,"m":,"d":,"v":"0.2.0","n":"simple-sendfile"},{"e":true,"m":,"d":,"v":"0.2.6","n":"scion-browser"},{"e":true,"m":,"d":,"v":"0.3.3","n":"safe"},{"e":true,"m":,"d":,"v":"0.2.1.0","n":"resource-pool"},{"e":true,"m":,"d":,"v":"1.1.8","n":"regex-tdfa"},{"e":true,"m":,"d":,"v":"0.4.1","n":"primitive"},{"e":true,"m":,"d":,"v":"0.0.0.1","n":"pool-conduit"},{"e":true,"m":,"d":,"v":"1.7","n":"polyparse"},{"e":true,"m":,"d":,"v":"0.7.0","n":"persistent-template"},{"e":true,"m":,"d":,"v":"0.7.0","n":"persistent-sqlite"},{"e":true,"m":,"d":,"v":"0.7.0.1","n":"persistent"},{"e":true,"m":,"d":,"v":"0.1.0","n":"path-pieces"},{"e":true,"m":,"d":,"v":"0.3.2","n":"parallel-io"},{"e":true,"m":,"d":,"v":"1.8.2","n":"pandoc-types"},{"e":true,"m":,"d":,"v":"1.8.2.1","n":"pandoc"},{"e":true,"m":,"d":,"v":"0.2.1","n":"multiset"},{"e":true,"m":,"d":,"v":"0.3.1","n":"monad-control"},{"e":true,"m":,"d":,"v":"0.1.0.3","n":"lifted-base"},{"e":true,"m":,"d":,"v":"0.4.4","n":"json"},{"e":true,"m":,"d":,"v":"0.6.8","n":"http-types"},{"e":true,"m":,"d":,"v":"1.19","n":"hscolour"},{"e":true,"m":,"d":,"v":"4.12","n":"hs-bibutils"},{"e":true,"m":,"d":,"v":"1.0","n":"hostname"},{"e":true,"m":,"d":,"v":"4.2.8","n":"hoogle"},{"e":true,"m":,"d":,"v":"1.8.22","n":"hlint"},{"e":true,"m":,"d":,"v":"1.11.1","n":"haskell-src-exts"},{"e":true,"m":,"d":,"v":"0.6.4.6","n":"haskeline"},{"e":true,"m":,"d":,"v":"1.1.2.2","n":"hashable"},{"e":true,"m":,"d":,"v":"2999.12.0.4","n":"graphviz"},{"e":true,"m":,"d":,"v":"0.2.1.0","n":"ghc-syb-utils"},{"e":true,"m":,"d":,"v":"0.1.0.8","n":"ghc-paths"},{"e":true,"m":,"d":,"v":"0.4.18","n":"enumerator"},{"e":true,"m":,"d":,"v":"0.5","n":"dlist"},{"e":true,"m":,"d":,"v":"0.0.1.0","n":"digest"},{"e":true,"m":,"d":,"v":"2.5.5","n":"derive"},{"e":true,"m":,"d":,"v":"1.13.2","n":"cpphs"},{"e":true,"m":,"d":,"v":"0.1.1.1","n":"conduit"},{"e":true,"m":,"d":,"v":"2.3.3","n":"colour"},{"e":true,"m":,"d":,"v":"0.9.2","n":"cmdargs"},{"e":true,"m":,"d":,"v":"0.3.4","n":"citeproc-hs"},{"e":true,"m":,"d":,"v":"0.4.0.1","n":"case-insensitive"},{"e":true,"m":,"d":,"v":"0.4.1","n":"buildwrapper"},{"e":true,"m":,"d":,"v":"0.4.3.1","n":"blaze-html"},{"e":true,"m":,"d":,"v":"0.2.0.3","n":"blaze-builder-enumerator"},{"e":true,"m":,"d":,"v":"0.3.1.0","n":"blaze-builder"},{"e":true,"m":,"d":,"v":"0.3.1","n":"bktrees"},{"e":true,"m":,"d":,"v":"0.5.1.0","n":"binary"},{"e":true,"m":,"d":,"v":"0.1.1.0","n":"base64-bytestring"},{"e":true,"m":,"d":,"v":"0.2.2.3","n":"base-unicode-symbols"},{"e":true,"m":,"d":,"v":"0.10.1.0","n":"attoparsec"},{"e":true,"m":,"d":,"v":"0.6.4","n":"ansi-wl-pprint"},{"e":true,"m":,"d":,"v":"0.5.5","n":"ansi-terminal"},{"e":true,"m":,"d":,"v":"0.6.0.0","n":"aeson"},{"e":true,"m":,"d":,"v":"1.2.4.2","n":"HUnit"},{"e":true,"m":,"d":,"v":"0.12.0.0","n":"Graphalyze"}]]],]
    build-wrapper-json:[false,[{"s":"Error","t":"Could not find module `Test.HUnit.Base':\n  It is a member of the hidden package `HUnit-1.2.4.2'.\n  Perhaps you need to add `HUnit' to the build-depends in your .cabal file.\n  Use -v to see a list of the files searched for.","l":{"c":8,"l":22,"f":"src/Main.hs"}}]]

     
  • Doug Ransom

    Doug Ransom - 2012-02-17

    I should also note the program compiles fine from the command line, just not in eclipsefp.

     
  • JP Moresmau

    JP Moresmau - 2012-02-17

    Well, what Cabal stanza is the haskell file you're opening part of? If it's part of a test-suite stanza, and you don't specify -enable-tests on cabal configure on the command line, cabal will not try to build it. Whereas EclipseFP build everything, including test suites.

     
  • Doug Ransom

    Doug Ransom - 2012-02-19

    The haskell file I am opening and attempting to compile is one I wrote -  a few hundred lines.  It won't build in EclipseFP which is why I have to build on the command line.

    When ecilpseFP starts and tries to build buldrwapper and scion-browser it never completes - always some sort of errors.

     
  • JP Moresmau

    JP Moresmau - 2012-02-20

    Well can you send your project to me so I can try it? (jp _at_ moresmau.fr)

     
  • JP Moresmau

    JP Moresmau - 2012-02-26

    After receiving dougransom's project: the build-depends section in the cabal file does not reference HUnit, while Main.hs uses packages from it. It may work fine in ghci that loads all packages by default, but it doesn't compile in Cabal via the command-line nor in buildwrapper. Normal behavior!

     
  • Anonymous - 2012-02-26

    This is a common mistake, one that I made, too.  It would be very helpful if you wrote in EclipseFP's introduction tutorial that all external package dependencies need to be stated explicitly in the projects .cabal file like this:

      build-depends:  
                       haskell2010,
                       containers,
                       hmatrix,
                       bytestring,
                       bytestring-lexing,
                       directory

     
  • JP Moresmau

    JP Moresmau - 2012-03-09

    the documentation already states that EclipseFP relies on cabal for building. I've made it even more explicit that you need to put required packages in the build-depends field.

     

Log in to post a comment.