regex-compat on latest Haskell Platform

I'm running Haskel Platform 2010.2.0.0 and attempting to compile with regex-compat under Windows XP. The link stage fails with a number of lines of the form: D:\Program Files\Haskell Platform\2010.2.0.0\lib\extralibs\regex- posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):fake:(.text +0x493): undefined reference to `regerror' I have googled for a solution but cannot see a fix anywhere. Any suggestions? Kevin

I have found this project:
http://gnuwin32.sourceforge.net/packages/regex.htm
and downloaded the DLL.
But just placing this in Windows/System32 does nothing.
Kevin
On Aug 17, 11:00 am, Kevin Jardine
I'm running Haskel Platform 2010.2.0.0 and attempting to compile with regex-compat under Windows XP.
The link stage fails with a number of lines of the form:
D:\Program Files\Haskell Platform\2010.2.0.0\lib\extralibs\regex- posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):fake:(.text +0x493): undefined reference to `regerror'
I have googled for a solution but cannot see a fix anywhere.
Any suggestions?
Kevin _______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe

Hi Kevin Are you trying to compile a program using regex-posix or compiling and installing an update of regex-posix (which is already in the Platform)? If you are compiling a program that uses regex-posix, you shouldn't need to install other DLLs as the relevant libraries (.a and .o files) are distributed with the Platform. For what its worth, Regex-posix worked fine with Platform 2009.2.0.2. I follow GHC releases rather than Platform ones, so I don't know about later versions. Best wishes Stephen

I was assuming that regex would work properly with the latest Haskell
Platform so I haven't attempted to re-install it.
However as I mentioned above, attempting to compile a program that
uses regex fails with linker errors on my Windows XP machine.
Any ideas on how I can fix this problem?
Kevin
On Aug 17, 1:35 pm, Stephen Tetley
Hi Kevin
Are you trying to compile a program using regex-posix or compiling and installing an update of regex-posix (which is already in the Platform)?
If you are compiling a program that uses regex-posix, you shouldn't need to install other DLLs as the relevant libraries (.a and .o files) are distributed with the Platform.
For what its worth, Regex-posix worked fine with Platform 2009.2.0.2. I follow GHC releases rather than Platform ones, so I don't know about later versions.
Best wishes
Stephen _______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe

On 17 August 2010 12:45, Kevin Jardine
I was assuming that regex would work properly with the latest Haskell Platform so I haven't attempted to re-install it.
Yes - its wise not to upgrade platform components, especially on Windows.
However as I mentioned above, attempting to compile a program that uses regex fails with linker errors on my Windows XP machine.
Any ideas on how I can fix this problem?
What command are you using for ghc? With Platform 2009.2.0.2, I've tested a simple regex example with just / ghc --make ModuleName / - it compiled and ran under both MinGW and the Windows prompt. Also does can you launch with runhaskell on the Main module?

I'm running
cabal install
for the program that uses regex-compat. runhaskell doesn't work
because compiling the code requires library information in the cabal
file.
I've also tried to run something similar using ghci on the same
machine and it also fails with a similar error.
Kevin
On Aug 17, 1:54 pm, Stephen Tetley
On 17 August 2010 12:45, Kevin Jardine
wrote: I was assuming that regex would work properly with the latest Haskell Platform so I haven't attempted to re-install it.
Yes - its wise not to upgrade platform components, especially on Windows.
However as I mentioned above, attempting to compile a program that uses regex fails with linker errors on my Windows XP machine.
Any ideas on how I can fix this problem?
What command are you using for ghc?
With Platform 2009.2.0.2, I've tested a simple regex example with just / ghc --make ModuleName / - it compiled and ran under both MinGW and the Windows prompt.
Also does can you launch with runhaskell on the Main module? _______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe

Hi Kevin Is it a library on Hackage? I'll take a look if the dependencies aren't too deep...

ghci GHCi, version 6.12.3: http://www.haskell.org/ghc/ :? for help Loading package ghc-prim ... linking ... done. Loading package integer-gmp ... linking ... done. Loading package base ... linking ... done. Loading package ffi-1.0 ... linking ... done. Prelude> :mod Text.Regex.Posix Prelude Text.Regex.Posix> "hi" =~ "hi" :: Bool Loading package array-0.3.0.1 ... linking ... done. Loading package bytestring-0.9.1.7 ... linking ... done. Loading package containers-0.3.0.0 ... linking ... done. Loading package syb-0.1.0.2 ... linking ... done. Loading package base-3.0.3.2 ... linking ... done. Loading package mtl-1.1.0.2 ... linking ... done. Loading package regex-base-0.93.2 ... linking ... done. Loading package regex-posix-0.94.2 ... linking ... <interactive>: D: \PROGRA~1\HA SKEL~1\201020~1.0\lib\extralibs\regex-posix-0.94.2\ghc-6.12.3\HSregex-
No, it's my own code.
But in ghci even the simplest =~ fails on my machine.
Here's a complete transcript:
posix-0.94
.2.o: unknown symbol `_regerror'
: unable to load package `regex-posix-0.94.2'
Prelude Text.Regex.Posix>
On Aug 17, 2:05 pm, Stephen Tetley
Hi Kevin
Is it a library on Hackage? I'll take a look if the dependencies aren't too deep... _______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe

Hi Kevin I've just installed Platform-2010.2.0.0 and I'm getting the symbol error on the file that I could compile with Platform2009.2.0.2. So I'd say it is a bug with the Platform, also it looks like the error was acknowledged on the Platform mailing list last week. $ /c/ghc/HP/2010.2.0.0/bin/ghc --make OutlineGrep.lhs [1 of 1] Compiling Main ( OutlineGrep.lhs, OutlineGrep.o ) Linking OutlineGrep.exe ... C:\ghc\HP\2010.2.0.0\lib\extralibs\regex-posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):f ake:(.text+0x493): undefined reference to `regerror' C:\ghc\HP\2010.2.0.0\lib\extralibs\regex-posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):f ake:(.text+0x4e7): undefined reference to `regerror' etc.

yep
now I see it:
http://trac.haskell.org/haskell-platform/ticket/137
Next time I'll check the bug tracker as well as Google before posting
here!
Thanks.
Kevin
On Aug 17, 2:37 pm, Stephen Tetley
Hi Kevin
I've just installed Platform-2010.2.0.0 and I'm getting the symbol error on the file that I could compile with Platform2009.2.0.2.
So I'd say it is a bug with the Platform, also it looks like the error was acknowledged on the Platform mailing list last week.
$ /c/ghc/HP/2010.2.0.0/bin/ghc --make OutlineGrep.lhs [1 of 1] Compiling Main ( OutlineGrep.lhs, OutlineGrep.o ) Linking OutlineGrep.exe ... C:\ghc\HP\2010.2.0.0\lib\extralibs\regex-posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):f ake:(.text+0x493): undefined reference to `regerror' C:\ghc\HP\2010.2.0.0\lib\extralibs\regex-posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):f ake:(.text+0x4e7): undefined reference to `regerror'
etc. _______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe

The bug tracker recommended just installing from Hackage so with some
trepidation I typed:
cabal install regex-posix
and everything now works as expected!
So sorry for the waste of bandwidth.
At least this thread is now in Google.
Kevin
On Aug 17, 3:06 pm, Kevin Jardine
yep
now I see it:
http://trac.haskell.org/haskell-platform/ticket/137
Next time I'll check the bug tracker as well as Google before posting here!
Thanks.
Kevin
On Aug 17, 2:37 pm, Stephen Tetley
wrote: Hi Kevin
I've just installed Platform-2010.2.0.0 and I'm getting the symbol error on the file that I could compile with Platform2009.2.0.2.
So I'd say it is a bug with the Platform, also it looks like the error was acknowledged on the Platform mailing list last week.
$ /c/ghc/HP/2010.2.0.0/bin/ghc --make OutlineGrep.lhs [1 of 1] Compiling Main ( OutlineGrep.lhs, OutlineGrep.o ) Linking OutlineGrep.exe ... C:\ghc\HP\2010.2.0.0\lib\extralibs\regex-posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):f ake:(.text+0x493): undefined reference to `regerror' C:\ghc\HP\2010.2.0.0\lib\extralibs\regex-posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):f ake:(.text+0x4e7): undefined reference to `regerror'
etc. _______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe
_______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe

Hi Kevin,
Kevin Jardine
I'm running Haskel Platform 2010.2.0.0 and attempting to compile with regex-compat under Windows XP. [...]
Apparently, you've been bitten by a bug in the installer: http://trac.haskell.org/haskell-platform/ticket/137 I haven't updated the installer yet, but in the meantime you can install regex-posix from Hackage (there is a new version out that should work on Windows out of the box). Do a 'cabal install regex-posix' followed by 'cabal install --reinstall regex-compat'.

kevinjardine:
I'm running Haskel Platform 2010.2.0.0 and attempting to compile with regex-compat under Windows XP.
The link stage fails with a number of lines of the form:
D:\Program Files\Haskell Platform\2010.2.0.0\lib\extralibs\regex- posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):fake:(.text +0x493): undefined reference to `regerror'
I have googled for a solution but cannot see a fix anywhere.
Looks like possibly missing regex.h header files (from the regex C library) On Windows? -- Don

Mikhail and Don,
All I needed to do was to type:
cabal install regex-posix
and everything now works as expected.
As Mikhail also mentioned this problem is already in the Haskell
Platform bug tracker.
Kevin
On Aug 18, 5:17 am, Don Stewart
kevinjardine:
I'm running Haskel Platform 2010.2.0.0 and attempting to compile with regex-compat under Windows XP.
The link stage fails with a number of lines of the form:
D:\Program Files\Haskell Platform\2010.2.0.0\lib\extralibs\regex- posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):fake:(.text +0x493): undefined reference to `regerror'
I have googled for a solution but cannot see a fix anywhere.
Looks like possibly missing regex.h header files (from the regex C library) On Windows?
-- Don _______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe

I maintain the regex-posix package, so I feel the need for a quick post. I am glad the recent patch I accepted means the hackage version is working on Windows. If there is any additional things that need to be done with regex-* please let me know. Cheers, Chris. On 18/08/2010 06:38, Kevin Jardine wrote:
Mikhail and Don,
All I needed to do was to type:
cabal install regex-posix
and everything now works as expected.
As Mikhail also mentioned this problem is already in the Haskell Platform bug tracker.
Kevin
On Aug 18, 5:17 am, Don Stewart
wrote: kevinjardine:
I'm running Haskel Platform 2010.2.0.0 and attempting to compile with regex-compat under Windows XP.
The link stage fails with a number of lines of the form:
D:\Program Files\Haskell Platform\2010.2.0.0\lib\extralibs\regex- posix-0.94.2\ghc-6.12.3/libHSregex-posix-0.94.2.a(Wrap.o):fake:(.text +0x493): undefined reference to `regerror'
I have googled for a solution but cannot see a fix anywhere.
Looks like possibly missing regex.h header files (from the regex C library) On Windows?
-- Don _______________________________________________ Haskell-Cafe mailing list Haskell-C...@haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe
participants (5)
-
Chris Kuklewicz
-
Don Stewart
-
Kevin Jardine
-
Mikhail Glushenkov
-
Stephen Tetley