Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I disable OpenGL in the Haskell Platform?

I'm on a shared Linux server where I can't install software. It seems like installing OpenGL from source is a major pain (I stopped after finding that Mesa depends on libxml2), and I don't use it in any of my Haskell programs.

How do I disable OpenGL in the Haskell platform? I got around the configure checks by deleting those, but when I add --disable-OpenGLRaw or --without-OpenGLRaw to the ./configure options, it says "unrecognized options" and doesn't actually disable the packages.

Also, I've tried using the cabal-install bootstrap, but for some reason cabal-install 0.14.0 doesn't work with GHC 7.6.3.

Thank you very much!!

like image 706
gatoatigrado Avatar asked Aug 08 '13 00:08

gatoatigrado


2 Answers

You can use cabal-install 1.16.X with GHC 7.6.3. The 'Cabal' webpage always lags - it seems no one considers it their job to update that page. See the hackage page instead (http://hackage.haskell.org/package/cabal-install).

like image 117
Thomas M. DuBuisson Avatar answered Nov 13 '22 04:11

Thomas M. DuBuisson


After a bit of mucking, I seem to have gotten it. Send me an email if I'm missing an instruction,

  • Comment out lines printing errors from ./configure (or replace them with echo to keep syntax parity)
  • Delete all GL things (fgl, OpenGLRaw, GLUT, etc.) from packages/haskell-platform-*/haskell-platform.cabal and packages/platform.packages

The lines you're supposed to delete look like this,

as_fn_error $? "The OpenGL C library is required" "$LINENO" 5

If you're stuck, here's a really bad diff that somehow works (http://pastebin.com/azWNHsh8). Don't ask me, I deleted an if by mistake and deleted a fi elsewhere and it works ......

Hopefully the --disable-X flags will work in a future version of the platform.

like image 5
gatoatigrado Avatar answered Nov 13 '22 06:11

gatoatigrado