Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cabal haddock fails on cabal-1.20 tree #1790

Closed
cartazio opened this issue Apr 18, 2014 · 6 comments
Closed

cabal haddock fails on cabal-1.20 tree #1790

cartazio opened this issue Apr 18, 2014 · 6 comments

Comments

@cartazio
Copy link
Contributor

when i run cabal haddock on the ./cabal subtree of cabal 1.20,
it fails with

Running Haddock for Cabal-1.20.0.0...
Preprocessing library Cabal-1.20.0.0...

<no location info>:
    module ‘Cabal-1.20.0.0:Main’ is defined in multiple files: dist/build/tmp-52531/Distribution/Compat/CreatePipe.hs
                                                               dist/build/tmp-52531/Distribution/Compat/Environment.hs
                                                               dist/build/tmp-52531/Distribution/Compat/Exception.hs
                                                               dist/build/tmp-52531/Distribution/Compat/ReadP.hs
                                                               dist/build/tmp-52531/Distribution/Compiler.hs
                                                               dist/build/tmp-52531/Distribution/InstalledPackageInfo.hs
                                                               dist/build/tmp-52531/Distribution/License.hs
                                                               dist/build/tmp-52531/Distribution/Make.hs
                                                               dist/build/tmp-52531/Distribution/ModuleName.hs
                                                               dist/build/tmp-52531/Distribution/Package.hs
                                                               dist/build/tmp-52531/Distribution/PackageDescription.hs
                                                               dist/build/tmp-52531/Distribution/PackageDescription/Check.hs
                                                               dist/build/tmp-52531/Distribution/PackageDescription/Configuration.hs
                                                               dist/build/tmp-52531/Distribution/PackageDescription/Parse.hs
                                                               dist/build/tmp-52531/Distribution/PackageDescription/PrettyPrint.hs
                                                               dist/build/tmp-52531/Distribution/PackageDescription/Utils.hs
                                                               dist/build/tmp-52531/Distribution/ParseUtils.hs
                                                               dist/build/tmp-52531/Distribution/ReadE.hs
                                                               dist/build/tmp-52531/Distribution/Simple.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Bench.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Build.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Build/Macros.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Build/PathsModule.hs
                                                               dist/build/tmp-52531/Distribution/Simple/BuildPaths.hs
                                                               dist/build/tmp-52531/Distribution/Simple/BuildTarget.hs
                                                               dist/build/tmp-52531/Distribution/Simple/CCompiler.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Command.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Compiler.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Configure.hs
                                                               dist/build/tmp-52531/Distribution/Simple/GHC.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Haddock.hs
                                                               dist/build/tmp-52531/Distribution/Simple/HaskellSuite.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Hpc.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Hugs.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Install.hs
                                                               dist/build/tmp-52531/Distribution/Simple/InstallDirs.hs
                                                               dist/build/tmp-52531/Distribution/Simple/JHC.hs
                                                               dist/build/tmp-52531/Distribution/Simple/LHC.hs
                                                               dist/build/tmp-52531/Distribution/Simple/LocalBuildInfo.hs
                                                               dist/build/tmp-52531/Distribution/Simple/NHC.hs
                                                               dist/build/tmp-52531/Distribution/Simple/PackageIndex.hs
                                                               dist/build/tmp-52531/Distribution/Simple/PreProcess.hs
                                                               dist/build/tmp-52531/Distribution/Simple/PreProcess/Unlit.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/Ar.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/Builtin.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/Db.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/Find.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/GHC.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/HcPkg.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/Hpc.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/Ld.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/Run.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/Script.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/Strip.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Program/Types.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Register.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Setup.hs
                                                               dist/build/tmp-52531/Distribution/Simple/SrcDist.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Test.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Test/ExeV10.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Test/LibV09.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Test/Log.hs
                                                               dist/build/tmp-52531/Distribution/Simple/UHC.hs
                                                               dist/build/tmp-52531/Distribution/Simple/UserHooks.hs
                                                               dist/build/tmp-52531/Distribution/Simple/Utils.hs
                                                               dist/build/tmp-52531/Distribution/System.hs
                                                               dist/build/tmp-52531/Distribution/TestSuite.hs
                                                               dist/build/tmp-52531/Distribution/Text.hs
                                                               dist/build/tmp-52531/Distribution/Verbosity.hs
                                                               dist/build/tmp-52531/Distribution/Version.hs
                                                               dist/build/tmp-52531/Language/Haskell/Extension.hs
                                                               dist/build/tmp-52531/Distribution/Compat/CopyFile.hs
                                                               dist/build/tmp-52531/Distribution/Compat/TempFile.hs
                                                               dist/build/tmp-52531/Distribution/GetOpt.hs
                                                               dist/build/tmp-52531/Distribution/Simple/GHC/IPI641.hs
                                                               dist/build/tmp-52531/Distribution/Simple/GHC/IPI642.hs
                                                               dist/build/tmp-52531/dist/build/autogen/Paths_Cabal.hs

likewise
ghc-pkg check after i've done a cabal install gives me Warning: haddock-interfaces: /Users/carter/.cabal/share/doc/x86_64-osx-ghc-7.8.2/Cabal-1.20.0.0/html/Cabal.haddock doesn't exist or isn't a file

@tibbe suggested it might be a clang cpp issue, so I swapped over to using GCC instead and now it works!

This will impact normal mac users whose ghc defaults to using clang or the gcc aliasing to clang

@cartazio
Copy link
Contributor Author

(i only tested using gcc rather than clang, someone else should try eg CPPHS :) )

@23Skidoo
Copy link
Member

Can/should we do something about this in Cabal?

@tibbe
Copy link
Member

tibbe commented Apr 18, 2014

@23Skidoo I don't think we can. There was some talks about doing Haddock hacks, but I didn't see a plausible one.

Closing as a clang issue.

@tibbe tibbe closed this as completed Apr 18, 2014
@hvr
Copy link
Member

hvr commented Apr 22, 2014

Fyi, see also #1740 of which this is a duplicate IMO

@YoEight
Copy link

YoEight commented Jul 5, 2014

Hi, I'm hit by this issue too and using gcc 4.9 didn't solve it. I had to use --no-doc flag to make it works

@darthdeus
Copy link

I'm hitting the same issue right now on Yosemite with the binary build of GHC 7.8.3. What is the proposed solution to this? How should I setup my compiler to avaoid this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants