Re: trouble compiling regex posix head (I think >0.92) on ghc 6.7

I darcs pulled cabal head to get latest cabal, removed -Werror from
GHC-Options in the cabal file, removed HsRegexPosixConfig.h and tried
again with the same result.
It seems to really want that file. With, it installs, without, no install.
$ darcs whatsnew
{
hunk ./regex-posix.cabal 16
-Build-Depends: regex-base >= 0.80, base >= 2.0
+Build-Depends: regex-base >= 0.80, base >= 2.0, array,
containers, byt
estring
hunk ./regex-posix.cabal 32
-GHC-Options: -Wall -Werror -O2
+GHC-Options: -Wall -O2
hunk ./regex-posix.cabal 43
-Include-Dirs: include
+Include-Dirs: include/regex
}
Chris Kuklewicz
I'm trying to compile regex-posix on ghc 6.7. (Ultimate goal: happs on 6.7).
I have not explored ghc 6.7. You should also try posting on the
First, I patched by changing the cabal file to be compatible with the new libraries broken out of base. I also had to add HsRegexPosixConfig.h to include/regex (I just copied it from somewhere else on my hard drive where I guess it had been put by an earlier regex-posix install, I don't know if it's compatible here but at least it permitted things to compile further.)
I had no idea what HsRegexPosixConfig was, and I have no such file at all. So I looked in Wrap.hsc and found:
#ifdef HAVE_REGEX_H #define HAVE_REGCOMP 1 #else #ifndef __NHC__ #include "HsRegexPosixConfig.h" #else #define HAVE_REGEX_H 1 #define HAVE_REGCOMP 1 #endif #endif
Note that I did not write that section -- that was added by someone else. So HsRegexPosixConfig.h should only matter if HAVE_REGEX_H is undefined. The regex-base.cabal file says: "CC-Options: -DHAVE_REGEX_H" So unless Cabal is having a very very bad day, I assume that HsRegexPosixConfig.h is never needed. That it matters to your build to have that file seems _wrong_ to me. The only header file it should need is "regex.h"
Setup.hs build -v3 had a lot of warnings but didn't seem to fail. However, Setup.hs install -v3 didn't work.
You might try to change the cabal file. Currently I think it is "GHC-Options: -Wall -Werror -O2" and remove -Werror "GHC-Options: -Wall -O2" And you can change the cabal "Include-Dirs" to point to wherever it will find "regex.h"
the problem in build seems to occur around "upsweep partially failed or main not exported"...
That means nothing to me.
[6 of 6] Compiling Text.Regex.Posix ( Text/Regex/Posix.hs, dist/build/Text/Regex/Posix.o ) *** Parser: *** Renamer/typechecker:
Text/Regex/Posix.hs:57:2: Warning: The export item `module Text.Regex.Posix.String' exports nothing
Text/Regex/Posix.hs:59:2: Warning: The export item `module Text.Regex.Posix.Sequence' exports nothing
Text/Regex/Posix.hs:61:2: Warning: The export item `module Text.Regex.Posix.ByteString' exports nothing
Text/Regex/Posix.hs:63:2: Warning: The export item `module Text.Regex.Posix.ByteString.Lazy' exports nothing
Those warning are slightly bogus. Including the module should export the instances.
*** Deleting temp files: Deleting: /tmp/ghc9618_0/ghc9618_0.s Warning: deleting non-existent /tmp/ghc9618_0/ghc9618_0.s Upsweep partially successful. *** Deleting temp files: Deleting: link(batch): upsweep (partially) failed OR Main.main not exported; not linking. *** Deleting temp files: Deleting: *** Deleting temp dirs: Deleting: /tmp/ghc9618_0
complete output (along with patch) is attached.
I'd appreciate any advice.
best, thomas.
--- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

On Thu, Aug 30, 2007 at 07:04:21PM -0400, Thomas Hartman wrote:
I had no idea what HsRegexPosixConfig was, and I have no such file at all.
I believe autoreconf will make HsRegexPosixConfig.h.in, and configure will then make HsRegexPosixConfig.h.
Text/Regex/Posix.hs:57:2: Warning: The export item `module Text.Regex.Posix.String' exports nothing
Those warning are slightly bogus. Including the module should export the instances.
You don't need to explicitly export instances; they are exported whether you want them to be or not. Thanks Ian
participants (2)
-
Ian Lynagh
-
Thomas Hartman