Opened 11 months ago

Closed 5 months ago

#9174 closed bug (invalid)

Haddock fails with "Module defined in multiple files"

Reported by: mietek Owned by:
Priority: normal Milestone:
Component: Compiler Version: 7.8.3
Keywords: Cc:
Operating System: MacOS X Architecture: x86_64 (amd64)
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description (last modified by mietek)

Haddock fails to cooperate with OS X clang CPP:

<no location info>:
    module ‘pkgid-pkgversion:Main’ is defined in multiple files: dist/build/tmp-#####/Stuff

A workaround is to pass --ghc-options=-optP-P to cabal haddock.

This prevents cabal-install from bootstrapping, unless --no-doc is specified.

The original Haddock ticket and the corresponding Cabal issue were both closed as invalid, but there appears to be no GHC ticket to track the underlying cause.
http://trac.haskell.org/haddock/ticket/284
https://github.com/haskell/cabal/issues/1740

Change History (6)

comment:1 Changed 11 months ago by mietek

  • Description modified (diff)

comment:2 Changed 11 months ago by carter

  • Resolution set to duplicate
  • Status changed from new to closed

i'm closing it as a duplicated, because a lot of the related issues are due to be resolved in https://ghc.haskell.org/trac/ghc/ticket/8683

its a known issue of using clang for cpp naively, things will break. dont use clang for cpp. This becomes easier in 7.8.3 which will be release soon (and i'm told with that patches in #8683 merged in)

comment:3 Changed 10 months ago by mietek

carter, is this fixed by #8683?

comment:4 Changed 10 months ago by mietek

  • Resolution duplicate deleted
  • Status changed from closed to new

Still an issue in 7.8.3.

comment:5 Changed 10 months ago by mietek

  • Version changed from 7.8.2 to 7.8.3

comment:6 Changed 5 months ago by thomie

  • Resolution set to invalid
  • Status changed from new to closed

It turns out this was a cabal bug in the end. Read the last few comments in https://github.com/haskell/cabal/issues/1740, searching for "FOUND! The root cause is a bug in cabal.", and see https://github.com/haskell/cabal/pull/2010 in particular. I think that fix is released in Cabal version 1.20.0.2, but I'm not 100% sure since I can't find a changelog for that release.

Note: See TracTickets for help on using tickets.