Open jwaldmann opened 10 years ago
Thanks for reporting this, but unfortunately I was unable to reproduce the bug on OS X, @knsd can you try a Linux machine?
I was checking this on two other machines (all x86_64) and the behaviour seems to depend on libgmp version. It works fine with libgmp.so.3.5.2 (debian 6), libgmp.so.10.1.1 (fedora 19), but breaks (as reported above) with libgmp.so.10.1.2 (fedora 20). All of this with ghc-7.6.3 compiled from source.
As far as I know GHC uses its own patched libgmp
version. This also should be the version GHC links cbits/gmp-extras.cmm
with, due to:
import "integer-gmp" __gmpz_init_set;
import "integer-gmp" __gmpz_popcount;
import "integer-gmp" __gmpz_tstbit;
import "integer-gmp" __gmpz_setbit;
import "integer-gmp" __gmpz_clrbit;
But since you have the issue with a specific system-wide libgmp
version, I've tried reproducing it on the latest Ubuntu:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=13.10
DISTRIB_CODENAME=saucy
DISTRIB_DESCRIPTION="Ubuntu 13.10"
$ sudo aptitude show libgmp-dev | grep Version
Version: 2:5.1.2+dfsg-2ubuntu1
but everything worked as expected. Are you sure it's libgmp
which causes the problem?
with ghc-7.6.3, bitset-1.4.7 (current from hackage), on x86_64 fedora, in ghci I get this:
it seems to work ok with Data.BitSet.Generic; so it would depend on a difference between Integer and FasterInteger?