[Haskell-beginners] Install bullet-0.2.2 failure in OS X 10.8.2
Trung Quang Nguyen
trungnq97 at gmail.com
Thu Dec 20 20:20:10 CET 2012
I have just found a new version of haskell bullet on github
https://github.com/csabahruska/bullet
It includes example and it's a newer version 0.2.3 compared to the version
from cabal.
But then, when I tried to build the example, I got this. Any body has any
idea? Thanks a lot! (I'm using MacOsx 10.8.2)
~/w/r/s/h/b/example> ghc --make -O2 BulletExample
Linking BulletExample ...
Undefined symbols for architecture x86_64:
"btUniversalConstraint::btUniversalConstraint(btRigidBody&, btRigidBody&,
btVector3&, btVector3&, btVector3&)", referenced from:
_btUniversalConstraint_new in libHSbullet-0.2.3.a(Bullet.o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
--Trung
2012/12/6 Trung Quang Nguyen <trungnq97 at gmail.com>
> Thanks a lot Daniel. I will try to find out. I have just installed Haskell
> today, so I don't understand much about these error messages.
>
> Best regards,
> Trung
>
>
> 2012/12/6 Daniel Fischer <daniel.is.fischer at googlemail.com>
>
>> On Donnerstag, 6. Dezember 2012, 12:51:55, Trung Quang Nguyen wrote:
>> > Hi there,
>> >
>> > After installing c2hs, and run cabal install bullet. I got this error.
>> Did
>> > I miss any step?
>>
>> No, the maintainer of bullet just has not updated the package to
>> incorporate
>> the changes in base-4.6.
>> >
>> > Physics/Bullet/Raw/C2HS.hs:211:12:
>> > Could not deduce (Eq a) arising from a use of `toBool'
>> > from the context (Num a)
>> > bound by the type signature for cToBool :: Num a => a -> Bool
>> > at Physics/Bullet/Raw/C2HS.hs:211:1-17
>> > Possible fix:
>> > add (Eq a) to the context of
>> > the type signature for cToBool :: Num a => a -> Bool
>> > In the expression: toBool
>> > In an equation for `cToBool': cToBool = toBool
>>
>> Formerly, Eq and Show were superclasses of Num (
>>
>> class (Eq a, Show a) => Num a where...
>>
>> ) but they have been removed recently (they prevented some reasonable Num
>> instances unless you mad dummy Eq and Show instances,
>>
>> instance Num a => Num (e -> a)
>>
>> for example).
>>
>> So before base-4.6, a Num constraint implied Eq, that is no longer so.
>>
>> Quick fix:
>>
>> $ cabal unpack bullet
>> - cd bullet-0.2.2
>> - edit the .cabal file, bumping the version to 0.2.2.1 or so
>> - edit the sources adding Eq or Show constraints where necessary (you have
>> seen one spot, cabal configure and after that cabal build would detect
>> further
>> spots if there are any, cabal install too, but if you configure with
>> --disable-library-profiling --disable-shared, cabal build is quicker to
>> find
>> the spots)
>> - cabal install
>> (no arguments, so it configures and installs the package from the
>> directory)
>>
>> Long-term fix: send a patch (or at least a bug report/feature request) to
>> the
>> maintainer of bullet.
>>
>
>
>
> --
> *Trung Nguyen*
> Mobile: +45 50 11 10 63
> LinkedIn: http://www.linkedin.com/pub/trung-nguyen/36/a44/187
> View my blog at http://www.onextrabit.com/
>
>
>
--
*Trung Nguyen*
Mobile: +45 50 11 10 63
LinkedIn: http://www.linkedin.com/pub/trung-nguyen/36/a44/187
View my blog at http://www.onextrabit.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20121220/24dc6769/attachment-0001.htm>
More information about the Beginners
mailing list