Opened 2 years ago

Closed 2 years 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 Rev(s):
Wiki Page:

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.

Change History (6)

comment:1 Changed 2 years ago by mietek

  • Description modified (diff)

comment:2 Changed 2 years 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

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 2 years ago by mietek

carter, is this fixed by #8683?

comment:4 Changed 2 years ago by mietek

  • Resolution duplicate deleted
  • Status changed from closed to new

Still an issue in 7.8.3.

comment:5 Changed 2 years ago by mietek

  • Version changed from 7.8.2 to 7.8.3

comment:6 Changed 2 years 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, searching for "FOUND! The root cause is a bug in cabal.", and see in particular. I think that fix is released in Cabal version, but I'm not 100% sure since I can't find a changelog for that release.

Note: See TracTickets for help on using tickets.