[Haskell-cafe] Installation of GLUT package

Sven Panne sven.panne at aedion.de
Tue Sep 4 02:42:49 EDT 2007

On Tuesday 04 September 2007 03:06, Ronald Guida wrote:
> [...]
> According to Cabal/How_to_install_a_Cabal_package, I need to download
> the package, unzip it, and then run the following three commands.
> 1. runghc Setup.hs configure
> 2. runghc Setup.hs build
> 3. runghc Setup.hs install
> The first command, "runghc Setup.hs configure", fails, reporting that
> it can't find "sh".  Naturally, I'm on a Windows box, so I don't have
> the Unix shell on my system.
> So now I'm stuck...
> * Is there an easy way to work around the absence of "sh"?

No, the GLUT package uses autoconf at build time, so you need "sh".

> * Is there an easy way to get "sh" on my Windows box?

MinGW/MSYS is the way to go if you really want to build any autoconf-based SW 
on Windows. Cygwin is normally not needed and it's a totally different beast.

> [...]
> PS, Here's the output of configure.  Do I really need all this stuff
> just for the GLUT package?
> C:\GLUT\GLUT-2.0>runghc Setup.hs configure
> Configuring GLUT-2.0...
> configure: Dependency base-any: using base-2.1.1
> configure: Dependency OpenGL-any: using OpenGL-2.2.1
> configure: Using install prefix: C:\Program Files
> configure: Binaries installed in: C:\Program Files\Haskell\bin
> configure: Libraries installed in: C:\Program
> Files\Haskell\GLUT-2.0\ghc-6.6.1
> configure: Private binaries installed in: C:\Program Files\GLUT-2.0
> configure: Data files installed in: C:\Program Files\Common Files\GLUT-2.0
> configure: Using compiler: C:\ghc\ghc-6.6.1\bin\ghc.exe
> configure: Compiler flavor: GHC
> configure: Compiler version: 6.6.1
> configure: Using package tool: C:\ghc\ghc-6.6.1\bin\ghc-pkg.exe
> configure: Using ar found on system at: C:\ghc\ghc-6.6.1\bin\ar.exe
> configure: No haddock found
> configure: No pfesetup found
> configure: No ranlib found
> configure: Using runghc found on system at: C:\ghc\ghc-6.6.1\bin\runghc.exe
> configure: No runhugs found
> configure: No happy found
> configure: No alex found
> configure: Using hsc2hs: C:\ghc\ghc-6.6.1\bin\hsc2hs.exe
> configure: No c2hs found
> configure: No cpphs found
> configure: No greencard found
> Setup.hs: Cannot find: sh

This is standard Cabal output, nothing specific to the GLUT package. Hint: 
Don't even think about path names with spaces when building any 
autoconf-based SW, this will most certainly go wrong. Installing a path with 
spaces via Cabal should be OK.

But coming to the main point: I can't see a reason why the GLUT package needs 
to be rebuilt, it gets the freeglut-specific API entries dynamically (at 
least, that was the plan ;-). Replacing the original GLUT DLL with the 
freeglut DLL should work. because freeglut *is* a drop-in replacement for the 
old GLUT (modulo support for some obscure input devices). A more detailed 
description of what goes wrong with that simple approach would be helpful...


More information about the Haskell-Cafe mailing list