[GHC] #9772: Building documentation alone is broken

#9772: Building documentation alone is broken -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: Type: bug | Status: new Priority: normal | Milestone: 7.10.1 Component: Build System | Version: 7.9 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Building Blocked By: | GHC failed Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- At the moment it seems that the only way to build documentation is to actually build all of GHC, which is nonsense. Methods of building documentation described in Building/Docs are broken: {{{ To build just the Haddock docs for a given library, do this: cd libraries/base make html stage=0 FAST=YES }}} That ends with errors. See `haddock_for_lib.log` attachement. {{{ To build a document on its own, for example the Users Guide, do this: cd docs/users_guide make html stage=0 FAST=YES substitute 'html' for 'pdf' or 'ps' to build other types of documentation. }}} That also ends with errors. See `users_guide.log` attachement. For above experiments I used the following lines in my `mk/build.mk` file: {{{ HADDOCK_DOCS = YES BUILD_DOCBOOK_HTML = YES BUILD_DOCBOOK_PS = NO BUILD_DOCBOOK_PDF = NO }}} Then I run `perl boot && ./configure`. I didn't run `make`, just the above instructions. My configure returns this: {{{ Configure completed successfully. Building GHC version : 7.9.20141105 Build platform : x86_64-unknown-linux Host platform : x86_64-unknown-linux Target platform : x86_64-unknown-linux Bootstrapping using : /home/killy/.ghc-sandbox/bin/ghc which is version : 7.8.3 Using gcc : /usr/bin/gcc which is version : 4.5.1 Building a cross compiler : NO cpp : /usr/bin/gcc cpp-flags : -E -undef -traditional ld : /usr/bin/ld Happy : /home/killy/.cabal/bin/happy (1.19.4) Alex : /home/killy/.cabal/bin/alex (3.1.3) Perl : /usr/bin/perl dblatex : /usr/bin/dblatex xsltproc : /usr/bin/xsltproc Using LLVM tools llc : /usr/bin/llc opt : /usr/bin/opt HsColour : /home/killy/.cabal/bin/HsColour Building DocBook HTML documentation : NO Building DocBook PS documentation : YES Building DocBook PDF documentation : YES }}} I'm setting the milestone to 7.10.1. It's annoying to have this feature of the build system broken and it would be great to have this fixed. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9772 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9772: Building documentation alone is broken -------------------------------------+------------------------------------- Reporter: jstolarek | Owner: Type: bug | Status: closed Priority: normal | Milestone: 7.12.1 Component: Build System | Version: 7.9 Resolution: invalid | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Building GHC | Unknown/Multiple failed | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => invalid Comment: Replying to [ticket:9772 jstolarek]:
At the moment it seems that the only way to build documentation is to actually build all of GHC, which is nonsense.
Not nonsense at all. * To build the user's guide, the tool `utils/mkUserGuidePart` is needed, which relies on the ghc library. * To build the haddock docs, haddock (!) is needed, which also relies on the ghc library. Moreover, haddock itself needs to build a module before a can generate documentation for it (I don't know the details). From `rules/haddock.mk`: {{{ # --no-tmp-comp-dir above is important: it saves a few minutes in a # validate. This flag lets Haddock use the pre-compiled object files # for the package rather than rebuilding the modules of the package in # a temporary directory. Haddock needs to build the package when it # uses the Template Haskell or Annotations extensions, for example. }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9772#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC