Building the add-ons in libraries/...

The CVS version of the libraries tree comes with all kinds of neat and dangerously unstable code I'd like to use, particularly the "arrows" subdirectory. Now I wonder: Is there some "build.mk" magic I could perform to tell GHC to build these libraries as part of my normal build? So that I get them (and the documentation) installed automatically when I rebuild GHC? Peter P. S.: And while I am at it ... the build currently fails with this error on my machine: ==fptools== make all -wr; in /usr/local/src/ghc-current/happy/doc ------------------------------------------------------------------------ rm -f -rf happy/ /usr/bin/xsltproc --stringparam base.dir happy/ \ --stringparam use.id.as.filename 1 \ --stringparam html.stylesheet fptools.css \ --stringparam toc.section.depth 3 --stringparam section.autolabel 1 \ --stringparam section.label.includes.component.label 1 \ /html/chunk.xsl happy.xml warning: failed to load external entity "/html/chunk.xsl" cannot parse /html/chunk.xsl make[2]: *** [happy/index.html] Error 4 make[1]: *** [all] Error 1 make[1]: Leaving directory `/usr/local/src/ghc-current/happy' make: *** [/usr/local/src/ghc-current/happy/src/happy-inplace] Error 2 make: *** Deleting file `/usr/local/src/ghc-current/happy/src/happy-inplace' Looks like there is a definition path missing somewhere.

Peter Simons wrote:
The CVS version of the libraries tree comes with all kinds of neat and dangerously unstable code I'd like to use, particularly the "arrows" subdirectory. Now I wonder: Is there some "build.mk" magic I could perform to tell GHC to build these libraries as part of my normal build? So that I get them (and the documentation) installed automatically when I rebuild GHC? [...]
No, there isn't, but modifying libraries/Makefile should be easy (see the SUBDIRS handling there). I'm not sure about the current status of the arrows package. Ross?
==fptools== make all -wr; in /usr/local/src/ghc-current/happy/doc ------------------------------------------------------------------------ rm -f -rf happy/ /usr/bin/xsltproc --stringparam base.dir happy/ \ --stringparam use.id.as.filename 1 \ --stringparam html.stylesheet fptools.css \ --stringparam toc.section.depth 3 --stringparam section.autolabel 1 \ --stringparam section.label.includes.component.label 1 \ /html/chunk.xsl happy.xml warning: failed to load external entity "/html/chunk.xsl" cannot parse /html/chunk.xsl make[2]: *** [happy/index.html] Error 4 make[1]: *** [all] Error 1 make[1]: Leaving directory `/usr/local/src/ghc-current/happy' make: *** [/usr/local/src/ghc-current/happy/src/happy-inplace] Error 2 make: *** Deleting file `/usr/local/src/ghc-current/happy/src/happy-inplace'
Looks like there is a definition path missing somewhere.
It looks like configure hasn't found a DocBook XSL directory on your machine. Could you provide us with a little bit more information, please (log of the configure run, config.log, platform, ...)? What's a little bit funny is that "make all" is trying to build documentation, this is normally not the case. What's in your build.mk? Cheers, S.

On Thu, Nov 04, 2004 at 08:08:03PM +0100, Sven Panne wrote:
Peter Simons wrote:
The CVS version of the libraries tree comes with all kinds of neat and dangerously unstable code I'd like to use, particularly the "arrows" subdirectory. Now I wonder: Is there some "build.mk" magic I could perform to tell GHC to build these libraries as part of my normal build? So that I get them (and the documentation) installed automatically when I rebuild GHC? [...]
No, there isn't, but modifying libraries/Makefile should be easy (see the SUBDIRS handling there). I'm not sure about the current status of the arrows package. Ross?
You'd want to change TOP in libraries/arrows/Makefile to .. as well, but that should be it. There's no plan to include the arrows package in distributions -- I should get it cabalized, since it's such a simple package.

Sven Panne writes:
/html/chunk.xsl happy.xml warning: failed to load external entity "/html/chunk.xsl"
It looks like configure hasn't found a DocBook XSL directory on your machine. Could you provide us with a little bit more information, please (log of the configure run, config.log, platform, ...)?
Linux x86, I configure my build with the script: | #! /bin/sh -- | | GHC="ghc-6.2.2" | SUBDIRS="alex ghc haddock happy hslibs libraries" | | for n in ${SUBDIRS} .; do | echo >$n/mk/build.mk "XMLDocWays := html" | done | | autoreconf -i | ./configure --prefix=/usr/local/ghc-current \ | --enable-src-tree-happy \ | --enable-src-tree-haddock \ | --enable-src-tree-alex \ | --with-ghc="${GHC}" \ | --with-hc="${GHC}" \ | --enable-hopengl \ | --disable-openal \ | ; and the "config.log" (266KB) file is available here: http://peti.cryp.to/config.log You'll see some strange flags I pass to the C compiler when using GHC. These are to disable SSP/PIE stack protection code. Just ignore them. :-) Hope this helps. Peter

And some more information on the issue. When I run the configure script, I see this error message on the screen (which probably won't make it into the config.log output): | checking for xmllint... /usr/bin/xmllint | checking for DocBook DTD... ok | checking for xsltproc... /usr/bin/xsltproc | checking for DocBook XSL stylesheet directory... | ./configure: line 4557: 22276 Segmentation fault | $XsltprocCmd ${fp_var}/html/docbook.xsl conftest.xml | >/dev/null 2>&1 | no | configure: WARNING: cannot find DocBook XSL stylesheets, | you will not be able to build the documentation The xsl stylesheets are installed at /usr/share/sgml/docbook/xsl-stylesheets-1.65.1/ on my machine, so configure _should_ find them. Peter

Peter Simons wrote:
And some more information on the issue. When I run the configure script, I see this error message on the screen (which probably won't make it into the config.log output):
| checking for xmllint... /usr/bin/xmllint | checking for DocBook DTD... ok | checking for xsltproc... /usr/bin/xsltproc | checking for DocBook XSL stylesheet directory... | ./configure: line 4557: 22276 Segmentation fault | $XsltprocCmd ${fp_var}/html/docbook.xsl conftest.xml | >/dev/null 2>&1 | no | configure: WARNING: cannot find DocBook XSL stylesheets, | you will not be able to build the documentation
The xsl stylesheets are installed at
/usr/share/sgml/docbook/xsl-stylesheets-1.65.1/
on my machine, so configure _should_ find them.
Hmmm, a segfault while running xsltproc looks like a problem with your setup (a Gentoo system). Are you able to run xsltproc with the HTML DocBook stylesheet on a simple document by hand? And the hardcore way of debugging would be sh -x ./configure <whatever you use> and make the output available. Cheers, S.

The problem turned out to a Gentoo bug. :-( It can be fixed by executing ACCEPT_KEYWORDS=~x86 emerge libxslt which upgrades to version 1.1.9-r1. With that, I can build GHC again. Sorry about the "misreport". Peter

Peter Simons wrote:
Linux x86, I configure my build with the script:
| #! /bin/sh -- | | GHC="ghc-6.2.2" | SUBDIRS="alex ghc haddock happy hslibs libraries" | | for n in ${SUBDIRS} .; do | echo >$n/mk/build.mk "XMLDocWays := html" | done | | autoreconf -i | ./configure --prefix=/usr/local/ghc-current \ | --enable-src-tree-happy \ | --enable-src-tree-haddock \ | --enable-src-tree-alex \ | --with-ghc="${GHC}" \ | --with-hc="${GHC}" \ | --enable-hopengl \ | --disable-openal \ | ; [...]
Just a small note here: Simply using make XMLDocWays=html should build everything recursively, including the HTML docs, without any need for a build.mk. Cheers, S.
participants (3)
-
Peter Simons
-
ross@soi.city.ac.uk
-
Sven Panne