<p>Ccing cabal-dev.</p>
<p>On Aug 17, 2011 9:12 AM, "Rogan Creswick" <<a href="mailto:creswick@gmail.com">creswick@gmail.com</a>> wrote:<br>
><br>
> On Wed, Aug 17, 2011 at 6:29 AM, Gang <<a href="mailto:yugang.bj@gmail.com">yugang.bj@gmail.com</a>> wrote:<br>
> ><br>
> > sorry to bother<br>
> ><br>
><br>
> Not in the least!<br>
><br>
> I was trying to figure out what problem you were encountering, and I<br>
> learned a lot. I never did recreate your problem, but in the process<br>
> I ran into a whole host of other annoyances and strange situations<br>
> relating to slightly broken cabal files and cabal build intricacies<br>
> that confound our existing tools.<br>
><br>
> I don't mean to pick on encoding or HaXml - I've seen the same kinds<br>
> of issues in many, many Haskell packages (including most of the<br>
> packages I've written myself) these are just the ones I ran into<br>
> today. (and I am quite serious when I say that writing a good Setup.hs<br>
> is very, very, difficult). My objective is just to motivate a minor<br>
> change to cabal that would help to make this easier.<br>
><br>
> On to the build problems:<br>
><br>
> encoding-0.6.6 uses it's own source during the build process! It<br>
> actually has to be partially compiled before the build tool can build<br>
> encoding (!). I'm *amazed* that this actually works at all<br>
> (impressed, too), and indeed, it doesn't work with cabal-dev, which is<br>
> unfortunate: cabal-dev would have identified one of the dependency<br>
> issues in HaXml 1.19 (pretty is an undocumented dependency, although I<br>
> am unsure if that was true at the time 1.19 and encoding-0.6.6 were<br>
> released. I haven't tracked the pretty dependency down to the exact<br>
> source - it could be a transitive dep introduced by a recent version<br>
> of something HaXml 1.19 needs. Per my subject line - this is<br>
> amazingly difficult - keep in mind that we're not talking about<br>
> building *packages*, this is just to build the *build tool*, and none<br>
> of this is documented. How long before it is effectively impossible<br>
> to recreate the circumstances that result in a successful<br>
> encoding-0.6.6 build?).<br>
><br>
> cabal-dev can't build encoding-0.6.6 because the encoding source that<br>
> is referenced from encoding's Setup.hs depends on (at least) HaXml >=<br>
> 1.19 && < 1.22.5; this is OK with cabal, since cabal-install installs<br>
> a necessary HaXml into your user package db prior to building<br>
> encoding's Setup.hs (modulo the missing upper version bound).<br>
> Therefore HaXml "just happens" to be visible when cabal builds<br>
> Setup.hs -- a build step that cabal-dev isn't capable of controlling<br>
> (and probably never will be -- we could intercept system calls, but<br>
> that's difficult when only supporting one OS, much less three).<br>
><br>
> You can, of course, manually install HaXml to your local package db<br>
> and then cabal-dev install encodings, but that's somewhat of a hack<br>
> (and you'll find that the current HaXml won't work for the current<br>
> encodings release, as Gang Yu did).<br>
><br>
> Adding a section to the cabal file that specifies build dependencies<br>
> for Setup.hs would make some very important parts of this process<br>
> obvious - and it would *greatly* assist in debugging failing builds,<br>
> not to mention allowing us to make use of the extensive libraries on<br>
> hackage to write more expressive build systems. (We could actually<br>
> use openshake in Setup.hs, once it's released, for example!)<br>
><br>
> I've floated the idea past a number of Haskell programmers with<br>
> positive responses, and there is a GSOC ticket that provides some more<br>
> details (the project was not selected - no students proposed to work<br>
> on it):<br>
><br>
> <a href="http://hackage.haskell.org/trac/summer-of-code/ticket/1602">http://hackage.haskell.org/trac/summer-of-code/ticket/1602</a><br>
><br>
> --Rogan<br>
><br>
> > Regards<br>
> > Gang<br>
> > On 08/17/2011 04:59 PM, Gang Yu wrote:<br>
> ><br>
> > hi, cafe:<br>
> ><br>
> > I go through to the encoding package installation problem again.<br>
> ><br>
> > cabal install encoding<br>
> > Resolving dependencies...<br>
> > /tmp/encoding-0.6.68093/encoding-0.6.6/dist/setup/setup: 4: Syntax error:<br>
> > ";" unexpected<br>
> ><br>
> > when I have a check on the this issue, I get:<br>
> ><br>
> > file<br>
> > ~/.cabal/packages/<a href="http://hackage.haskell.org/encoding/0.6.6/encoding-0.6.6/dist/setup/setup">hackage.haskell.org/encoding/0.6.6/encoding-0.6.6/dist/setup/setup</a><br>
> > /home/gang/.cabal/packages/<a href="http://hackage.haskell.org/encoding/0.6.6/encoding-0.6.6/dist/setup/setup">hackage.haskell.org/encoding/0.6.6/encoding-0.6.6/dist/setup/setup</a>:<br>
> > ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked<br>
> > (uses shared libs), for GNU/Linux 2.6.27, not stripped<br>
> ><br>
> > My machine is:<br>
> ><br>
> > gang@gang-laptop:~$ uname -a<br>
> > Linux gang-laptop 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC<br>
> > 2011 i686 i686 i386 GNU/Linux<br>
> ><br>
> > is this related? How can I manually install the package from scratch? Any<br>
> > helps or directs will be appreciated<br>
> ><br>
> > Thanks<br>
> > Gang<br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > Haskell-Cafe mailing list<br>
> > <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> > <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
> ><br>
> ><br>
><br>
> _______________________________________________<br>
> Haskell-Cafe mailing list<br>
> <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</p>