[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.


 * 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 

 * 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 (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.


 + cabal-install 0.7.5 (from darcs) seems to work decently with this GHC 
 + 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-
56K     ghc-common-
8.4M    ghc-doc-
8.8M    ghc-libs-
8.6M    ghc-libs-static-
25M     ghc-prof-
7.6M    ghc-runtime-
8.0M    ghc-runtime-static-


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.


+ 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