Opened 3 years ago

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

Description: modified (diff)

comment:2 Changed 3 years ago by carter

Resolution: duplicate
Status: newclosed

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

carter, is this fixed by #8683?

comment:4 Changed 3 years ago by mietek

Resolution: duplicate
Status: closednew

Still an issue in 7.8.3.

comment:5 Changed 3 years ago by mietek


comment:6 Changed 3 years ago by thomie

Resolution: invalid
Status: newclosed

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.