Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find module Prelude... dyn libraries for package base?

Tags:

haskell

cabal

Trying to follow the solution proposed in the answer to reducing haskell's binary question, I keep getting the error, when I install with --enable-shared option:

> cabal install opengl --enable-shared --reinstall   
...
Could not find module `Prelude' 
Perhaps you haven't installed the "dyn" libraries for package `base'?

Tried everything. I'm using apt-get installedhaskell-platform (with ghc 7.4.1), on Ubuntu 12.04, 64bit.

ANY tips?

like image 987
Andriy Drozdyuk Avatar asked Jul 29 '12 17:07

Andriy Drozdyuk


1 Answers

It seems that Ubuntu's Haskell platform doesn't include dynamic libraries.

You can try installing ghc-dynamic, that should work, I assume the distro packagers know what they're doing. You would probably need to install the *-dynamic packages for several libraries included in the platform too.

In case it doesn't work, the only suggestions I can make is to compile GHC yourself from source (using the installed GHC), or use a vanilla GHC bindist, those come with dynamic libraries, as far as I'm aware.

Both would require reinstalling (recompiling included) the libraries, though (perhaps best to compile the vanilla platform from source then), so I recommend trying the distribution packages first.

like image 105
Daniel Fischer Avatar answered Sep 19 '22 20:09

Daniel Fischer