GregorySchwartz/too-many-cells

stack install error on CentOS

rsolano1-uw opened this issue · 8 comments

Hello, I am trying to install too-many-cells on CentOS 6. I have ghc-8.4.4 and ghc-8.0.1 available on my system (I can change between the two easily) and the latest stack from their git repo.
This is what the install looks like with ghc-8.4.4:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.4.4
$ stack --version
Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2
$ stack install
No setup information found for ghc-8.4.3 on your platform.
This probably means a GHC bindist has not yet been added for OS key 'linux64-gmp4'.
Supported versions: ghc-7.8.4, ghc-7.10.2, ghc-7.10.3, ghc-8.0.1, ghc-8.0.2, ghc-8.2.1, ghc-8.2.2, ghc-8.4.2

and with ghc-8.0.1 (tried this one because it is listed in the 'Supported versions' line of the last error message):

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.0.1
$ stack --version
Version 2.1.3, Git revision 636e3a759d51127df2b62f90772def126cdf6d1f (7735 commits) x86_64 hpack-0.31.2
$ stack install
No setup information found for ghc-8.4.3 on your platform.
This probably means a GHC bindist has not yet been added for OS key 'linux64-gmp4'.
Supported versions: ghc-7.8.4, ghc-7.10.2, ghc-7.10.3, ghc-8.0.1, ghc-8.0.2, ghc-8.2.1, ghc-8.2.2, ghc-8.4.2

I'm not sure why the installation keeps referencing ghc-8.4.3. This version of GHC is not installed on my system and there shouldn't be any references to it anywhere.

Any assistance would be greatly appreciated. I understand that the Docker build is likely the easiest way around this issue, but using Docker is not a viable solution in my environment.

stack's GHC is isolated from the system's GHC, as stack is intended to be reproducible. Did you run stack setup anywhere outside of the git folder?

Thanks @GregorySchwartz. I did not do that because I just installed the stack binary manually on my system. Should I run stack setup from outside of the git folder or from inside of the git folder?

Outside the folder. stack setup does not install stack, but rather sets up the environment for stack to use (creates the ~/.stack folder and GHC).

Hey @GregorySchwartz,

I ran stack setup 8.0.1 and it looked successful, but afterwards stack install in the too-many-cells directory yields the same error:

~]$ stack setup 8.0.1
Preparing to install GHC (gmp4) to an isolated location.
This will not interfere with any system-level installation.
Downloaded ghc-gmp4-8.0.1.                                      
Installed GHC.                                                                                     
stack will use a sandboxed GHC it installed
For more information on paths, see 'stack path' and 'stack exec env'
To use this GHC and packages outside of a project, consider using:
stack ghc, stack ghci, stack runghc, or stack exec

too-many-cells]$ stack install
No setup information found for ghc-8.4.3 on your platform.
This probably means a GHC bindist has not yet been added for OS key 'linux64-gmp4'.
Supported versions: ghc-7.8.4, ghc-7.10.2, ghc-7.10.3, ghc-8.0.1, ghc-8.0.2, ghc-8.2.1, ghc-8.2.2, ghc-8.4.2

I'm not sure if too-many-cells is somehow explicitly calling for version 8.4.3, which possibly Stack doesn't support on CentOS 6, or if there is a problem with Stack itself, since when I run stack path, I also get error output:

too-many-cells]$ stack path
No setup information found for ghc-8.4.3 on your platform.
This probably means a GHC bindist has not yet been added for OS key 'linux64-gmp4'.
Supported versions: ghc-7.8.4, ghc-7.10.2, ghc-7.10.3, ghc-8.0.1, ghc-8.0.2, ghc-8.2.1, ghc-8.2.2, ghc-8.4.2

And I'm not sure if I'm doing it right, but gauging from the syntax examples in the stack documentation, I don't think that passing it --compiler-bin should cause an error like this:

too-many-cells]$ stack path --compiler-bin '~/.stack/programs/x86_64-linux/ghc-gmp4-8.0.1/bin/'
Invalid argument `~/.stack/programs/x86_64-linux/ghc-gmp4-8.0.1/bin/'
Auxiliary command not found in path `stack-path'
File does not exist or is not a regular file `path'

Usage: stack path [--stack-root] [--project-root] [--config-location]
                  [--bin-path] [--programs] [--compiler-exe] [--compiler-bin]
                  [--compiler-tools-bin] [--local-bin] [--extra-include-dirs]
                  [--extra-library-dirs] [--snapshot-pkg-db] [--local-pkg-db]
                  [--global-pkg-db] [--ghc-package-path]
                  [--snapshot-install-root] [--local-install-root]
                  [--snapshot-doc-root] [--local-doc-root] [--local-hoogle-root]
                  [--dist-dir] [--local-hpc-root] [--local-bin-path]
                  [--ghc-paths] [--global-stack-root] [--help]
  Print out handy path information

Do you know if this is due to something in too-many-cells, or if this an issue that I should open up on the Stack github repo?

This is a stack issue. There is some information about this problem (commercialhaskell/stack#4161) with potential workarounds in that issue (use system GHC apparently) and in commercialhaskell/stack#4144. According to the latter issue, maybe try installing gmp4 as well?

Hey @GregorySchwartz,

The Stack developers were able to get me sorted out on configuring Stack to use different versions of GHC, and I've got it loaded up with ghc-8.4.2 (this seems to be the latest supported version on CentOS 6). However, I'm still running into problems building too-many-cells. Initially it complained about dependencies until I added these lines:

  - JuicyPixels-3.3.5
  - MonadRandom-0.5.1.2
  - active-0.2.0.14
  - adjunctions-4.4
  - aeson-pretty-0.8.8
  - ansi-wl-pprint-0.6.9
  - async-2.2.2
  - base-compat-0.10.5
  - base-orphans-0.8.2
  - base64-bytestring-1.0.0.3
  - blaze-markup-0.8.2.3
  - blaze-svg-0.3.6.1
  - cairo-0.13.8.0
  - cassava-0.5.2.0
  - cereal-0.5.8.1
  - cereal-vector-0.2.0.1
  - circle-packing-0.1.0.6
  - colour-2.3.5
  - data-default-0.7.1.1
  - data-default-class-0.1.2.0
  - data-ordlist-0.4.7.0
  - distributive-0.6.1
  - dlist-0.8.0.7
  - exceptions-0.10.4
  - fgl-5.7.0.2
  - find-clumpiness-0.2.3.2
  - fingertree-0.1.4.2
  - foldl-1.4.6
  - force-layout-0.4.0.6
  - fsnotify-0.3.0.1
  - gtk2hs-buildtools-0.13.8.0
  - hashable-1.3.0.0
  - hierarchical-clustering-0.4.7
  - hmatrix-0.20.0.0
  - http-client-0.5.14
  - http-client-tls-0.3.5.3
  - integration-0.2.1
  - intervals-0.8.1
  - lens-4.19.1
  - lens-aeson-1.1
  - linear-1.20.9
  - managed-1.0.7
  - math-functions-0.3.3.0
  - matrices-0.4.5
  - matrix-market-attoparsec-0.1.1.3
  - microlens-0.4.11.2
  - microlens-mtl-0.2.0.1
  - microlens-th-0.4.3.4
  - monoid-extras-0.5.1
  - mtl-compat-0.2.2
  - mwc-random-0.14.0.0
  - network-3.1.1.1
  - network-simple-0.4.5
  - newtype-generics-0.5.4
  - optparse-applicative-0.14.3.0
  - optparse-generic-1.3.1
  - parallel-3.2.2.0
  - parsers-0.12.10
  - pipes-4.3.13
  - pipes-attoparsec-0.5.1.5
  - pipes-bytestring-2.1.6
  - pipes-group-1.0.12
  - pipes-parse-3.0.8
  - pipes-safe-2.2.9
  - polyparse-1.12.1
  - primitive-0.7.0.1
  - profunctors-5.5.2
  - random-1.1
  - random-shuffle-0.0.4
  - reflection-2.1.5
  - resourcet-1.1.11
  - safe-0.3.18
  - scientific-0.3.6.2
  - semigroupoids-5.3.4
  - semigroups-0.18.5
  - setenv-0.1.1.3
  - singletons-2.6
  - sparse-linear-algebra-0.3.1
  - split-0.2.3.4
  - statestack-0.2.0.5
  - statistics-0.15.2.0
  - stm-chans-3.0.0.4
  - streaming-0.2.3.0
  - streaming-bytestring-0.1.6
  - streaming-commons-0.1.19
  - svg-builder-0.1.1
  - tagged-0.8.6
  - temporary-1.3
  - terminal-size-0.3.2.1
  - text-show-3.8.5
  - th-abstraction-0.2.11.0
  - th-lift-0.8.1
  - th-orphans-0.13.9
  - time-locale-compat-0.1.1.5
  - tree-fun-0.8.1.0
  - tuple-0.3.0.2
  - unordered-containers-0.2.10.0
  - utf8-string-1.0.1.1
  - uuid-types-1.0.3
  - vector-0.12.1.2
  - vector-algorithms-0.8.0.3
  - vector-space-0.16
  - wl-pprint-text-1.2.0.1
  - xml-1.3.14
  - zlib-0.6.2.1
  - BiobaseNewick-0.0.0.2
  - Boolean-0.2.4
  - MemoTrie-0.6.10
  - NumInstances-1.4
  - OneTuple-0.2.2
  - Only-0.1
  - QuickCheck-2.13.2
  - alex-3.2.5
  - ansi-terminal-0.10.3
  - base-compat-batteries-0.11.1
  - bifunctors-5.5.7
  - blaze-builder-0.4.1.0
  - bytes-0.17
  - bytestring-builder-0.10.8.2.0
  - cabal-doctest-1.0.8
  - call-stack-0.2.0
  - case-insensitive-1.2.1.0
  - charset-0.3.7.1
  - clumpiness-0.17.0.2
  - cmdargs-0.10.20
  - comonad-5.0.6
  - connection-0.3.1
  - contravariant-1.5.2
  - cookie-0.4.5
  - cryptonite-0.26
  - data-default-instances-containers-0.0.1
  - data-default-instances-dlist-0.0.1
  - data-default-instances-old-locale-0.0.1
  - dense-linear-algebra-0.1.0.0
  - free-5.1.3
  - generic-deriving-1.13.1
  - groups-0.4.1.0
  - happy-1.19.12
  - hashtables-1.2.3.4
  - hinotify-0.4
  - hspec-2.7.1
  - http-types-0.12.3
  - integer-logarithms-1.0.3
  - kan-extensions-5.2
  - lifted-base-0.2.3.12
  - listsafe-0.1.0.1
  - memory-0.15.0
  - mime-types-0.1.0.9
  - monad-control-1.0.2.3
  - monad-par-0.3.5
  - network-bsd-2.8.1.0
  - network-uri-2.6.3.0
  - old-locale-1.0.0.7
  - safe-exceptions-0.1.7.0
  - shelly-1.9.0
  - socks-0.6.1
  - storable-complex-0.2.3.0
  - stringsearch-0.3.6.6
  - syb-0.7.1
  - system-filepath-0.4.14
  - th-desugar-1.10
  - th-lift-instances-0.1.14
  - th-reify-many-0.1.9
  - tls-1.5.4
  - transformers-base-0.4.5.2
  - transformers-compat-0.6.5
  - unix-compat-0.5.2
  - unliftio-core-0.1.2.0
  - vector-binary-instances-0.2.5.1
  - vector-builder-0.3.8
  - vector-th-unbox-0.2.1.7
  - void-0.7.3
  - ForestStructures-0.0.0.2
  - StateVar-1.2
  - abstract-deque-0.3
  - abstract-par-0.3.3
  - asn1-encoding-0.9.6
  - asn1-types-0.3.4
  - base-prelude-1.3
  - basement-0.0.11
  - binary-orphans-1.0.1
  - cereal-text-0.1.0.2
  - enclosed-exceptions-1.0.3
  - fail-4.9.0.0
  - hourglass-0.2.12
  - hspec-core-2.7.1
  - hspec-discover-2.7.1
  - hspec-expectations-0.8.2
  - invariant-0.5.3
  - lifted-async-0.10.0.5
  - monad-par-extras-0.3.3
  - ordered-containers-0.2.2
  - splitmix-0.0.4
  - text-binary-0.2.1.1
  - th-expand-syns-0.4.5.0
  - x509-1.7.5
  - x509-store-1.6.7
  - x509-system-1.6.6
  - x509-validation-1.6.11
  - HUnit-1.6.0.0
  - asn1-parse-0.9.5
  - clock-0.8
  - constraints-0.12
  - pem-0.2.4
  - quickcheck-io-0.2.0
  - tf-random-0.5
  - type-equality-1

to the extra-deps section of too-many-cells's stack.yaml file.

However, the build itself is now failing at:

base-compat-batteries            > [109 of 116] Compiling System.IO.Error.Compat
base-compat-batteries            >    
base-compat-batteries            > /tmp/stack12688/base-compat-batteries-0.11.1/src/System/IO/Error/Compat.hs:6:1: error:
base-compat-batteries            >     Could not find module `System.IO.Error.Compat'
base-compat-batteries            >     Perhaps you meant System.IO.Unsafe.Compat (from base-compat-0.10.5)
base-compat-batteries            >   |
base-compat-batteries            > 6 | import "base-compat" System.IO.Error.Compat as Base
base-compat-batteries            >   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
base-compat-batteries            >    
                                      
--  While building package base-compat-batteries-0.11.1 using:
      /net/gs/vol1/home/rsolano1/.stack/setup-exe-cache/x86_64-linux-gmp4/Cabal-simple_mPHDZzAJ_2.2.0.1_ghc-8.4.2 --builddir=.stack-work/dist/x86_64-linux-gmp4/Cabal-2.2.0.1 build --ghc-options " -fdiagnostics-color=always"
    Process exited with code: ExitFailure 1
Progress 30/250

Do you know why this is happening?

It's possible that the version of base-compat-batteries is not compatible with the version of base (GHC) that you have. Try to specify an older version from https://hackage.haskell.org/package/base-compat-batteries, such as 0.10.5 by specifying that version in the stack.yaml.

@rsolano1-uw I have package too-many-cells for nix, I recommend trying that out (see the documentation). It's a reproducible derivation which should take care of all dependencies and only requires root once when installing nix.