[PPL-devel] GMP memory allocation problem in SWI-Prolog 5.6.38 and following versions
Roberto Bagnara
bagnara at cs.unipr.it
Wed Oct 3 14:20:21 CEST 2007
Pedro Baltazar Vasconcelos wrote:
> Hello,
Hello Pedro! (Long time, no see :-)
> I have experienced the same issue a couple of years ago with Andy
> King's experimental PPL bindings for the Glasgow Haskell compiler
> (GHC).
> The problem was (and still is, I think) the reason why there is no
> "official" Haskell/GHC binding in the PPL distribution.
> I also contacted Simon Marlow on the GHC development side and he
> acknowledged the problem but didnt't have a solution for it in the
> near horizon (in the longer run, they might stop using GMP inside
> the Haskell runtime system).
Yes, I have read http://hackage.haskell.org/trac/ghc/ticket/311
and http://www.nabble.com/FFI-Bindings-to-Libraries-using-GMP-t4420123.html
> Since I desperately needed to use the PPL with my Haskell programs I
> did a quick and dirty hack that worked (under Linux at least):
> 1) create a duplicate libmygmp with renamed symbols (with a prefix);
> 2) create a special libmyppl that uses libmygmp instead of libgmp;
> 3) link my Haskell code with libmyppl.
>
> I used objcopy on the library binaries rather than modify the
> sources. But for some reason I could only get this to work with the
> static libraries. Anyway, I can pass you a short script that does
> the library renaming if you are interested.
Yes, please! Why not posting it here?
Ciao,
Roberto
--
Prof. Roberto Bagnara
Computer Science Group
Department of Mathematics, University of Parma, Italy
http://www.cs.unipr.it/~bagnara/
mailto:bagnara at cs.unipr.it
More information about the PPL-devel
mailing list