Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 278659 - dev-vcs/darcs-2.2.1[doc] fails to build with dev-haskell/haddock-0.9
Summary: dev-vcs/darcs-2.2.1[doc] fails to build with dev-haskell/haddock-0.9
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Haskell Language team
URL: http://allmydata.org/trac/darcs-2/bro...
Whiteboard:
Keywords:
: 278658 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-07-22 09:37 UTC by Martin von Gagern
Modified: 2010-07-12 11:49 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin von Gagern 2009-07-22 09:37:17 UTC
A world update failed to update darcs when using the doc USE flag:


Running Haddock for darcs-2.2.1...
Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: rts-1.0

dist/build/tmp/src/Darcs/Repository/Prefs.hs:125:0:
     error: unterminated comment
 * 
 * ERROR: dev-util/darcs-2.2.1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2954:  Called cabal_src_compile
 *             environment, line  568:  Called cabal-haddock
 *             environment, line  508:  Called die
 * The specific snippet of code:
 *       ./setup haddock || die "setup haddock failed"
 *  The die message:
 *   setup haddock failed


The line in question from Prefs.hs reads thus:
124:-- used to filter the files provided to darcs add, to allow you to use a
125:-- simple \verb-darcs add newdir newdir/*-
126:-- without accidentally adding a bunch of

It seems to come from src/Darcs/Repository/Prefs.lhs line 126, which has a similar run of text. I assume that it's the /* which is taken for a start of comment and thus causes trouble.

According to http://www.haskell.org/haddock/doc/html/ch03s08.html#id289762 the / character in a Haddock comment must be escaped by a \, and the * may be escaped in this way. But even with those corrections in place, I get errors:

haddock: Warning: The interface file "/usr/share/doc/ghc-6.8.2/libraries/array/array.haddock" could not be read.
Maybe it's from a later version of Haddock?
haddock: Warning: The interface file "/usr/share/doc/ghc-6.8.2/libraries/base/base.haddock" could not be read.
Maybe it's from a later version of Haddock?
haddock: Warning: The interface file "/usr/share/doc/ghc-6.8.2/libraries/bytestring/bytestring.haddock" could not be read.
Maybe it's from a later version of Haddock?
haddock: Warning: The interface file "/usr/share/doc/ghc-6.8.2/libraries/containers/containers.haddock" could not be read.
Maybe it's from a later version of Haddock?
haddock: Warning: The interface file "/usr/share/doc/ghc-6.8.2/libraries/directory/directory.haddock" could not be read.
Maybe it's from a later version of Haddock?
haddock: Warning: The interface file "/usr/share/doc/ghc-6.8.2/libraries/filepath/filepath.haddock" could not be read.
Maybe it's from a later version of Haddock?
haddock: Warning: The interface file "/usr/share/doc/ghc-6.8.2/libraries/old-locale/old-locale.haddock" could not be read.
Maybe it's from a later version of Haddock?
haddock: Warning: The interface file "/usr/share/doc/ghc-6.8.2/libraries/old-time/old-time.haddock" could not be read.
Maybe it's from a later version of Haddock?
haddock: Warning: The interface file "/usr/share/doc/ghc-6.8.2/libraries/process/process.haddock" could not be read.
Maybe it's from a later version of Haddock?
haddock: Warning: The interface file "/usr/share/doc/ghc-6.8.2/libraries/random/random.haddock" could not be read.
Maybe it's from a later version of Haddock?
haddock: Warning: The interface file "/usr/share/doc/ghc-6.8.2/libraries/unix/unix.haddock" could not be read.
Maybe it's from a later version of Haddock?
dist/build/tmp/src/Darcs/Commands/AmendRecord.hs: 43:33: Parse error

So maybe darcs depends on a haddock version more recent than the dev-haskell/haddock-0.9 I have on my ~x86 system, let alone stable 0.8. ~dev-haskell/haddock-2.4.2 on the other hand is still package-masked for testing. So I'm not sure what the best solution would be.
Comment 1 Marijn Schouten (RETIRED) gentoo-dev 2009-07-22 10:09:23 UTC
*** Bug 278658 has been marked as a duplicate of this bug. ***
Comment 2 Lennart Kolmodin (RETIRED) gentoo-dev 2009-07-23 06:31:53 UTC
Right, we should try with a more recent version of haddock, something 2.4.x.
2.4.2 only works with ghc-6.10.x which also is masked for testing for the time being. 2.4.1 still works with 6.8.2, but isn't yet in portage.
I'll test and get back to you.
Comment 3 Lennart Kolmodin (RETIRED) gentoo-dev 2009-07-23 21:09:54 UTC
I've put haddock 2.4.1 into portage, it should be able to compile the docs for darcs.

Please report back about your progress, and we'll update the darcs ebuild accordingly.

These messages:
---
haddock: Warning: The interface file
"/usr/share/doc/ghc-6.8.2/libraries/array/array.haddock" could not be read.
Maybe it's from a later version of Haddock?
---
are likely because haddock-0.8 was used first, and then haddock got upgraded to 0.9.

Once we are finished with the transition to ghc 6.10.4 we will unmask haddock 2.4.2, which only works with the ghc 6.10.x branch.
Comment 4 Stéphane Bortzmeyer 2009-07-24 07:35:43 UTC
> I've put haddock 2.4.1 into portage, it should be able to compile the docs for
> darcs.

Yes. 'emerge --sync' this morning and then emerging haddock then darcs, worked. Thanks.
Comment 5 Lennart Kolmodin (RETIRED) gentoo-dev 2009-07-25 13:24:12 UTC
Excellent, I've updated the darcs ebuild accordingly.
Thanks for the report! You've been credited in the change log.
Closing the bug.
Comment 6 Juergen Rose 2010-03-05 13:35:18 UTC
Please reopen bug. I get the same error with haddock-2.4.2:

Warning: The documentation for the following packages are not installed. No
links will be generated to these packages: rts-1.0

src/Darcs/Repository/Prefs.lhs:125:0:  error: unterminated comment
 * ERROR: dev-util/darcs-2.2.1 failed:
 *   setup haddock failed
 * 
 * Call stack:
 *     ebuild.sh, line   54:  Called src_compile
 *   environment, line 3187:  Called cabal_src_compile
 *   environment, line  652:  Called cabal-haddock
 *   environment, line  587:  Called die
 * The specific snippet of code:
 *       ./setup haddock || die "setup haddock failed"
 * 
 * If you need support, post the output of 'emerge --info =dev-util/darcs-2.2.1',
 * the complete build log and the output of 'emerge -pqv =dev-util/darcs-2.2.1'.
 * The complete build log is located at '/var/tmp/portage/dev-util/darcs-2.2.1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-util/darcs-2.2.1/temp/environment'.
 * S: '/var/tmp/portage/dev-util/darcs-2.2.1/work/darcs-2.2.1'

>>> Failed to emerge dev-util/darcs-2.2.1, Log file:

>>>  '/var/tmp/portage/dev-util/darcs-2.2.1/temp/build.log'
root@moose:/root(53)# emerge -pvD haddock

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild   R   ] dev-haskell/haddock-2.4.2  USE="doc" 0 kB
Comment 7 Martin von Gagern 2010-03-05 20:58:24 UTC
(In reply to comment #6)
> Please reopen bug.

REOPENing
Comment 8 Ivan 2010-03-05 21:23:37 UTC
This is not the same error (comparing the error messages should tell you that).

This is darcs bug 1720: http://bugs.darcs.net/issue1720 and is due to changes in how Cabal 1.8 runs the order of CPP and Haddock.  It has been fixed in darcs 2.3.1; we should get that version into the tree from the overlay.
Comment 9 Sergei Trofimovich (RETIRED) gentoo-dev 2010-07-12 11:49:37 UTC
The tree how has darcs-2.4.4-r1 with working USE=doc.

I have removed doc useflag from darcs-2.2.1 (it is still latest available darcs for some arches).

Closing as FIXED.