unable to load package `regex-posix-0.94.2' (On Vista x64)

I am using Vista x64. I have Haskell platform installed (Latest varsion -available for Windows, 2010.2.0.0, GHC 6.12.3). When I am trying to run picnic.hs from "How To Organize a Picnic on a Computer" tutorial. I get this: C:\...>runhaskell picnic.hs picnic.hs:46:18: Warning: accepting non-standard pattern guards (use - XPatternGuards to suppr ess this message) Just [x, y] <- matchRegex (mkRegex "([0-9.]+), ([0-9.]+)") s picnic.hs:181:21: Warning: accepting non-standard pattern guards (use - XPatternGuards to suppr ess this message) Just (_, e) <- find ((== p) . fst) a picnic.hs: C:\Program Files (x86)\Haskell Platform\2010.2.0.0\lib \extralibs\rege x-posix-0.94.2\ghc-6.12.3\HSregex-posix-0.94.2.o: unknown symbol `_regerror' picnic.hs: picnic.hs: unable to load package `regex-posix-0.94.2' I have tried to update using (cmd is running as administrator): C:\Windows\system32>cabal update Downloading the latest package list from hackage.haskell.org And then installing package using cabal: C:\Windows\system32>cabal install regex-posix [--reinstall] --global Resolving dependencies... Configuring regex-posix-0.94.4... Preprocessing library regex-posix-0.94.4... Building regex-posix-0.94.4... [1 of 6] Compiling Text.Regex.Posix.Wrap ( dist\build\Text\Regex\Posix \Wrap.hs, dist\build\Text\Regex\Posix\Wrap.o ) [2 of 6] Compiling Text.Regex.Posix.String ( Text\Regex\Posix \String.hs, dist\bu ild\Text\Regex\Posix\String.o ) [3 of 6] Compiling Text.Regex.Posix.Sequence ( Text\Regex\Posix \Sequence.hs, dis t\build\Text\Regex\Posix\Sequence.o ) [4 of 6] Compiling Text.Regex.Posix.ByteString ( Text\Regex\Posix \ByteString.hs, dist\build\Text\Regex\Posix\ByteString.o ) [5 of 6] Compiling Text.Regex.Posix.ByteString.Lazy ( Text\Regex\Posix \ByteStrin g\Lazy.hs, dist\build\Text\Regex\Posix\ByteString\Lazy.o ) [6 of 6] Compiling Text.Regex.Posix ( Text\Regex\Posix.hs, dist\build \Text\Regex \Posix.o ) Registering regex-posix-0.94.4... Installing library in C:\Program Files (x86)\Haskell\regex-posix-0.94.4\ghc-6.12.3 Registering regex-posix-0.94.4... And why the cabal package installs at "C:\Program Files (x86)\Haskell"? Shouldn't it be "C:\Program Files (x86)\Haskell Platform\2010.2.0.0"? Thanks

Any workarounds? Regex is an essential thing for any serious programming (wow! :). So what should I do? Thanks

Hi!
More information, please :)
(and I'd advise you to rather use regex-tdfa instead - regex-posix is dog slow)
2010/12/20 __kaveh__
Any workarounds? Regex is an essential thing for any serious programming (wow! :). So what should I do?
Thanks
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Eugene Kirpichov Senior Software Engineer, Grid Dynamics http://www.griddynamics.com/

I think broken posix-regex is a known issue with the last release of the Platform on Windows. Although I haven't tried myself, I think it can be fixed by upgrading with cabal - although regex-posix is a FFI binding, in this case all the parts (headers and C library) are bundled with the platform so it doesn't need Cygwin or MinGW / MSys.

On 20 December 2010 21:24, Stephen Tetley
Although I haven't tried myself, I think it can be fixed by upgrading with cabal - [SNIP]
To be explicit - that's upgrading just regex-posix with Cabal not the whole Platform.

Thanks; but as in 1st post cabal update and install does not work and have some strange issues like: it shows that the new version is installed; but the old version is still in use and new version is also in a new directory other that Haskell platform directory.

Maybe you want to hide the old version of regex-posix:
ghc-pkg hide regex-posix-0.94.2
http://www.haskell.org/ghc/docs/7.0.1/html/users_guide/packages.html Note - I don't use cabal install myself so this might not be the right way to do things, however "ghc-pkg hide ..." is reversible with "ghc-pkg expose ..." so I can't see it doing any harm.
participants (3)
-
__kaveh__
-
Eugene Kirpichov
-
Stephen Tetley