1
votes

I have this error on windows while installing Pathfinder, which is among DSH dependencies. Is it possible to install DSH on Windows system?

D:\Devs>cabal install pathfinder Resolving dependencies... [1 of 1] Compiling Main ( C:\DOCUME~1\kdv\LOCALS~1\Temp\Pathfinder-0 .5.103528\Pathfinder-0.5.10\Setup.hs, C:\DOCUME~1\kdv\LOCALS~1\Temp\Pathfinder-0 .5.103528\Pathfinder-0.5.10\dist\setup\Main.o ) Linking C:\DOCUME~1\kdv\LOCALS~1\Temp\Pathfinder-0.5.103528\Pathfinder-0.5.10\di st\setup\setup.exe ... setup.exe: The program sh is required but it could not be found. cabal: Error: some packages failed to install: Pathfinder-0.5.10 failed during the configure step. The exception was: ExitFailure 1

1

1 Answers

1
votes

You can try to compile it using Cygwin or MSYS. You need at least the following command-line tools in your %PATH%:

  • sh
  • rm
  • cp
  • tar
  • pwd
  • make
  • ar
  • ld

These tools are necessary because the library uses an internal C library, which in turn uses autotools and associated configure and Makefiles, which are interpreted by sh and make respectively. If you install MSYS or Cygwin, you will have the necessary UNIX-like environment to be able to compile it.

You can of course also just install the library in a Linux environment; you'll have a much easier time because you won't have to potentially deal with MinGW version incompatibilities etc. In your position, I would at least consider installing a virtual machine running some form of Linux distribution and just do all of my development there - that's what I do on my main Windows machine. When you are ready for deployment, it is much easier to cross-compile Windows Haskell programs on Linux than actually compiling on Windows directly because you don't have to deal with version conflicts, and you also have the option to produce a Linux binary for Linux servers (which are what most RDBMS tend to run on, anyways).