[Haskell-cafe] Re: trouble compiling regex posix head (I think >0.92) on ghc 6.7

Thomas Hartman thomas.hartman at db.com
Thu Aug 30 19:04:21 EDT 2007


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 <haskell at list.mightyreason.com> 
08/30/2007 12:34 PM

To
Thomas Hartman/ext/dbcom at DBAmericas
cc
haskell-cafe at haskell.org, "cvs-ghc at haskell.org" <cvs-ghc at haskell.org>
Subject
Re: trouble compiling regex posix head (I think >0.92) on ghc 6.7






Thomas Hartman wrote:
> 
> 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
<glasgow-haskell-users at haskell.org> mailing list.

> 
> 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070830/0af48def/attachment-0001.htm


More information about the Haskell-Cafe mailing list