renamed GMP symbols in GHC

Michal Konečný mikkonecny at googlemail.com
Wed Jan 4 17:33:04 CET 2012


Dear Joachim and Simon,

Thank you for your responses.

On Wednesday 04 January 2012 12:31:23 Joachim Breitner wrote:
> I guess this means me... Indeed Debian has the policy to avoid modified
> bundled libraries, if somehow possible. For example, we patch the build
> system to use the system-provided libffi.

I am curious about the precise definition of "bundled libraries". It can be arranged that the GMP source is modified at GHC build time, so the _source_ package contains the original unmodified tar of GMP  (except without documentation).  Nevertheless, the _binary_ GHC package will contain integer-gmp library files that contain a binary copy of GMP whose symbols have been renamed.  Does this count as a "modified bundled library"?  (I am guessing yes.)

If such binary bundling is not permissible, would it ok to have a separate Debian package called eg libghcgmp3c2 which is equal to libgmp3c2 except the exported symbols are renamed as expected by a new integer-gmp and the files are suitably renamed to avoid any conflict with libgmp3c2?

On Wednesday 04 January 2012 12:21:13 Simon Marlow wrote:
> GMP is inherently broken because it 
> has global state, so if you want two use it from two clients in the same 
> program, you need two copies of it.

If this could be fixed that would be fantastic.  Nevertheless, I am currently
unaware of how hard this might be to persue, technically or politically.
(My gut feeling is that it is not straightforward.)

Kind regards,
Michal

On 22/12/2011 22:58, Michal Konečný wrote:
> > I think the following concrete changes would be required in the GHC
> > distribution:
> >
> > (a) make a ghc build always use the bundled GMP
> >
> > (b) apply a renaming script onto the GMP tar before adding it to the GHC
> > source bundle
> >
> > (c) rename symbols analogously in integer-gmp/cbits/*
> >
> >
> > An alternative to (b) is to apply the renaming to the GMP sources just
> > before building it.

-- 
|o| Michal Konecny <mikkonecny at gmail.com>
|o|    http://www-users.aston.ac.uk/~konecnym/
|o|    office: (+42) (0)121 204 3462 
|o| PGP key http://www-users.aston.ac.uk/~konecnym/ki.aston
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20120104/92034d1f/attachment.pgp>


More information about the Glasgow-haskell-users mailing list