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
<[EMAIL PROTECTED]> 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.
> 
> 

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to