How to completely download GHC & cabal from source
I would like to install pandoc, but I have some limitations due to IT department policy:
- I am unable to download any binaries.
- Each executable must be built from sources
- Only Google Chrome has internet access (proxy restrictions)
So I downloaded sources Pandoc
but it depends onhaskell... Thus, I downloadedghc-7.8.4-src.tar.bz2
Unfortunately, I discovered what I needed GHC
to build GHC
. I downloaded ghc-7.4.1-i386-unknown-linux.tar.bz2
and got this error:
$ ./configure
checking for path to top of build tree... ./configure: line 2113: utils/ghc-pwd/dist-install/build/tmp/ghc-pwd: cannot execute binary file: Exec format error
configure: error: cannot determine current directory
In "/usr/src/ghc-7.4.1/utils/ghc-pwd/dist-install/build/tmp/usr/src/ghc-7.4.1/utils/ghc-pwd/dist-install/build/tmp"
I found a binary that shouldn't be here. I cannot execute binaries.
I also found that I needed cabalfor which I need to install first Haskell
.
It seems that the snake is biting its own tail ...
Is there a method I can use to create Pandod, Haskell, Cabal, and all other dependencies?
Usually, if I need a program, I just download the sources, execute ./configure
, solve dependency issues, and eventually run make install
. In this case, I feel like I need my whole life to figure out what I need to create Pandoc ...
source to share
I would try to use the new (beta-) released tool stack
[ 1 ]
The recipe for downloading GHC and creating pandoc:
- Get executable file
stack
[ 2 ] -
Run:
$ stack setup
-
Add the recommended directory to PATH (will be something like
$HOME/.stack/progams/...arch.../ghc-7.8.4/bin
) -
Run:
$ stack install pandoc
-
Find the executable
pandoc
in$HOME/.local/bin
.
Links:
[1]: https://www.fpcomplete.com/blog/2015/06/announcing-first-public-beta-stack
[2]: https://github.com/commercialhaskell/stack/wiki/Downloads
source to share