[Haskell-cafe] GHC-7.8.2 & Win

Michal Antkiewicz mantkiew at gsd.uwaterloo.ca
Mon Apr 21 01:10:01 UTC 2014

Hi, you need to install these deps. manually. This might be of help:


It's also good to use MinGW and MSYS. MinGW comes with the platform. MSYS
currently doesn't but it should too. You can install them yourself, if you
don't have the platform.

Regarding third-party libraries, I only have experience with `glpk-hs`
package which is a wrapper around the GLPK solver. It took me a lot of time
to get this to work but in general, try to get a binary build for windows
(for GLPK, there's a Winglpk on sourceforge) and then you use
`--extra-include-dirs=` and `--extra-lib-dirs=` so specify the locations of
the library files.

In my case, I use a Makefile for this, which accepts a $(glpk) argument
with the install location of Winglpk.

GPLK_LIBS_INCLUDES := --extra-include-dirs=$(glpk)/src
--extra-include-dirs=$(glpk)/src/zlib --extra-lib-dirs=$(glpk)/w32

Then I call cabal like this

`cabal install --only-dependencies $(GPLK_LIBS_INCLUDES)`

Finally, (just in case...), with MSYS you give paths on windows like this,
for example, `/c/lib/glpk-4.51`.

Hope that helps,

On Fri, Apr 18, 2014 at 5:18 PM, Cédric Chantepie <chantepie at altern.org>wrote:

> Hi,
> Try to setup GHC 7.8.2 & cabal 1.8 on Windows (7/64bits), using binary
> distributions from haskell.org I get error when I try to install glib
> package using cabal :
> cabal: Missing dependency on a foreign library:
> * Missing (or bad) header file: primitive-memops.h
> This problem can usually be solved by installing the system package that
> provides this library (you may need the "-dev" version). If the library is
> already installed but in a non-standard location then you can use the flags
> --extra-include-dirs= and --extra-lib-dirs= to specify where it is.
> If the header file does exist, it may contain errors that are caught by
> the C
> compiler at the preprocessing stage. In this case you can re-run configure
> with the verbosity flag -v3 to see the error messages.
> Failed to install primitive-
> cabal: Error: some packages failed to install:
> Command cabal install primitive raise the same error.
> I have tried either within cygwin or from plain cmd.
> Thanks for any hint, best.
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140420/de6c52a5/attachment-0001.html>

More information about the Haskell-Cafe mailing list