
Hi all, Any body can help me with installing bullet in OS X 10.8.2. I'm trying to install bullet using these commands: brew install bullet cabal update cabal install bullet And I got this Registering vect-0.4.7... Installed vect-0.4.7 Downloading bullet-0.2.2... Configuring bullet-0.2.2... cabal: The program c2hs is required but it could not be found. Failed to install bullet-0.2.2 Updating documentation index /Users/trungnguyen/Library/Haskell/doc/index.html cabal: Error: some packages failed to install: bullet-0.2.2 failed during the configure step. The exception was: ExitFailure 1 Thank you in advance. Kind regards, Trung

The line:
cabal: The program c2hs is required but it could not be found. is pretty clear about the source of error. You have to install c2hs first and make sure its in PATH. Use either some packaged version of c2hs or "cabal install c2hs".
Best regards,
Krzysztof Skrzętnicki
On Thu, Dec 6, 2012 at 11:48 AM, Trung Quang Nguyen
The program c2hs is required but it could not be found.

Hi there,
After installing c2hs, and run cabal install bullet. I got this error. Did
I miss any step?
Resolving dependencies...
Configuring bullet-0.2.2...
Building bullet-0.2.2...
Preprocessing library bullet-0.2.2...
[ 1 of 17] Compiling Physics.Bullet.Raw.Types (
Physics/Bullet/Raw/Types.hs, dist/build/Physics/Bullet/Raw/Types.o )
[ 2 of 17] Compiling Physics.Bullet.Raw.C2HS ( Physics/Bullet/Raw/C2HS.hs,
dist/build/Physics/Bullet/Raw/C2HS.o )
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
Failed to install bullet-0.2.2
cabal: Error: some packages failed to install:
bullet-0.2.2 failed during the building phase. The exception was:
ExitFailure 1
Best regards,
Trung
2012/12/6 Krzysztof Skrzętnicki
The line:
cabal: The program c2hs is required but it could not be found. is pretty clear about the source of error. You have to install c2hs first and make sure its in PATH. Use either some packaged version of c2hs or "cabal install c2hs".
Best regards, Krzysztof Skrzętnicki
On Thu, Dec 6, 2012 at 11:48 AM, Trung Quang Nguyen
wrote: The program c2hs is required but it could not be found.
-- *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/

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.

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
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/

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
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
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/
participants (3)
-
Daniel Fischer
-
Krzysztof Skrzętnicki
-
Trung Quang Nguyen