What is the official way to install Haskell Platform 2014, from source, on Red Hat?

I am trying to install Haskell Platform 2014.2.0.0 from a source on Red Hat Enterprise Linux 6.5. I have a functional installation of Haskell Platform 2012.4.0.0 and GHC 7.4.2 from two years ago, as well as the recently installed Haskell Platform 2013.2.0.0 and GHC 7.6.3 from JustHub.

I built GHC 7.8.3 from the source, but it continues to appear with seven errors in the test suite. I do not know if these test failures are harmless or not. (Test failures are not relevant to my question, but they can become significant later.)

I will unpack the original tarball 2014.2.0.0, read README. It says that the way to create this Haskell iteration has a shell script that is called:

./platform.sh $ PATH_TO_GHC_BINDIST_TARBALL

I do not have a binary GHC distribution. As far as I can tell, there is no binary distribution tarball GHC 7.8.3 for any version of Red Hat Enterprise Linux. I have built-in GHC 7.8.3. How do I tell the .sh platform - or whatever is below it - that there is no tarball, and it should just use what's in $ PATH? Alternatively, how do I build an existing GHC 7.8.3 installation so that the .sh platform accepts it?

The built-in GHC does not have the "cabal" command, so the cabal commands in the .sh platform return to $ PATH, which I can configure as one of the other installed versions (2013.2 / 7.6.3 or 2012.4) ./ 7.4.2). It doesn't seem to matter: no one recognizes cabal-sandbox. Both results lead to complaints that I have to run cd hptool; cabal install --only-dependencies ", which I did, more than once. platform.sh never passes this point.

If I run the commands in platform.sh manually, I get "cd hptool; cabal build ', in which the errors are:" cabal-1.16.0.2: first run the "configure" command. ". But there is no" configure "command in the hptool directory.

Now i'm stuck. How can I build the Haskell 2014 platform on RHEL 6?

+6
source share
2 answers

You need to use your GHC sources to create your own bindist. Directions at https://ghc.haskell.org/trac/ghc/wiki/MakingReleases

+1
source

I managed to install the Haskell platform and function. I ended up abandoning the .sh platform and only manually installed all the packages in the Haskell platform archive - and their dependencies - with command line commands. Along with the broken .sh platform, I ran into a lot of problems along the way.

The ones that I remember:

  • platform.sh will never succeed if you have a spare Haskell Platform 2013 or previous. He wants Kabbalah to recognize the --sandbox option, and cabal 1.18 does not know this option. You should have a newer camera installed than the Haskell Platform 2013 provides. (GHC 7.4 or 7.6 seems to be all right.)

  • I had an existing .cabal and .ghc directory that had incompatible assemblies and / or versions of different packages. I deleted both directories many times, checking things out.

  • cabal install --global behaves very differently from the cabal..cabal standard installation, it contained something useful after I did "cabal install cabal-install". It took two or three attempts to figure out where the new binary camera went.

  • ghc and cabal are building new libraries in .ghc and .cabal, but not new binaries.

  • Neither GHC nor cabal set the default for --enable-shared, unless it wants to. I had to rebuild everything before that - right up to GHC 7.8.3 itself - with --enable-shared as soon as this happened.

  • Haddock is ridiculously closely associated with the version of GHC with which it was built. I had to rebuild it in order to get accessible documentation to work for anything built using GHC 7.8.3.

  • The test packages and the text package are so tightly integrated that they have circular dependencies if you try to run "cabal install text --enable-tests". Even after installing the latest version of the text and test suites, cabal still does not run the test suite, so I passed and installed the text without testing it.

  • In my environment, by default there is "LC_ALL = C". This causes a known bug in cabal - apparently in all versions, which breaks some package builds. To get around this, I had to transfer it to "LC_ALL = en_US.utf8". I do not know if the affected packages will work if you have LC_ALL or any other locale variable, such as LANG or LC_ <anything else>, set to C.

  • Installing ccalc - global is not compatible with where the packages are stored. We separated the individual packages into our own subdirectories, and then we built a tree of symbolic links in a known place from all these subdirectories. So ghc is in its own subdirectory / usr / sup / ghc -7.8.3; The Haskell platform is in another subdirectory, / usr / sup / haskell -platform-2014.2.0.0. I used -prefix = / usr / sup / haskell-platform-2014.2.0.0 for each cabal install command sequentially, but even then some libraries ended up in / usr / sup / ghc -7.8.3.

  • Both the GHC and Haskell platforms have a dictionary of what is built and where it is located - possibly as a workaround to mismatch the installation location - in / usr / sup / ghc -7.8.3 / lib / ghc- 7.8.3 / package.conf .d / package.cache. If this batch dictionary is not readable in the world, ghc breaks. What he should do is look at the actual structure of the files to find things. Given that ghc breaks if the dictionary is unavailable, the file should not be called a cache, since a cache miss should not lead to a catastrophic failure. Perhaps rename it to "package-required dictionary"?

Ultimately, all of this was fixed, but I have to think about the fact that I caused so many head bangs on the wall.

+1
source

Source: https://habr.com/ru/post/975510/


All Articles