Hi,
A while back I asked here about what people thought about doing static linking of executables against Haskell libraries, and the replies I got were basically against that.
I have been getting more requests for statically linked Bin packages from various users so now I am thinking to add static *subpackages* for packages with Haskell binary executable packages.
eg cabal-install-static, pandoc-static, darcs-static, hscolour-static, etc
The main base packages will still carry the default dynlinked executable. I will use alternatives to handle the choice between the dyn and statically linked Haskell binaries. (All executables will still be dynlinked against C libs of course.)
This flexibility should make more users happy and will make for greater portability of binaries. eg Maybe someone wants to use latest pandoc or cabal-install on an older release, then they can install the static subpackage there by hand.
I think it makes most sense to start doing this for F22 Rawhide once we move to ghc-7.8.
I have done a PoC locally for alex (since it is a smaller package) and it seems to work so far. So assuming it looks good I will probably go ahead and implement this into ghc-rpm-macros for F22 and then later cabal-rpm.
Jens
Hi,
I have been getting more requests for statically linked Bin packages from various users so now I am thinking to add static *subpackages* for packages with Haskell binary executable packages.
eg cabal-install-static, pandoc-static, darcs-static, hscolour-static, etc
The main base packages will still carry the default dynlinked executable. I will use alternatives to handle the choice between the dyn and statically linked Haskell binaries. (All executables will still be dynlinked against C libs of course.)
I have played a bit with this now and ran into the "usual" problem that rpm %ghost does not seem to play well with changing files into symlinks or at any rate converting a file into an alternative symlink.
Actually I remember the same issue when Fedora emacs moved to alternatives (perhaps it is a weakness of Fedora's version of alternatives?). The workaround seems to be to uninstall and reinstall but that is not really good/acceptable IMHO.
You can see my implementation for alex at:
http://pkgs.fedoraproject.org/cgit/alex.git/tree/alex.spec?id=7014db360f7e9b...
I tried switching it to %posttrans (like emacs) but that didn't help...
Any ideas/thoughts/suggestions?
I would really like to get this done but there doesn't seem to be a clean foolproof way to implement it, AFAICS. :-|
Right now the only idea I have would be to add a symlink to alex.static in %post if /usr/bin/alex does not exist, but that is kind of fragile; or %pre rm /usr/bin/alex??
Jens
http://pkgs.fedoraproject.org/cgit/alex.git/tree/alex.spec?id=7014db360f7e9b...
or %pre rm /usr/bin/alex??
Actually this seems to work (obviously with some conditionals). So maybe that is the way to go.
I may ask devel list or FPC if this has any known problems.
Jens
haskell@lists.fedoraproject.org