
[Please excuse me if I seem to be a bit frustrated. I am. I have tried to transcribe a live Haskell platform installation session, but I don't remember details of my past attempts to get cabal working. If you have any questions: shoot.] Hi I've been trying to install GHC and some libraries on Windows 7 for some time now, to no avail. I'm on Windows 7 Home Premium here, and I'd like to install all Haskell-related stuff in C:\Weiteres\Haskell (cabal --user installations ending up in C:\Users\Thomas\AppData\Roaming\cabal is fine). Actually I would like to make system-wide package installations (maybe in C:\Weiteres\Haskell\cabal), but not even --user is working fine so far, so I postpone that. I see two basic options: * Haskell Platform (older release, but all relevant libs bundled with it) * ghc and libs installed by hand (newer release, but more hassle) For the first option I expect a nice installer that just does everything for me, for the second option I'm going along with the instructions in Real World Haskell's appendix. So far, none of it worked. ghc is fine (mostly), but cabal is a total mess. I've just tried the second option and actually I've got quite far, until the network library didn't install. I don't have any specifics anymore. And whichever option I choose I can only make --user installs with cabal (but I'd be willing to settle for that). Okay, let's skip all this "manual installation stuff", on to the beginner-friendly first option: Haskell platform I specify the destination folder "C:\Weiteres\Haskell\Platform" and just go with the default selection of checkboxes. Now I'm trying ghci from the start menu... okay, it works. Entering Windows' command prompt I now enter "cabal update". There is a newer version of cabal-install available. I'm ignoring that for now. I don't want to mess up a tested, working cabal-install version and deviate from the Haskell Platform release just yet. Now "cabal install hakyll --user": C:\Users\Thomas>cabal install hakyll --user Resolving dependencies... Downloading pandoc-1.3... [1 of 1] Compiling Main ( C:\Users\Thomas\AppData\Local\Temp\pandoc- 1.35032\pandoc-1.3\Setup.hs, C:\Users\Thomas\AppData\Local\Temp\pandoc-1.35032\p andoc-1.3\dist\setup\Main.o ) Linking C:\Users\Thomas\AppData\Local\Temp\pandoc-1.35032\pandoc-1.3\dist\setup\ setup.exe ... Configuring pandoc-1.3... Preprocessing library pandoc-1.3... Preprocessing executables for pandoc-1.3... Building pandoc-1.3... src\Text\Pandoc\Shared.hs:121:7: Could not find module `System.IO.UTF8': There are files missing in the `utf8-string-0.3.6' package, try running 'ghc-pkg check'. Use -v to see a list of the files searched for. cabal: Error: some packages failed to install: hakyll-0.2 depends on pandoc-1.3 which failed to install. pandoc-1.3 failed during the building phase. The exception was: exit: ExitFailure 1 That went well. :-( "ghc-pkg check": C:\Users\Thomas>ghc-pkg check There are problems in package binary-0.5.0.2: import-dirs: C:\Users\Thomas\AppData\Roaming\cabal\binary-0.5.0.2\ghc-6.10.4 oesn't exist or isn't a directory library-dirs: C:\Users\Thomas\AppData\Roaming\cabal\binary-0.5.0.2\ghc-6.10.4 doesn't exist or isn't a directory file Data\Binary.hi is missing file Data\Binary\Put.hi is missing file Data\Binary\Get.hi is missing file Data\Binary\Builder.hi is missing cannot find libHSbinary-0.5.0.2.a on library path There are problems in package digest-0.0.0.8: import-dirs: C:\Users\Thomas\AppData\Roaming\cabal\digest-0.0.0.8\ghc-6.10.4 oesn't exist or isn't a directory library-dirs: C:\Users\Thomas\AppData\Roaming\cabal\digest-0.0.0.8\ghc-6.10.4 doesn't exist or isn't a directory file Data\Digest\CRC32.hi is missing file Data\Digest\Adler32.hi is missing cannot find libHSdigest-0.0.0.8.a on library path There are problems in package template-0.1.1.1: import-dirs: C:\Users\Thomas\AppData\Roaming\cabal\template-0.1.1.1\ghc-6.10. doesn't exist or isn't a directory library-dirs: C:\Users\Thomas\AppData\Roaming\cabal\template-0.1.1.1\ghc-6.10 4 doesn't exist or isn't a directory file Text\Template.hi is missing cannot find libHStemplate-0.1.1.1.a on library path There are problems in package utf8-string-0.3.6: import-dirs: C:\Users\Thomas\AppData\Roaming\cabal\utf8-string-0.3.6\ghc-6.10 4 doesn't exist or isn't a directory library-dirs: C:\Users\Thomas\AppData\Roaming\cabal\utf8-string-0.3.6\ghc-6.1 .4 doesn't exist or isn't a directory file Codec\Binary\UTF8\String.hi is missing file Codec\Binary\UTF8\Generic.hi is missing file System\IO\UTF8.hi is missing file System\Environment\UTF8.hi is missing file Data\String\UTF8.hi is missing file Data\ByteString\UTF8.hi is missing file Data\ByteString\Lazy\UTF8.hi is missing cannot find libHSutf8-string-0.3.6.a on library path There are problems in package zip-archive-0.1.1.4: import-dirs: C:\Users\Thomas\AppData\Roaming\cabal\zip-archive-0.1.1.4\ghc-6. 0.4 doesn't exist or isn't a directory library-dirs: C:\Users\Thomas\AppData\Roaming\cabal\zip-archive-0.1.1.4\ghc-6 10.4 doesn't exist or isn't a directory file Codec\Archive\Zip.hi is missing cannot find libHSzip-archive-0.1.1.4.a on library path There are problems in package haddock-2.4.2: import-dirs: c:/builds/slave/x86-win-stable/build/ghc-6.10.4\haddock-2.4.2 do sn't exist or isn't a directory library-dirs: c:/builds/slave/x86-win-stable/build/ghc-6.10.4\haddock-2.4.2 d esn't exist or isn't a directory file Distribution\Haddock.hi is missing file Haddock\DocName.hi is missing file Haddock\Types.hi is missing file Haddock\InterfaceFile.hi is missing file Haddock\Exception.hi is missing file Haddock\Utils.hi is missing file Haddock\GHC\Utils.hi is missing cannot find libHShaddock-2.4.2.a on library path The following packages are broken, either because they have a problem listed above, or because they depend on a broken package. binary-0.5.0.2 digest-0.0.0.8 template-0.1.1.1 utf8-string-0.3.6 zip-archive-0.1.1.4 haddock-2.4.2 Excuse me? Broken packages right after installation? Okay, reinstalling them all (with --user --reinstall"). Except haddock: C:\Users\Thomas>cabal install haddock --user --reinstall Resolving dependencies... cabal: cannot configure haddock-2.6.0. It requires ghc >=6.12 && <6.14 There is no available version of ghc that satisfies >=6.12 && <6.14 *sigh* I'm starting to think about the manual installation of ghci and the libs again... but I won't do it, because it gives me all other kinds of pain (like "let's ship the mingw tool chain, but don't enter it into the PATH, the user will certainly know where to find ar.exe and how to make cabal use it when building a package"). I'm failing there just as much as here with the Platform. Okay, let's forget about haddock. Back to hakyll: "cabal install hakyll --user" Ends with: Linking dist\build\markdown2pdf\markdown2pdf.exe ... Created man\man1\pandoc.1 Created man\man1\hsmarkdown.1 Created man\man1\html2markdown.1 Created man\man1\markdown2pdf.1 setup.exe: CreateDirectory: permission denied (Zugriff verweigert) cabal: Error: some packages failed to install: hakyll-0.2 depends on pandoc-1.3 which failed to install. pandoc-1.3 failed during the final install step. The exception was: exit: ExitFailure 1 Okay, remember that cabal-install was out of date? "cabal install cabal-install" ends with: Linking dist\build\cabal\cabal.exe ... cabal: Error: some packages failed to install: cabal-install-0.6.4 failed during the final install step. The exception was: CreateDirectory: permission denied (Zugriff verweigert) Would be nice to know which directory cabal-install tried to create, don't you think? (This was just thrown in to show why I've only user user installations so far). Okay, the same with "--user" succeeds. Yay! Let's try pandoc again: Linking dist\build\markdown2pdf\markdown2pdf.exe ... Created man\man1\pandoc.1 Created man\man1\hsmarkdown.1 Created man\man1\html2markdown.1 Created man\man1\markdown2pdf.1 setup.exe: CreateDirectory: permission denied (Zugriff verweigert) cabal: Error: some packages failed to install: pandoc-1.3 failed during the final install step. The exception was: exit: ExitFailure 1 *sigh* What is cabal trying to do outside the battle-proven AppData-Cabal directory anyways? Let's revisit the phrase "beginner-friendly first option". :-/ Just for fun's sake, let's have a look into cabal's config file, since I seem to have some directory trouble: install-dirs user -- prefix: C:\Users\Thomas\AppData\Roaming\cabal -- bindir: $prefix\bin -- libdir: $prefix -- libsubdir: $pkgid\$compiler -- libexecdir: $prefix\$pkgid -- datadir: "C:\\Program Files (x86)\\Haskell" -- datasubdir: $pkgid -- docdir: $prefix\doc\$pkgid -- htmldir: $docdir\html -- haddockdir: $htmldir install-dirs global -- prefix: "C:\\Program Files (x86)\\Haskell" -- bindir: $prefix\bin -- libdir: $prefix -- libsubdir: $pkgid\$compiler -- libexecdir: $prefix\$pkgid -- datadir: "C:\\Program Files (x86)\\Haskell" -- datasubdir: $pkgid -- docdir: $prefix\doc\$pkgid -- htmldir: $docdir\html -- haddockdir: $htmldir I certainly don't have a "C:\\Program Files (x86)\\Haskell" folder. Might that result in problems? I don't know, because I have no clue what's supposed to be in the datadir. But then again I shouldn't have to meddle with some installed configuration file, especially since there has been no warning that I had to do that and very especially since I entered my destination folder upon installation. Maybe it's okay, but it kind of makes me nervous. And God knows what else I haven't stumbled upon yet. (I changed those directory entries to the ghc installation directory when I tried the second option and couldn't make it work either.) Has anyone who is *not* a Haskell/ghc/cabal expert been able to install Haskell satisfactorily on Windows 7? What are my options now? Any stupid mistakes I made? Waiting for the next release of the Haskell Platform (whenever that might happen)? Giving up, selling RWH on ebay and preparing New Year's Eve celebrations? Thomas