khajavi / pandoc

Automatically exported from code.google.com/p/pandoc
GNU General Public License v2.0
0 stars 0 forks source link

current git version depends on two versions of the same library #236

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Clone the current git repository.
2. Try to compile it:

$ runghc Setup.hs configure --user --prefix=$HOME
Configuring pandoc-1.5.1.1...
Warning: This package indirectly depends on multiple versions of the same
package. This is highly likely to cause a compile failure.
package texmath-0.2.0.3 requires parsec-2.1.0.1
package network-2.2.1.7 requires parsec-2.1.0.1
package json-0.4.3 requires parsec-2.1.0.1
package cgi-3001.1.8.1 requires parsec-2.1.0.1
package HTTP-4000.0.9 requires parsec-2.1.0.1
package pandoc-1.5.1.1 requires parsec-3.0.1

What is the expected output? What do you see instead?

It should compile, but it doesn't. Maybe I'm doing something wrong? This is
the first Haskell program I try compiling. I had installed just the
parsec-2.1.0.1, then I installed the version 3.1.0 and tried using 'build'.
It all works fine until:

$ runghc Setup.hs build
Preprocessing library pandoc-1.5.1.1...
Preprocessing executables for pandoc-1.5.1.1...
Building pandoc-1.5.1.1...
[ 1 of 27] Compiling Text.Pandoc.XML  ( src/Text/Pandoc/XML.hs,
dist/build/Text/Pandoc/XML.o )
[ 2 of 27] Compiling Text.Pandoc.CharacterReferences (
src/Text/Pandoc/CharacterReferences.hs,
dist/build/Text/Pandoc/CharacterReferences.o )
[ 3 of 27] Compiling Text.Pandoc.Blocks ( src/Text/Pandoc/Blocks.hs,
dist/build/Text/Pandoc/Blocks.o )
[ 4 of 27] Compiling Paths_pandoc     ( dist/build/autogen/Paths_pandoc.hs,
dist/build/Paths_pandoc.o )
[ 5 of 27] Compiling Text.Pandoc.ODT  ( src/Text/Pandoc/ODT.hs,
dist/build/Text/Pandoc/ODT.o )
[ 6 of 27] Compiling Text.Pandoc.Definition (
src/Text/Pandoc/Definition.hs, dist/build/Text/Pandoc/Definition.o )
[ 7 of 27] Compiling Text.Pandoc.Shared ( src/Text/Pandoc/Shared.hs,
dist/build/Text/Pandoc/Shared.o )
[ 8 of 27] Compiling Text.Pandoc.Templates ( src/Text/Pandoc/Templates.hs,
dist/build/Text/Pandoc/Templates.o )
[ 9 of 27] Compiling Text.Pandoc.Readers.RST (
src/Text/Pandoc/Readers/RST.hs, dist/build/Text/Pandoc/Readers/RST.o )
[10 of 27] Compiling Text.Pandoc.Readers.LaTeX (
src/Text/Pandoc/Readers/LaTeX.hs, dist/build/Text/Pandoc/Readers/LaTeX.o )
[11 of 27] Compiling Text.Pandoc.Readers.HTML (
src/Text/Pandoc/Readers/HTML.hs, dist/build/Text/Pandoc/Readers/HTML.o )
[12 of 27] Compiling Text.Pandoc.Readers.Markdown (
src/Text/Pandoc/Readers/Markdown.hs,
dist/build/Text/Pandoc/Readers/Markdown.o )
[13 of 27] Compiling Text.Pandoc.Writers.Markdown (
src/Text/Pandoc/Writers/Markdown.hs,
dist/build/Text/Pandoc/Writers/Markdown.o )
[14 of 27] Compiling Text.Pandoc.Writers.RST (
src/Text/Pandoc/Writers/RST.hs, dist/build/Text/Pandoc/Writers/RST.o )
[15 of 27] Compiling Text.Pandoc.Writers.LaTeX (
src/Text/Pandoc/Writers/LaTeX.hs, dist/build/Text/Pandoc/Writers/LaTeX.o )
[16 of 27] Compiling Text.Pandoc.Writers.ConTeXt (
src/Text/Pandoc/Writers/ConTeXt.hs, dist/build/Text/Pandoc/Writers/ConTeXt.o )
[17 of 27] Compiling Text.Pandoc.Writers.MediaWiki (
src/Text/Pandoc/Writers/MediaWiki.hs,
dist/build/Text/Pandoc/Writers/MediaWiki.o )
[18 of 27] Compiling Text.Pandoc.Highlighting (
src/Text/Pandoc/Highlighting.hs, dist/build/Text/Pandoc/Highlighting.o )
[19 of 27] Compiling Text.Pandoc.Readers.TeXMath (
src/Text/Pandoc/Readers/TeXMath.hs, dist/build/Text/Pandoc/Readers/TeXMath.o )

src/Text/Pandoc/Readers/TeXMath.hs:50:30:
    Couldn't match expected type `Text.Parsec.Prim.Parsec s () a'
           against inferred type
`parsec-2.1.0.1:Text.ParserCombinators.Parsec.Prim.GenParser
                                    Char st [Exp]'
    In the first argument of `parse', namely `formula'
    In the expression: parse formula "formula" inp
    In the expression:
        case parse formula "formula" inp of {
          Left _ -> Just [Str inp]
          Right exps -> expsToInlines exps }

What version of the product are you using? On what operating system?

It is all current, as far as I know:

$ runghc --version
runghc 6.12.1

Original issue reported on code.google.com by bike...@gmail.com on 5 May 2010 at 9:50

GoogleCodeExporter commented 9 years ago
oops, I forgot:

$ uname -a
Linux mnesala 2.6.30-2-686 #1 SMP Fri Dec 4 00:53:20 UTC 2009 i686 GNU/Linux

thanks in advance!

Original comment by bike...@gmail.com on 5 May 2010 at 9:52

GoogleCodeExporter commented 9 years ago
Try:

runghc Setup.hs configure --user --prefix=$HOME --constraint 'parsec < 3'

Or, just "cabal install".  The cabal tool has an automatic 'parsec < 3' 
constraint.
Let me know if this helps.

Original comment by fiddloso...@gmail.com on 5 May 2010 at 10:30

GoogleCodeExporter commented 9 years ago
Yep, it compiled without any errors now! Thanks again!

Original comment by bike...@gmail.com on 6 May 2010 at 12:42

GoogleCodeExporter commented 9 years ago

Original comment by fiddloso...@gmail.com on 6 May 2010 at 1:55