[Fedora-haskell-list] RFE: GHC packaging improvement proposal

Lorenzo Villani lvillani at binaryhelix.net
Fri Dec 4 15:55:58 UTC 2009


An hearty 'hello' to Haskell SIG folks!

I am a newcomer to Haskell (thanks to xmonad) and I plan to do some serious 
things with it (as soon as I get proficient with this elegant FP language).

During the last two-three weeks I've been secretly working on the GHC package 
(6.12). As you know, GHC can now create shared libraries so I deemed that a 
little change in the .spec file was necessary.


____________________________________
PROPOSED LAYOUT

 * ghc: contains only the compiler, tools (such as ghc-pkg, etc) and 
libHSrts.a which seems to be (statically) linked in every application. In 
general: stuff needed only at compile time.

 * ghc-libs (and ghc-libs-static): contains the dynamic version of libHSghc 
which is *HUGE* (and I guess it's needed only by programs which want to access 
GHC internals -- I don't have it installed and xmonad, xmobar and such things 
work).

 * ghc-common: This subpackage contains packages.d/*.config files and owns core 
library directories, it is (mostly) empty and is required by ghc-runtime and 
ghc-runtime-static.

 * ghc-runtime (and ghc-runtime-static): nothing to say, it contains just the 
core libraries and their interface files (.hi/.dyn_hi)

 * ghc-prof: contains profiled (static) libraries, including the huge libHSghc. 
This is the biggest and monolithic package.


___________________________________________
NOTES

 + cabal-install 0.7.5 (from darcs) seems to work decently with this GHC 
release.
 + X11 library has problems with hsc2hs (one file has to be converted to UTF-8 
before building the package)
 + ghc-libs-static and ghc-runtime-static Require ghc (these are useless 
without a compiler) while ghc-libs and ghc-runtime don't.
 + I decided to take libHSghc off the runtime package(s) because of its huge 
size and because it is not generally needed by other libraries/applications, 
thus making the runtime package small:

[lvillani at enterprise x86_64]$ du -h *
24M     ghc-6.12.0.20091201-1.fc12.x86_64.rpm
56K     ghc-common-6.12.0.20091201-1.fc12.x86_64.rpm
8.4M    ghc-doc-6.12.0.20091201-1.fc12.x86_64.rpm
8.8M    ghc-libs-6.12.0.20091201-1.fc12.x86_64.rpm
8.6M    ghc-libs-static-6.12.0.20091201-1.fc12.x86_64.rpm
25M     ghc-prof-6.12.0.20091201-1.fc12.x86_64.rpm
7.6M    ghc-runtime-6.12.0.20091201-1.fc12.x86_64.rpm
8.0M    ghc-runtime-static-6.12.0.20091201-1.fc12.x86_64.rpm



___________________________________________
NOTES

I still can't get Cabal to link shared libraries instead of static ones (tried 
--enable-shared, tried --disable-library-vanilla with no effect). This means 
that even if Cabal tells the compiler to produce dynamic libraries it doesn't 
link to them (thus making the whole "dynlib" thing almost useless at this 
point). I don't know if this is a bug or I am so dumb that I can't tell cabal-
install what to do.



___________________________________________
LINKS

http://gitorious.org/lvillani/specs/blobs/master/haskell/ghc/ghc.spec
+ I'm 101% sure that there are errors in that .spec file.


I look forward to hear your thoughts!
-- 
Lorenzo Villani
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://listman.redhat.com/archives/fedora-haskell-list/attachments/20091204/37267bc9/attachment.sig>


More information about the Fedora-haskell-list mailing list