haskell - Cabal install pcre-light on windows. Extra-include-dirs/extra-lib-dirs not working -
haskell - Cabal install pcre-light on windows. Extra-include-dirs/extra-lib-dirs not working -
i'm using mingw+msys,
i've added extra-include-dirs, extra-lib-dirs, nil seems helping cabal find pcre library. here command lines i've tried, , sample output below it.
cabal install pcre-light --extra-include-dirs='c:\program files (x86)\gnuwin32\include' --extra-lib-dirs='c:\program files (x86)\gnuwin32\lib' cabal install pcre-light --extra-include-dirs='/c/program files (x86)/gnuwin32/include' --extra-lib-dirs='/c/program files (x86)/gnuwin32/lib' cabal install pcre-light --extra-include-dirs="/c/program files (x86)/gnuwin32/include" --extra-lib-dirs="/c/program files (x86)/gnuwin32/lib"
and maintain getting along these lines:
resolving dependencies... notice: installing sandbox located @ c:\users\user\src\dbsite\dbsite\.cabal-sandbox configuring pcre-light-0.4.0.3... failed install pcre-light-0.4.0.3 lastly 10 lines of build log ( c:\users\user\src\dbsite\dbsite\.cabal-sandbox\logs\pcre-light-0.4.0.3.log ): [1 of 1] compiling main ( c:\users\user\appdata\local\temp\pcre-light-0.4.0.3-9072\pcre-light-0.4.0.3\dist\dist-sandbox-6710ae14\setup\setup.hs, c:\users\user\appdata\local\temp\pcre-light-0.4.0.3-9072\pcre-light-0.4.0.3\dist\dist-sandbox-6710ae14\setup\main.o ) linking c:\users\user\appdata\local\temp\pcre-light-0.4.0.3-9072\pcre-light-0.4.0.3\dist/dist-sandbox-6710ae14\setup\setup.exe ... configuring pcre-light-0.4.0.3... setup.exe: missing dependency on foreign library: * missing c library: pcre problem can solved installing scheme bundle provides library (you may need "-dev" version). if library installed in non-standard location can utilize flags --extra-include-dirs= , --extra-lib-dirs= specify is. cabal.exe: error: packages failed install: pcre-light-0.4.0.3 failed during configure step. exception was: exitfailure 1
i need reply problem since suppose lot of people suffered it. clear scheme specification: windows 7 64-bit, ghc 7.8.3 64-bit, cabal 1.20.0.3
possible failure reasons:
1. missing c library 2.32-bit library incompatible 64-bit ghc. you need do: 1. kind company airesoft built pcre microsoft visual studio 2008. go http://www.airesoft.co.uk/pcre download pcre want or click http://www.airesoft.co.uk/files/pcre/pcre-8.33.zip download 8.33. (can upload sourceforge?) 2. alter file name pcre3.lib pcre.lib , pcreposix3.lib pcreposix.lib(i suppose file not needed in case.) copied file instead renaming directly, think both ways fine. 3. depending 32 or 64-bit ghc, need specify library , include. pcre-light requires pcre.h , pcre.lib. on machine run cabal install pcre-light --extra-lib-dirs=e:\\download\\pcre-8.33\\lib\\x64 --extra-include-dirs=e:\\download\\pcre-8.33\\incif ghc 32-bit remove \\x64 in above command
4. of course, need add together pcre3.dll scheme library path. copied c:\windows\system32 directory. (i not sure whether need rename pcre.dll, maintain both in case. create sure take right file since 32-bit dll crash on 64-bit machine , vice versa) open ghci should able import text.regex.pcre.light , seek invoke functions.i seek merge files pcre-light bundle within if possible. luck
haskell mingw cabal
Comments
Post a Comment