
I'm having trouble building regex-posix for Windows under MinGW because MinGW does not include regex.h. As far as I know Haskell Platform uses MinGW and it includes regex-posix. I'd like to build regex-posix by myself, like Haskell Platform does. I would appreciate it if someone suggests some resources about building regex-posix and other packages for windows. I’m also looking for Haskell Platform developer’s blog or something similar, where I can read about porting Haskell on Windows. Thanks.

Hello You can build GNU's regex C-library with MinGW from source and this will give you regex.h and libregex.a / libregex.dll. I think I've only had the Haskell regex-posix package half-working doing this though; i.e. I could build and install regex-posix after I'd made and installed GNU regex, but when I tried to use (Haskell) packages that depended on (Haskell) regex-posix I got linker errors. As I could live without the dependent packages I never investigated further. Best wishes Stephen

16.04.2010 3:07, Stephen Tetley ?????:
Hello
You can build GNU's regex C-library with MinGW from source and this will give you regex.h and libregex.a / libregex.dll.
I think I've only had the Haskell regex-posix package half-working doing this though; i.e. I could build and install regex-posix after I'd made and installed GNU regex, but when I tried to use (Haskell) packages that depended on (Haskell) regex-posix I got linker errors. As I could live without the dependent packages I never investigated further.
Best wishes
Stephen _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Thanks, it works. Some tests from regex-posix-unittest still fail, but I think this is because of my regex implementation. If you interested in using regex-posix on Windows, this is what I actually did to make it work: Firs I've downloaded regex library from http://mingw.cvs.sourceforge.net/mingw/regex/ and built it with default parameters. This gave me libgnurx-0.dll. Than I've downloaded regex-posix from hackage, added reference to libgnurx to the cabal file, built and install. At this point I was able to build and run regex-posix-unittest, but GHCi still didn't want to load the library. I've copied libgnurx-0.dll into the GHC's /bin directory and renamed it to libgnurx.dll. After this GHCi has started work. I use GHC 6.12.2 on Windows Server Web 2008, regex-posix is 0.94.1. I think it would be nice if someone will write an article on Haskell Wiki on building regex-posix, but my English is not good enough for such things.

On Montag 03 Mai 2010 21:40:13, Stanislav Chernichkin wrote:
I think it would be nice if someone will write an article on Haskell Wiki on building regex-posix, but my English is not good enough for such things.
You could start the article nevertheless and let others polish the English then. I think it's more important to have the information than that it is written in immaculate language. And your English is good enough that it will be understandable.

2010/4/15 Станислав Черничкин
I'm having trouble building regex-posix for Windows under MinGW because MinGW does not include regex.h. As far as I know Haskell Platform uses MinGW and it includes regex-posix. I'd like to build regex-posix by myself, like Haskell Platform does. I would appreciate it if someone suggests some resources about building regex-posix and other packages for windows. I'm also looking for Haskell Platform developer's blog or something similar, where I can read about porting Haskell on Windows. Thanks.
I don't know the answer to your regex-posix question, but if you're looking for Haskell friendly blogs, try: http://planet.haskell.org Is it what you would have expected from a Haskell Platform Developer's blog? If not, what were you hoping to find? Thanks, Jason

Станислав Черничкин
I'm having trouble building regex-posix for Windows under MinGW because MinGW does not include regex.h.
Which version of regex-posix is this? I think this might be a bug in regex-posix's .cabal file: the darcs repo seems to contain a regex.h which should probably be included and used on Windows.
As far as I know Haskell Platform uses MinGW and it includes regex-posix.
I'm not sure if it uses MinGW or Cygwin. -- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com IvanMiljenovic.wordpress.com

Hi Ivan I believe that regex-posix (Haskell) is expecting regex.h to be the 'standard posix' header file. The versions of MinGW / MSys I'm using from around Christmas last year didn't ship with a Posix regex implementation, though this might have changed now. I seem to remember that GNU Posix was available as a package from the MinGW website, but there was some reason I choose to work from the GNU source tarball instead (what ever it was, I've now forgotten). Its certainly possible the original poster doesn't have a Posix regex implementation under MinGW either - I can't find the darcs repo to check, but I think MinGW would need more than a header file. Best wishes Stephen

Hi,
Станислав Черничкин
I'm having trouble building regex-posix for Windows [...]
See this thread: http://thread.gmane.org/gmane.comp.lang.haskell.libraries/12721 Basically, you need to checkout the darcs version which includes C sources for libregex and hack the .cabal file a bit.
participants (7)
-
Daniel Fischer
-
Ivan Lazar Miljenovic
-
Jason Dagit
-
Mikhail Glushenkov
-
Stanislav Chernichkin
-
Stephen Tetley
-
Станислав Черничкин