jgm/gitit

Installation Problems

adamdaugherty opened this issue · 5 comments

Hello, I'm running macOS Catalina 10.15.2 and having some difficulty getting things up and running for the first time. If I use cabal install gitit, there seems to be some sort of issue with the dependencies:

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: gitit-0.13.0.0 (user goal)
[__1] trying: zlib-0.6.2.1 (dependency of gitit)
[__2] trying: parsec-3.1.14.0/installed-3.1.14.0 (dependency of gitit)
[__3] next goal: pandoc-types (dependency of gitit)
[__3] rejecting: pandoc-types-1.21 (conflict: gitit => pandoc-types>=1.20 &&
<1.21)
[__3] trying: pandoc-types-1.20
[__4] trying: transformers-0.5.6.2/installed-0.5.6.2 (dependency of
pandoc-types)
[__5] trying: pandoc-2.9.2.1 (dependency of gitit)
[__6] next goal: haddock-library (dependency of pandoc)
[__6] rejecting: haddock-library-1.9.0 (conflict: pandoc =>
haddock-library>=1.8 && <1.9)
[__6] rejecting: haddock-library-1.8.0 (conflict: parsec =>
base==4.14.0.0/installed-4.14.0.0, haddock-library => base>=4.7 && <4.14)
[__6] rejecting: haddock-library-1.7.0 (conflict: pandoc =>
haddock-library>=1.8 && <1.9)
[__6] skipping: haddock-library-1.6.0, haddock-library-1.5.0.1,
haddock-library-1.4.5, haddock-library-1.4.4, haddock-library-1.4.3,
haddock-library-1.4.2, haddock-library-1.4.1, haddock-library-1.2.1,
haddock-library-1.2.0, haddock-library-1.1.1, haddock-library-1.1.0,
haddock-library-1.0.1, haddock-library-1.0.0, haddock-library-1.6.1 (has the
same characteristics that caused the previous version to fail: excluded by
constraint '>=1.8 && <1.9' from 'pandoc')
[__6] fail (backjumping, conflict set: haddock-library, pandoc, parsec)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, pandoc, pandoc-types, gitit,
yaml, haddock-library, transformers, parsec, zlib
Try running with --minimize-conflict-set to improve the error message.

If I clone the repository and do a cabal install from there, I am greeted with similar output. Just for kicks, I also tried a few of the different tagged versions of the repo before doing cabal install, but it didn't seem to make a difference.

If I use a clone of the repository and use stack install, the installation succeeds and gitit is usable. However, if I remove the clone of the gitit repository that I installed from, whenever I attempt to run gitit, the following occurs:

<a temp dir>/gitit/.stack-work/install/x86_64-osx/4cbdf4f6165ae4a72bc802c4dc7d03d91d8ae9f4f34b0be4d9681c06c015a335/8.8.3/share/x86_64-osx-ghc-8.8.3/gitit-0.13.0.0/data/default.conf: openFile: does not exist (No such file or directory)

To get around this, I tried copying default.conf into my repository and running gitit with -f to use the configuration in my repo, but it still wants to pull in default.conf from the location I installed from and fails in the same way.

I saw an old issue (#622) that seemed similar, and the recommended remedy (installing via cabal install) seemed like a promising way of getting around it. Unfortunately, that won't work in my case, due to the aforementioned conflicts when using cabal install.

I guess I have two questions:

  • I would think that once gitit was installed, I would no longer need to keep the stuff that was used to build it. Is there any way around this limitation?
  • If it would resolve the issue as indicated in #622, is there something I can do to make cabal install work?
jgm commented

What versions of cabal and ghc are you using?
I can cabal install gitit on Catalina just fine (ghc 8.8.3, cabal-install 3.2).

jgm commented

As for the data files, stack's handling of these is not very good. cabal install used to install these into a share directory. We should add an embed_data_files flag as we have in pandoc.

Hey, thanks for getting back to me.

I'm running:

cabal-install version 3.2.0.0
compiled using version 3.2.0.0 of the Cabal library

The Glorious Glasgow Haskell Compilation System, version 8.10.1

I installed these specifically for gitit, and these were the versions that Homebrew happened to give me.

jgm commented

The last release of pandoc won't build with ghc 8.10; that is probably the underlying issue.
We should have a new release soon. But for now you could try with stack, or use an older ghc.

Uninstalling ghc and installing ghc@8.8 allowed me to successfully cabal install gitit, which now happily runs without looking for any installation byproducts.

@jgm, thanks a bunch for your help!