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

Fail to install on OSX Sierra #24

Open
adamist521 opened this issue Apr 27, 2017 · 16 comments
Open

Fail to install on OSX Sierra #24

adamist521 opened this issue Apr 27, 2017 · 16 comments

Comments

@adamist521
Copy link

adamist521 commented Apr 27, 2017

Failed to install erd with cabal.

$ cabal install erd
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: erd-0.1.3.0 (user goal)
next goal: base (dependency of erd-0.1.3.0)
rejecting: base-4.9.1.0/installed-4.9... (conflict: erd => base==4.7.*)
rejecting: base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0,
base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1,
base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0,
base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0,
base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from
non-upgradeable package requires installed instance)
Dependency tree exhaustively searched.
$

FYI, my environment is follows.

sw_vers
ProductName:	Mac OS X
ProductVersion:	10.12.4
BuildVersion:	16E195
@adamist521
Copy link
Author

Was able to install by code below.

$ git clone git://github.com/BurntSushi/erd
$ cd erd
$ stack init
$ stack build --system-ghc

@qizwiz
Copy link

qizwiz commented May 12, 2017

Thanks for this!
While I think your method is preferable, I was also able to get it to install by changing the base from 4.7 to 4.9 in the cabal file.

@chreble
Copy link

chreble commented Jul 12, 2017

Better use

cabal install --allow-newer erd

@carld
Copy link

carld commented Sep 4, 2017

Haskell newbie here, started out with brew cask install haskell-platform

% cabal install --allow-newer erd
Resolving dependencies...
Configuring erd-0.1.3.0...
Building erd-0.1.3.0...
Failed to install erd-0.1.3.0
Build log ( /Users/carldouglas/.cabal/logs/ghc-8.2.1/erd-0.1.3.0-8kV5AS2coBX939FGaGyt2n.log ):
cabal: Entering directory '/var/folders/jy/_s_btrwn7c99qnyw7d0t7dtw0000gn/T/cabal-tmp-61706/erd-0.1.3.0'
Configuring erd-0.1.3.0...
Preprocessing executable 'erd' for erd-0.1.3.0..
Building executable 'erd' for erd-0.1.3.0..
<command line>: cannot satisfy -package-id parsec-3.1.11-DPgnR92AWEaFOaixmwipet: 
    parsec-3.1.11-DPgnR92AWEaFOaixmwipet is unusable due to shadowed dependencies:
      mtl-2.2.1-19EL8AGBsN3DnnOhrC9xY3 text-1.2.2.2-EGUst8sqNAZCw1xLPcmcMH
    (use -v for more information)
cabal: Leaving directory '/var/folders/jy/_s_btrwn7c99qnyw7d0t7dtw0000gn/T/cabal-tmp-61706/erd-0.1.3.0'
cabal: Error: some packages failed to install:
erd-0.1.3.0-8kV5AS2coBX939FGaGyt2n failed during the building phase. The
exception was:
ExitFailure 1

Any suggestions appreciated thanks!

@carld
Copy link

carld commented Sep 5, 2017

For posterity... I installed erd after running --force-reinstalls of parsec etc

combinatorist added a commit to combinatorist/erd that referenced this issue Sep 8, 2017
I spent 3 hours trying to install this package. As a first time haskell user, I tried everything with no clue what I was doing until I saw this comment: BurntSushi#24 (comment) by @chreble
@combinatorist
Copy link
Contributor

I spent 3 hours trying to install this package. As a first time haskell user, I tried everything with no clue what I was doing until I saw this comment: #24 (comment) by @chreble

Thanks @chreble!

I just made a PR (#27) to "fix" the documentation. I have no idea how this works, but would love to make it easier for first time users.

@kyr0
Copy link

kyr0 commented Mar 1, 2018

Yes, please add it to the docs; it's such an easy change... I was looking into it for a few minutes too.

@ghost
Copy link

ghost commented Mar 21, 2018

Still having problems, there seems to be an error with wl-pprinter-text:

➜  ~ cabal install --allow-newer erd
Resolving dependencies...
Configuring wl-pprint-text-1.1.1.0...
Building wl-pprint-text-1.1.1.0...
Failed to install wl-pprint-text-1.1.1.0
Build log ( /Users/benjamin/.cabal/logs/ghc-8.4.1/wl-pprint-text-1.1.1.0-7Rq3bROoVOxBg93W8s5ShZ.log ):
cabal: Entering directory '/var/folders/5t/6hpmgtb91t15s5b9k_zj35ch0000gn/T/cabal-tmp-57070/wl-pprint-text-1.1.1.0'
Configuring wl-pprint-text-1.1.1.0...
Preprocessing library for wl-pprint-text-1.1.1.0..
Building library for wl-pprint-text-1.1.1.0..
[1 of 2] Compiling Text.PrettyPrint.Leijen.Text ( Text/PrettyPrint/Leijen/Text.hs, dist/build/Text/PrettyPrint/Leijen/Text.o )

Text/PrettyPrint/Leijen/Text.hs:122:1: error:
    Could not find module ‘Prelude.Compat’
    There are files missing in the ‘base-compat-0.9.3’ package,
    try running 'ghc-pkg check'.
    Use -v to see a list of the files searched for.
    |
122 | import Prelude.Compat hiding ((<$>))
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory '/var/folders/5t/6hpmgtb91t15s5b9k_zj35ch0000gn/T/cabal-tmp-57070/wl-pprint-text-1.1.1.0'
cabal: Error: some packages failed to install:
erd-0.1.3.0-8kV5AS2coBX939FGaGyt2n depends on erd-0.1.3.0 which failed to
install.
graphviz-2999.19.0.0-JwaTXCIUDJJPYkg3249Wq depends on graphviz-2999.19.0.0
which failed to install.
wl-pprint-text-1.1.1.0-7Rq3bROoVOxBg93W8s5ShZ failed during the building
phase. The exception was:
ExitFailure 1

My system was clean, first time using an haskell software, not exactly newbie friendly. I ran brew install ghc cabal install and cabal install erd

@nwokeo
Copy link

nwokeo commented Mar 21, 2018

I had the same problem, seems to be due to this issue.

I was able to resolve by installing haskell-platform via cask: brew cask install haskell-platform then installing erd: cabal install --allow-newer erd

@ghost
Copy link

ghost commented Mar 22, 2018

I was able to resolve by installing haskell-platform via cask: brew cask install haskell-platform then installing erd: cabal install --allow-newer erd

That fixed it for me, thanks.

@rclayton-the-terrible
Copy link

rclayton-the-terrible commented May 9, 2018

I don't know how this is working for people. I've tried on OSX and Docker and keep getting the following output:

root@linuxkit-025000000001:/# cabal install --allow-newer erd
Resolving dependencies...
Downloading base-compat-0.10.1...
Downloading colour-2.3.4...
Configuring colour-2.3.4...
Downloading dlist-0.8.0.4...
Downloading fgl-5.6.0.0...
Configuring base-compat-0.10.1...
Configuring dlist-0.8.0.4...
Building colour-2.3.4...
Configuring fgl-5.6.0.0...
Building base-compat-0.10.1...
Building dlist-0.8.0.4...
Building fgl-5.6.0.0...
Installed dlist-0.8.0.4
Downloading mtl-2.2.2...
Configuring mtl-2.2.2...
Building mtl-2.2.2...
Installed base-compat-0.10.1
Downloading random-1.1...
Configuring random-1.1...
Building random-1.1...
Installed mtl-2.2.2
Downloading stm-2.4.5.0...
Configuring stm-2.4.5.0...
Installed colour-2.3.4
Downloading text-1.2.3.0...
Building stm-2.4.5.0...
Configuring text-1.2.3.0...
Building text-1.2.3.0...
Installed stm-2.4.5.0
Downloading transformers-compat-0.6.1.5...
Configuring transformers-compat-0.6.1.5...
Building transformers-compat-0.6.1.5...
Installed random-1.1
Installed fgl-5.6.0.0
Installed transformers-compat-0.6.1.5
Downloading exceptions-0.10.0...
Configuring exceptions-0.10.0...
Building exceptions-0.10.0...
Installed exceptions-0.10.0
Downloading temporary-1.3...
Configuring temporary-1.3...
Building temporary-1.3...
Installed temporary-1.3
Installed text-1.2.3.0
Downloading wl-pprint-text-1.2.0.0...
Downloading polyparse-1.12...
Downloading parsec-3.1.13.0...
Configuring polyparse-1.12...
Configuring wl-pprint-text-1.2.0.0...
Configuring parsec-3.1.13.0...
Building polyparse-1.12...
Building wl-pprint-text-1.2.0.0...
Building parsec-3.1.13.0...
Installed wl-pprint-text-1.2.0.0
Installed parsec-3.1.13.0
Installed polyparse-1.12
Downloading graphviz-2999.19.0.0...
Configuring graphviz-2999.19.0.0...
Building graphviz-2999.19.0.0...
Failed to install graphviz-2999.19.0.0
Build log ( /root/.cabal/logs/ghc-8.2.1/graphviz-2999.19.0.0-Hxa68Q9ziKb1pHI4Xvs5hL.log ):
cabal: Entering directory '/tmp/cabal-tmp-126/graphviz-2999.19.0.0'
Configuring graphviz-2999.19.0.0...
Preprocessing library for graphviz-2999.19.0.0..
Building library for graphviz-2999.19.0.0..
[ 1 of 31] Compiling Data.GraphViz.Attributes.ColorScheme ( Data/GraphViz/Attributes/ColorScheme.hs, dist/build/Data/GraphViz/Attributes/ColorScheme.o )
[ 2 of 31] Compiling Data.GraphViz.Exception ( Data/GraphViz/Exception.hs, dist/build/Data/GraphViz/Exception.o )
[ 3 of 31] Compiling Data.GraphViz.Internal.State ( Data/GraphViz/Internal/State.hs, dist/build/Data/GraphViz/Internal/State.o )
[ 4 of 31] Compiling Data.GraphViz.Internal.Util ( Data/GraphViz/Internal/Util.hs, dist/build/Data/GraphViz/Internal/Util.o )
[ 5 of 31] Compiling Data.GraphViz.Parsing ( Data/GraphViz/Parsing.hs, dist/build/Data/GraphViz/Parsing.o )
[ 6 of 31] Compiling Data.GraphViz.PreProcessing ( Data/GraphViz/PreProcessing.hs, dist/build/Data/GraphViz/PreProcessing.o )
[ 7 of 31] Compiling Data.GraphViz.Printing ( Data/GraphViz/Printing.hs, dist/build/Data/GraphViz/Printing.o )

Data/GraphViz/Printing.hs:232:16: error:
    • Variable not in scope: (<>) :: DotCode -> DotCode -> t2
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Prelude),
        ‘PP.<$>’ (imported from Text.PrettyPrint.Leijen.Text.Monadic),
        ‘*>’ (imported from Prelude)
    |
232 | wrap b a d = b <> d <> a
    |                ^^

Data/GraphViz/Printing.hs:232:21: error:
    • Variable not in scope: (<>) :: t2 -> DotCode -> DotCode
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Prelude),
        ‘PP.<$>’ (imported from Text.PrettyPrint.Leijen.Text.Monadic),
        ‘*>’ (imported from Prelude)
    |
232 | wrap b a d = b <> d <> a
    |                     ^^

Data/GraphViz/Printing.hs:235:26: error:
    • Variable not in scope: (<>) :: DotCode -> m2 Doc -> t1
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Prelude),
        ‘PP.<$>’ (imported from Text.PrettyPrint.Leijen.Text.Monadic),
        ‘*>’ (imported from Prelude)
    |
235 | commaDel a b = unqtDot a <> comma <> unqtDot b
    |                          ^^

Data/GraphViz/Printing.hs:235:35: error:
    • Variable not in scope: (<>) :: t1 -> DotCode -> DotCode
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Prelude),
        ‘PP.<$>’ (imported from Text.PrettyPrint.Leijen.Text.Monadic),
        ‘*>’ (imported from Prelude)
    |
235 | commaDel a b = unqtDot a <> comma <> unqtDot b
    |                                   ^^

Data/GraphViz/Printing.hs:238:25: error:
    • Variable not in scope: (<>) :: m0 Doc -> m1 Doc -> t0
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Prelude),
        ‘PP.<$>’ (imported from Text.PrettyPrint.Leijen.Text.Monadic),
        ‘*>’ (imported from Prelude)
    |
238 | printField f v = text f <> equals <> toDot v
    |                         ^^

Data/GraphViz/Printing.hs:238:35: error:
    • Variable not in scope: (<>) :: t0 -> DotCode -> DotCode
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Prelude),
        ‘PP.<$>’ (imported from Text.PrettyPrint.Leijen.Text.Monadic),
        ‘*>’ (imported from Prelude)
    |
238 | printField f v = text f <> equals <> toDot v
    |                                   ^^

Data/GraphViz/Printing.hs:295:37: error:
    • Variable not in scope: (<>) :: DotCode -> DotCode -> DotCode
    • Perhaps you meant one of these:
        ‘<$>’ (imported from Prelude),
        ‘PP.<$>’ (imported from Text.PrettyPrint.Leijen.Text.Monadic),
        ‘*>’ (imported from Prelude)
    |
295 |   unqtDot (BScheme n l) = unqtDot n <> unqtDot l
    |                                     ^^
cabal: Leaving directory '/tmp/cabal-tmp-126/graphviz-2999.19.0.0'
cabal: Error: some packages failed to install:
erd-0.1.3.0-8kV5AS2coBX939FGaGyt2n depends on erd-0.1.3.0 which failed to
install.
graphviz-2999.19.0.0-Hxa68Q9ziKb1pHI4Xvs5hL failed during the building phase.
The exception was:
ExitFailure 1

@qizwiz
Copy link

qizwiz commented May 9, 2018

@rclayton-the-terrible I just tried it myself and got your same errors. I noticed all the errors were the same and from the same package.

From that, I tried installing graphviz by itself.

$ cabal install graphviz

That worked. And then I was able to do:

$ cabal install --allow-newer erd

So give that a shot.

@rclayton-the-terrible
Copy link

@qizwiz hey that worked! Thank you so much.

I don't know a thing about Haskell or it's toolchain, but I noticed installing via cabal doesn't create an executable on the $PATH, so I've been running everything with cabal run erd -- ... . Is this the right approach? Or am I missing something?

@qizwiz
Copy link

qizwiz commented May 9, 2018

@rclayton-the-terrible
I have a mac. It looks like you have linux.

The relevant lines in my ~/.cabal/config file looks like this

-- === Built executables will be installed in:
--     ~/Library/Haskell/bin
--
-- You may wish to place this on your PATH by adding the following
-- line to your ~/.bash_profile:
--     export PATH="$HOME/Library/Haskell/bin:$PATH"

If this file exists, perhaps you'll find the same hint there for you (it'll almost certainly be different).
The documentation can be found here: 2.1. Configuration

@rclayton-the-terrible
Copy link

@qizwiz I tried both macOS and Linux (as a Docker container FROM haskell. Same outcome for both. The fix was to install Graphviz via cabal and not some other mechanism (like brew).

@qizwiz
Copy link

qizwiz commented May 10, 2018

@rclayton-the-terrible I was addressing the second part of your question. Seemed like you were having problems with the binpath for packages you installed with cabal

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

8 participants