RE: (alpha) stick shift cabal install for GHC 6.12.1

2009-12-18 Thread Sittampalam, Ganesh
Dave Bayer wrote:

 There's clearly something wrong with this picture. A Rorschach blot
 test as to what's wrong, but I see people overreaching, if I have to
 wait weeks for a simple install tool, then months for the Haskell
 Platform to be ready.

Hopefully future GHC releases will go more smoothly as far as having
cabal-install ready is concerned. But generally I think it's right to
have a gap between a GHC major release and the corresponding HP release,
in which to plan and manage any migration required. In that gap only
library authors and users who don't mind some breakage would be expected
to use the new GHC.

Cheers,

Ganesh

=== 
 Please access the attached hyperlink for an important electronic 
communications disclaimer: 
 http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
 
=== 
 
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: (alpha) stick shift cabal install for GHC 6.12.1

2009-12-18 Thread Antoine Latter
On Thu, Dec 17, 2009 at 4:00 PM, Dave Bayer ba...@cpw.math.columbia.edu wrote:

 Background: I never got cabal install to work on OS X 10.5 with GHC 6.10.4, 
 basically because zlib wouldn't work. Odd, because a perfectly good version 
 of gunzip already exists on most platforms, and the code doesn't fall back to 
 this version if needed.


Do you have any more information about this failure? It seems like it
would be easier to get zlib to work than to replicate cabal-install.

My painful story of getting zlib to work on 10.6 is chronicled here:
http://www.haskell.org/pipermail/glasgow-haskell-users/2009-November/018068.html

But my problem should only have been an issue on OS X 10.6, not any
version lower.

Antoine
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: (alpha) stick shift cabal install for GHC 6.12.1

2009-12-18 Thread Duncan Coutts
On Thu, 2009-12-17 at 14:00 -0800, Dave Bayer wrote:

 Background: I never got cabal install to work on OS X 10.5 with GHC
 6.10.4, basically because zlib wouldn't work. Odd, because a perfectly
 good version of gunzip already exists on most platforms, and the code
 doesn't fall back to this version if needed.

Do you mean OSX 10.5 or 10.6. I've never heard of major problems on 10.5
and lots of problems on 10.6. The latter are all fixable.

The issue on 10.6 was that gcc defaults to compiling 64bit, but ghc
expects 32bit. The hack for ghc-6.10.4 was to change the wrapper script
to pass -optc-m32 -optl-m32. That's enough to get ghc working, but for
other packages that bind to foreign libs you also need to apply the same
trick to hsc2hs.

That's why so many people bumped into zlib not working, it was because
their hsc2hs was thinking it should be using 64bit when everything else
was expecting 32bit. That manifested in a zlib initialisation error
(because the structure size check fails).

So in short, the problems are not with cabal or zlib, you just need a
fully working ghc installation.

Duncan

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: (alpha) stick shift cabal install for GHC 6.12.1

2009-12-18 Thread Dave Bayer
On Dec 18, 2009, at 5:27 AM, Antoine Latter wrote:

 Do you have any more information about this failure? It seems like it
 would be easier to get zlib to work than to replicate cabal-install.

From http://www.reddit.com/r/haskell/comments/afz6n/cabalinstallpy/ :

dcoutts

BTW, the reason you could not get cabal-install working on your OSX 10.6 is 
because you did not have a fully working GHC installation and zlib (a dep of 
cabal-install) was the first thing to trip over this.

Since GHC-6.10.4 does not work out of the box on OSX 10.6 you followed some 
hints to modify the ghc wrapper script to pass the gcc flags -m32. The bit you 
missed is that you need to do the same for hsc2hs. Otherwise hsc2hs generates 
code that assumes you're targeting the 64bit ABI. That's why the zlib 
initialisation check fails, because the code calling zlib has been compiled for 
the wrong size of everything.

Syzygies

Bingo, that sounds right, it's a relief to know what happened.

There's plenty of advice on the web to just modify the ghc script itself for 
GHC-6.10.4 on OSX 10.6. I knew to modify more scripts, but I missed hsc2hs. I 
had gotten as far as figuring out that zlib itself was broken, and I had set up 
some sandbox clean development volume images for testing, when I noticed that 
GHC-6.12.1 was out. And that cabal-install wasn't ready 
yet.___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


(alpha) stick shift cabal install for GHC 6.12.1

2009-12-17 Thread Dave Bayer
I wrote the barest possible python script this morning as a poor-man's 
replacement for cabal install.

Here is the script cabal-install.py and a sample use, 
GLUT-2.2.2.0-install.sh :

http://hpaste.org/fastcgi/hpaste.fcgi/view?id=14367
http://hpaste.org/fastcgi/hpaste.fcgi/view?id=14368

I copy cabal-install.py to /usr/local/bin/cabal-install, and set the 
environment variable $CABAL to a directory of package sources which I manually 
download and maintain. For example, on my Mac OS X 10.6,

% echo $CABAL; cd $CABAL; ls -l GLUT-2.2.2.0

/Global/Code/Haskell/__Cabal/Packages/

total 1296
drwxr-xr-x  11 dave  admin 374 Dec 17 12:47 GLUT-2.2.2.0
-rwxr-xr-x@  1 dave  admin 165 Dec 17 12:20 GLUT-2.2.2.0-install.sh
-rw-r--r--   1 dave  admin  650235 Oct 26 14:12 GLUT-2.2.2.0.tar.gz
-rw-r--r--@  1 dave  admin  92 Dec 17 13:33 HackageDB- GLUT-2.2.2.0.webloc

cabal-install.py looks for package directories by exact name, including 
version numbers. It skips packages that are already installed, and stops on any 
error. My typical workflow is to edit the corresponding install.sh until I 
get the list and order of dependent packages right.

This is an alpha version; the code itself is clearer than my documentation 
here. If you thought about writing this and didn't yet, and can read my code, 
then you may want to experiment with this script. It surely got me unstuck on 
getting my projects to run under GHC 6.12.1. Any comments are welcome, as are 
suggestions for how to better share this script.



Background: I never got cabal install to work on OS X 10.5 with GHC 6.10.4, 
basically because zlib wouldn't work. Odd, because a perfectly good version of 
gunzip already exists on most platforms, and the code doesn't fall back to this 
version if needed.

Back when a bunch of libraries came with GHC, I didn't mind manually adding the 
few extra libraries I needed. Nevertheless, I tried to get cabal install 
working with OS X 10.6 and GHC 6.10.4, and again hit the zlib issue. Realizing 
I was a bad boy for not reporting the bug, I set up some Apple Software Restore 
images so I could quickly create sandbox development startup volumes, in hopes 
of isolating the problem.

Meanwhile, GHC 6.12.1 was released. Far fewer standard libraries made cabal 
install more critical, yet a compatible version hadn't been released. I darc'd 
the development head, but ran into other troubles.

There's clearly something wrong with this picture. A Rorschach blot test as to 
what's wrong, but I see people overreaching, if I have to wait weeks for a 
simple install tool, then months for the Haskell Platform to be ready. So I 
wrote something simpler. Not automatic, but a lot faster than installing by 
hand. Now I've made my peace with the GHC team's decision to get out of the 
library business.


___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


Re: (alpha) stick shift cabal install for GHC 6.12.1

2009-12-17 Thread Dave Bayer
I put up a web page with better directions, after some good experiences testing 
this script for my own use:

http://www.math.columbia.edu/~bayer/Haskell/cabal-install/

On Dec 17, 2009, at 2:00 PM, Dave Bayer wrote:

 I wrote the barest possible python script this morning as a poor-man's 
 replacement for cabal install.

___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users