Compiling regex-posix on Windows

Mikhail Glushenkov the.dead.shall.rise at gmail.com
Fri Mar 26 08:13:14 EDT 2010


Hi,

On Fri, Mar 26, 2010 at 10:25 AM, Simon Marlow <marlowsd at gmail.com> wrote:
>
> The darcs repository is at http://code.haskell.org/regex-posix.  I suggest
> grabbing that version and using it for the Windows platform build. (don't
> forget to autoconf!)

No luck with that version either. First it complained about the
absence of HsRegexPosixConfig.h, and then failed when compiling
Wrap.hsc (see below). This can be cured by putting MinGW's regex.h and
libregex.a into $GHC_DIR/mingw/{include, lib}, but then I get the
aforementioned runtime error when trying to actually use
Text.Regex.Posix functions.

Preprocessing library regex-posix-0.94.0...
Text\Regex\Posix\Wrap.hsc:105:19: regex.h: No such file or directory
Text\Regex\Posix\Wrap.hsc: In function `main':
Text\Regex\Posix\Wrap.hsc:379: error: `REG_NOTBOL' undeclared (first use in this
 function)
Text\Regex\Posix\Wrap.hsc:379: error: (Each undeclared identifier is reported on
ly once
Text\Regex\Posix\Wrap.hsc:379: error: for each function it appears in.)
Text\Regex\Posix\Wrap.hsc:380: error: `REG_NOTEOL' undeclared (first use in this
 function)
Text\Regex\Posix\Wrap.hsc:384: error: `REG_EXTENDED' undeclared (first use in th
is function)
Text\Regex\Posix\Wrap.hsc:385: error: `REG_ICASE' undeclared (first use in this
function)
Text\Regex\Posix\Wrap.hsc:386: error: `REG_NOSUB' undeclared (first use in this
function)
Text\Regex\Posix\Wrap.hsc:387: error: `REG_NEWLINE' undeclared (first use in thi
s function)
Text\Regex\Posix\Wrap.hsc:393: error: `REG_NOMATCH' undeclared (first use in thi
s function)
Text\Regex\Posix\Wrap.hsc:394: error: `REG_BADBR' undeclared (first use in this
function)
Text\Regex\Posix\Wrap.hsc:395: error: `REG_BADPAT' undeclared (first use in this
 function)
Text\Regex\Posix\Wrap.hsc:396: error: `REG_BADRPT' undeclared (first use in this
 function)
Text\Regex\Posix\Wrap.hsc:397: error: `REG_ECOLLATE' undeclared (first use in th
is function)
Text\Regex\Posix\Wrap.hsc:398: error: `REG_ECTYPE' undeclared (first use in this
 function)
Text\Regex\Posix\Wrap.hsc:399: error: `REG_EESCAPE' undeclared (first use in thi
s function)
Text\Regex\Posix\Wrap.hsc:400: error: `REG_ESUBREG' undeclared (first use in thi
s function)
Text\Regex\Posix\Wrap.hsc:401: error: `REG_EBRACK' undeclared (first use in this
 function)
Text\Regex\Posix\Wrap.hsc:402: error: `REG_EPAREN' undeclared (first use in this
 function)
Text\Regex\Posix\Wrap.hsc:403: error: `REG_EBRACE' undeclared (first use in this
 function)
Text\Regex\Posix\Wrap.hsc:404: error: `REG_ERANGE' undeclared (first use in this
 function)
Text\Regex\Posix\Wrap.hsc:405: error: `REG_ESPACE' undeclared (first use in this
 function)
Text\Regex\Posix\Wrap.hsc:442: error: `regex_t' undeclared (first use in this fu
nction)
Text\Regex\Posix\Wrap.hsc:476: error: syntax error before ')' token
Text\Regex\Posix\Wrap.hsc:479: error: `regmatch_t' undeclared (first use in this
 function)
Text\Regex\Posix\Wrap.hsc:505: error: syntax error before ')' token
Text\Regex\Posix\Wrap.hsc:505: error: `regoff_t' undeclared (first use in this f
unction)
Text\Regex\Posix\Wrap.hsc:505: error: syntax error before "int"
Text\Regex\Posix\Wrap.hsc:506: error: syntax error before ')' token
Text\Regex\Posix\Wrap.hsc:506: error: syntax error before "int"
Text\Regex\Posix\Wrap.hsc:520: error: syntax error before ')' token
compiling dist\build\Text\Regex\Posix\Wrap_hsc_make.c failed
command was: E:\ghc\ghc-6.12.1\mingw\bin\gcc.exe -c -D__GLASGOW_HASKELL__=612 -D
HAVE_REGEX_H -DSPLIT_BASE=1 -IE:\ghc\ghc-6.12.1\bytestring-0.9.1.5\include -IE:\
ghc\ghc-6.12.1\base-4.2.0.0\include -IE:\ghc\ghc-6.12.1/include -IE:\ghc\ghc-6.1
2.1/include -IE:/ghc/ghc-6.12.1/lib/include/ dist\build\Text\Regex\Posix\Wrap_hs
c_make.c -o dist\build\Text\Regex\Posix\Wrap_hsc_make.o

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments


More information about the Libraries mailing list