[Haskell-cafe] Re: Compiling regex-posix-0.93.2 on windows
Paulo Tanimoto
tanimoto at arizona.edu
Thu Jan 15 12:10:57 EST 2009
Hi Chris et al:
On Fri, Oct 17, 2008 at 4:33 PM, Chris Kuklewicz
<haskell at list.mightyreason.com> wrote:
> I am not sure what is going wrong. I have not been using Haskell on
> windows. I am also copying this reply to haskell-cafe and libaries mailing
> lists. Does anyone know?
I get passed that error on Cygwin by installing it like this:
$ cabal update
$ cabal install --extra-include-dirs="c:\cygwin\usr\include" regex-posix
However, when I try using regex-posix, I get:
$ ghci
GHCi, version 6.10.1: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
Prelude> import Text.Regex.Posix
Prelude Text.Regex.Posix> "Hello World" =~ "W" :: String
Loading package syb ... linking ... done.
Loading package base-3.0.3.0 ... linking ... done.
Loading package array-0.2.0.0 ... linking ... done.
Loading package containers-0.2.0.0 ... linking ... done.
Loading package bytestring-0.9.1.4 ... linking ... done.
Loading package mtl-1.1.0.2 ... linking ... done.
Loading package regex-base-0.93.1 ... linking ... done.
Loading package regex-posix-0.93.2 ... linking ... ghci-haskeline.exe:
unable to load package `regex-posix-0.93.2'
Prelude Text.Regex.Posix> :q
Leaving GHCi.
<interactive>:
C:\Program Files\Haskell\regex-posix-0.93.2\ghc-6.10.1\HSregex-posix-0.93.2.o:
unknown symbol `_regerror'
Compiling reveals more details:
$ cat > reg.hs << EOF
> import Text.Regex.Posix
>
> test = "Hello World!" =~ "W" :: String
>
> main = putStrLn test
> EOF
$ ghc --make reg.hs
Linking reg.exe ...
C:\Program Files\Haskell\regex-posix-0.93.2\ghc-6.10.1/libHSregex-posix-0.93.2.a(Wrap.o):fake:(.text+0xa2f):
undefined reference to `regerror'
C:\Program Files\Haskell\regex-posix-0.93.2\ghc-6.10.1/libHSregex-posix-0.93.2.a(Wrap.o):fake:(.text+0xa83):
undefined reference to `regerror'
C:\Program Files\Haskell\regex-posix-0.93.2\ghc-6.10.1/libHSregex-posix-0.93.2.a(Wrap.o):fake:(.text+0xb6b):
undefined reference to `regfree'
C:\Program Files\Haskell\regex-posix-0.93.2\ghc-6.10.1/libHSregex-posix-0.93.2.a(Wrap.o):fake:(.text+0xd39):
undefined reference to `regcomp'
C:\Program Files\Haskell\regex-posix-0.93.2\ghc-6.10.1/libHSregex-posix-0.93.2.a(Wrap.o):fake:(.text+0xf8f):
undefined reference to `regexec'
C:\Program Files\Haskell\regex-posix-0.93.2\ghc-6.10.1/libHSregex-posix-0.93.2.a(Wrap.o):fake:(.text+0x3656):
undefined reference to `regexec'
C:\Program Files\Haskell\regex-posix-0.93.2\ghc-6.10.1/libHSregex-posix-0.93.2.a(Wrap.o):fake:(.text+0x3aaa):
undefined reference to `regexec'
C:\Program Files\Haskell\regex-posix-0.93.2\ghc-6.10.1/libHSregex-posix-0.93.2.a(Wrap.o):fake:(.text+0x3e06):
undefined reference to `regexec'
C:\Program Files\Haskell\regex-posix-0.93.2\ghc-6.10.1/libHSregex-posix-0.93.2.a(Wrap.o):fake:(.text+0x4bcd):
undefined reference to `regexec'
C:\Program Files\Haskell\regex-posix-0.93.2\ghc-6.10.1/libHSregex-posix-0.93.2.a(Wrap.o):fake:(.text+0x512e):
more undefined references to `regexec' follow
collect2: ld returned 1 exit status
Any ideas? I feel like I'm missing something very simple.
Thanks,
Paulo
More information about the Haskell-Cafe
mailing list