
Hi, I'm having a few problems with cabals build-type "configure" on windows, especially with the packages "curl" and "pcre-light". Both fail either with: configure: error: curl libraries not found, so curl package cannot be built Configuring pcre-light-0.4... cabal: Missing dependency on a foreign library: * Missing C library: pcre Both libraries (pcre3.dll and libcurl.dll) are in my PATH variable, and I can build other non-haskell-applications which are using these via mingws gcc compiler. But still, somehow cabal seems unable to find them. Using the recommanded "--extra-include-dirs" and "--extra-lib-dirs" won't help either. Or is cabal looking for different files than those two .dlls? Can anyone help me on this? Did anyone manage to build curl/pcre-light on windows? My current configuration is MinGW/msys with gcc 4.5, ghc 6.12.3, cabal-install 0.8.2, cabal 1.8.0.6. libcurl.dll and pcre.dll are the latest builds from the official webpages. Thanks for any Help, Nils PS: Sorry for the previous (incomplete) mail.

Do you have the headers installed as well as the dlls? For headers, MSys will have a search path of at least these two directories msys\1.0\local\include MinGW\include

Am 11.11.2010 13:41, schrieb Stephen Tetley:
Do you have the headers installed as well as the dlls?
For headers, MSys will have a search path of at least these two directories
msys\1.0\local\include MinGW\include
Is there an environment variable for this? As I said, I tried using --extra-include-dirs with MinGW\include.

On 11 November 2010 13:21, Nils Schweinsberg
Is there an environment variable for this? As I said, I tried using --extra-include-dirs with MinGW\include.
I'm not sure about an environment variable. Adding the MinGW\ prefix looks wrong, you may have to experiment with paths and forward or back slash separators a bit. I can't remember which convention (Windows) cabal uses.

Am 11.11.2010 14:25, schrieb Stephen Tetley:
I'm not sure about an environment variable. Adding the MinGW\ prefix looks wrong, you may have to experiment with paths and forward or back slash separators a bit. I can't remember which convention (Windows) cabal uses.
I tried every possible combination. Apparently, the configure script is completly ignoring those --extra-..-dirs flags.

Have you tried with double backslash \\ and starting from the root? I think runhaskell under MinGW uses this form:
runhaskell Setup.hs configure --extra-include-dirs=C:\\msys\\1.0\\local\\include --extra-lib-dirs=C:\\msys\\1.0\\local\\lib
I haven't built a binding for a while so I've forgotten some quirks, but I found an old message to -Cafe highlighting that paths appear to need double back slash and should not be in double quotes: http://www.haskell.org/pipermail/haskell-cafe/2010-March/075387.html

On 11 November 2010 11:23, Nils Schweinsberg
Configuring pcre-light-0.4... cabal: Missing dependency on a foreign library: * Missing C library: pcre
On 11 November 2010 12:41, Stephen Tetley
Do you have the headers installed as well as the dlls?
With this error message, it really is the C libs. If cabal cannot find the headers then it says so explicitly. Cabal does the check by making a trivial .c program and linking it with (approximately): gcc main.o -lpcre If that fails then cabal declares that it cannot find the C lib. It's possible that the lib is present but that there is some other linking error, it's a bit tricky to distinguish without looking at the error messages from ld.exe. So the first thing to try is the above test, or run cabal configure -v3 and see what error message ld reports. Duncan
participants (3)
-
Duncan Coutts
-
Nils Schweinsberg
-
Stephen Tetley