On Mon, Apr 26, 2010 at 08:56:36PM +0200, Matthias Guedemann wrote:
> > But this shouldn't be necessary. lang/ghc BUILD_DEPENDS on
> > devel/haddock,no_deps:patch, which means that it gets the haddock
> > sources from devel/haddock including the patch that port has, which
> > in turn disables the dependency on ghc-paths (if built internally
> > within the ghc tree).
>
> the ghc-paths dependency for the haddock *executable* is disabled if in
> ghc-tree, but there is also a dependency for the library. If I am not mistaken
> this in *not* there after extraction of the ghc tar.gz, only after patching
> ghc-6.12.2 / moving devel/haddock there.
>
> What I did to make it compile was simply to remove the deps after the patches
> where applied.
Well, and this is where something's going wrong (and I really don't
understand why). The diff you sent for haddock.cabal (within
WRKSRCDIR, i.e. the extracted ghc directory) had two hunks. The first
hunk removed ghc-paths from the haddock program:
@@ -81,8 +81,6 @@
if flag(in-ghc-tree)
cpp-options: -DIN_GHC_TREE
extensions: ForeignFunctionInterface
- else
- build-depends: ghc-paths
if flag(test)
cpp-options: -DTEST
That shouldn't be necessary, as the `in-ghc-tree' flag is set when
haddock is configured internally within the ghc build.
The second hunk of your diff did address the library part of haddock:
@@ -132,8 +130,7 @@
containers,
array,
Cabal >= 1.5,
- ghc >= 6.12 && < 6.14,
- ghc-paths
+ ghc >= 6.12 && < 6.14
That's of course (mostly) correct, but now look at
/usr/ports/devel/haddock/patches/patch-haddock_cabal.[1] It already
contains a diff similuar to that hunk (with the only difference
that it doesn't remove the dependency on ghc-paths unconditionally
but only if `in-ghc-tree' isn't set). For reference here's the
haddock.cabal hunk that *should* be in your WRKSRC after running
`make extract' in /usr/ports/lang/ghc:
@@ -132,8 +132,10 @@ library
containers,
array,
Cabal >= 1.5,
- ghc >= 6.12 && < 6.14,
- ghc-paths
+ ghc >= 6.12 && < 6.14
+
+ if !flag(in-ghc-tree)
+ build-depends: ghc-paths
if flag(test)
cpp-options: -DTEST
But it isn't, and I really don't understand the reason.
> > cd /usr/ports/lang/ghc
> > make clean
> > make extract > extract.log 2>&1
> >
> > and then send me the extract.log?
>
> find it attached
Perfectly normal beast. Almost identically to what I get here. Now
I'm even more confused. After `make extract',
/usr/obj/pobj/ghc-6.12.2/ghc-6.12.2/utils/haddock/haddock.cabal
should read like this:
executable haddock
...
if flag(in-ghc-tree)
cpp-options: -DIN_GHC_TREE
extensions: ForeignFunctionInterface
else
build-depends: ghc-paths
...
library
...
if !flag(in-ghc-tree)
build-depends: ghc-paths
...
> btw. I also had segfaults, but deleted the core dump before I read your
> thread. As I'm building on an Atom netbook where the build takes ages, I hope
> you find enough other people who can send you the backtracks
Yep, I got some reports already (and wait for a report from some
kind tester who even got repeated segfaults on amd64). Building
this thing on small and slow boxes is no fun at all -- I know, since
I built the i386 bootstrapping bindist on a crap box with less than
300 MHz and only 128 MB of RAM ;-)
Ciao,
Kili
[1] You have that patch, don't you? If not, you owe me about 15
bottles of gulden draak.