lambdacube3d / lambdacube-edsl Goto Github PK
View Code? Open in Web Editor NEWPrevious version of LambdaCube 3D as Embedded Domain Specific Language in Haskell. Check the latest system:
Home Page: http://lambdacube3d.com
Previous version of LambdaCube 3D as Embedded Domain Specific Language in Haskell. Check the latest system:
Home Page: http://lambdacube3d.com
I'm a beginner of Haskell. I want to use this project for learning Haskell. But I can not build it , so can you provide a simple tutorial for build this project?
thanks a lot.
[deepfire@andromedae hStunts]$ cabal build
Building stunts-0.1.3...
Preprocessing executable 'stunts' for stunts-0.1.3...
Linking dist/build/stunts/stunts ...
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSoftBody_Body_activate':
(.text+0x1330): undefined reference to `btCollisionObject::activate(bool)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSoftBody_checkContact':
(.text+0x5733): undefined reference to `btSoftBody::checkContact(btCollisionObject*, btVector3 const&, float, btSoftBody::sCti&) const'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSequentialImpulseConstraintSolver_setupFrictionConstraint':
(.text+0x40dbe): undefined reference to `btSequentialImpulseConstraintSolver::setupFrictionConstraint(btSolverConstraint&, btVector3 const&, btRigidBody*, btRigidBody*, btManifoldPoint&, btVector3 const&, btVector3 const&, btCollisionObject*, btCollisionObject*, float, float, float)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSequentialImpulseConstraintSolver_addFrictionConstraint':
(.text+0x40f0e): undefined reference to `btSequentialImpulseConstraintSolver::addFrictionConstraint(btVector3 const&, btRigidBody*, btRigidBody*, int, btManifoldPoint&, btVector3 const&, btVector3 const&, btCollisionObject*, btCollisionObject*, float, float, float)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btUniversalConstraint_new':
(.text+0x461f5): undefined reference to `btUniversalConstraint::btUniversalConstraint(btRigidBody&, btRigidBody&, btVector3&, btVector3&, btVector3&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm_new':
(.text+0x5c2b7): undefined reference to `btGImpactCollisionAlgorithm::btGImpactCollisionAlgorithm(btCollisionAlgorithmConstructionInfo const&, btCollisionObject*, btCollisionObject*)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm_addContactPoint':
(.text+0x5c426): undefined reference to `btGImpactCollisionAlgorithm::addContactPoint(btCollisionObject*, btCollisionObject*, btVector3 const&, btVector3 const&, float)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm_gimpact_vs_gimpact_find_pairs':
(.text+0x5c642): undefined reference to `btGImpactCollisionAlgorithm::gimpact_vs_gimpact_find_pairs(btTransform const&, btTransform const&, btGImpactShapeInterface*, btGImpactShapeInterface*, btPairSet&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm_gimpact_vs_shape_find_pairs':
(.text+0x5c8d2): undefined reference to `btGImpactCollisionAlgorithm::gimpact_vs_shape_find_pairs(btTransform const&, btTransform const&, btGImpactShapeInterface*, btCollisionShape*, btAlignedObjectArray<int>&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactQuantizedBvh_find_collision':
(.text+0x5ff52): undefined reference to `btGImpactQuantizedBvh::find_collision(btGImpactQuantizedBvh*, btTransform const&, btGImpactQuantizedBvh*, btTransform const&, btPairSet&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btManifoldResult_new1':
(.text+0x724eb): undefined reference to `btManifoldResult::btManifoldResult(btCollisionObject*, btCollisionObject*)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSphereSphereCollisionAlgorithm_new0':
(.text+0x72aab): undefined reference to `btSphereSphereCollisionAlgorithm::btSphereSphereCollisionAlgorithm(btPersistentManifold*, btCollisionAlgorithmConstructionInfo const&, btCollisionObject*, btCollisionObject*)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSoftBody_Body_activate':
(.text+0x1341): undefined reference to `btCollisionObject::activate(bool)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSoftBody_defaultCollisionHandler':
(.text+0x6101): undefined reference to `btSoftBody::defaultCollisionHandler(btCollisionObject*)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSoftBody_defaultCollisionHandler0':
(.text+0x6111): undefined reference to `btSoftBody::defaultCollisionHandler(btCollisionObject*)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSequentialImpulseConstraintSolver_getFixedBody':
(.text+0x40c61): undefined reference to `btSequentialImpulseConstraintSolver::getFixedBody()'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSequentialImpulseConstraintSolver_resolveSingleConstraintRowLowerLimitSIMD':
(.text+0x40c71): undefined reference to `btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimitSIMD(btRigidBody&, btRigidBody&, btSolverConstraint const&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSequentialImpulseConstraintSolver_setFrictionConstraintImpulse':
(.text+0x40c91): undefined reference to `btSequentialImpulseConstraintSolver::setFrictionConstraintImpulse(btSolverConstraint&, btRigidBody*, btRigidBody*, btManifoldPoint&, btContactSolverInfo const&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSequentialImpulseConstraintSolver_resolveSingleConstraintRowGenericSIMD':
(.text+0x40cb1): undefined reference to `btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGenericSIMD(btRigidBody&, btRigidBody&, btSolverConstraint const&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSequentialImpulseConstraintSolver_resolveSingleConstraintRowLowerLimit':
(.text+0x40cd1): undefined reference to `btSequentialImpulseConstraintSolver::resolveSingleConstraintRowLowerLimit(btRigidBody&, btRigidBody&, btSolverConstraint const&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSequentialImpulseConstraintSolver_resolveSplitPenetrationImpulseCacheFriendly':
(.text+0x40cf1): undefined reference to `btSequentialImpulseConstraintSolver::resolveSplitPenetrationImpulseCacheFriendly(btRigidBody&, btRigidBody&, btSolverConstraint const&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSequentialImpulseConstraintSolver_resolveSingleConstraintRowGeneric':
(.text+0x40fa1): undefined reference to `btSequentialImpulseConstraintSolver::resolveSingleConstraintRowGeneric(btRigidBody&, btRigidBody&, btSolverConstraint const&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSequentialImpulseConstraintSolver_resolveSplitPenetrationSIMD':
(.text+0x40fb1): undefined reference to `btSequentialImpulseConstraintSolver::resolveSplitPenetrationSIMD(btRigidBody&, btRigidBody&, btSolverConstraint const&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btRigidBody_updateDeactivation':
(.text+0x4727d): undefined reference to `btCollisionObject::setActivationState(int)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btRigidBody_internalWritebackVelocity1':
(.text+0x474c1): undefined reference to `btRigidBody::internalWritebackVelocity(float)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm_gimpact_vs_compoundshape':
(.text+0x5c31c): undefined reference to `btGImpactCollisionAlgorithm::gimpact_vs_compoundshape(btCollisionObject*, btCollisionObject*, btGImpactShapeInterface*, btCompoundShape*, bool)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm_gimpact_vs_shape':
(.text+0x5c32c): undefined reference to `btGImpactCollisionAlgorithm::gimpact_vs_shape(btCollisionObject*, btCollisionObject*, btGImpactShapeInterface*, btCollisionShape*, bool)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm_convex_vs_convex_collision':
(.text+0x5c331): undefined reference to `btGImpactCollisionAlgorithm::convex_vs_convex_collision(btCollisionObject*, btCollisionObject*, btCollisionShape*, btCollisionShape*)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm_gimpacttrimeshpart_vs_plane_collision':
(.text+0x5c48c): undefined reference to `btGImpactCollisionAlgorithm::gimpacttrimeshpart_vs_plane_collision(btCollisionObject*, btCollisionObject*, btGImpactMeshShapePart*, btStaticPlaneShape*, bool)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm_shape_vs_shape_collision':
(.text+0x5cad1): undefined reference to `btGImpactCollisionAlgorithm::shape_vs_shape_collision(btCollisionObject*, btCollisionObject*, btCollisionShape*, btCollisionShape*)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm_gimpact_vs_concave':
(.text+0x5cb9c): undefined reference to `btGImpactCollisionAlgorithm::gimpact_vs_concave(btCollisionObject*, btCollisionObject*, btGImpactShapeInterface*, btConcaveShape*, bool)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm_gimpact_vs_gimpact':
(.text+0x5cbb1): undefined reference to `btGImpactCollisionAlgorithm::gimpact_vs_gimpact(btCollisionObject*, btCollisionObject*, btGImpactShapeInterface*, btGImpactShapeInterface*)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btPersistentManifold_addManifoldPoint':
(.text+0x6c7a1): undefined reference to `btPersistentManifold::addManifoldPoint(btManifoldPoint const&)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btCollisionObject_activate':
(.text+0x6f17b): undefined reference to `btCollisionObject::activate(bool)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btCollisionObject_forceActivationState':
(.text+0x6f551): undefined reference to `btCollisionObject::forceActivationState(int)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btCollisionObject_setActivationState':
(.text+0x6fa71): undefined reference to `btCollisionObject::setActivationState(int)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btSphereSphereCollisionAlgorithm::CreateFunc::CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo&, btCollisionObject*, btCollisionObject*)':
(.text._ZN32btSphereSphereCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_[_ZN32btSphereSphereCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_]+0x38): undefined reference to `btSphereSphereCollisionAlgorithm::btSphereSphereCollisionAlgorithm(btPersistentManifold*, btCollisionAlgorithmConstructionInfo const&, btCollisionObject*, btCollisionObject*)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o): In function `btGImpactCollisionAlgorithm::CreateFunc::CreateCollisionAlgorithm(btCollisionAlgorithmConstructionInfo&, btCollisionObject*, btCollisionObject*)':
(.text._ZN27btGImpactCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_[_ZN27btGImpactCollisionAlgorithm10CreateFunc24CreateCollisionAlgorithmER36btCollisionAlgorithmConstructionInfoP17btCollisionObjectS4_]+0x36): undefined reference to `btGImpactCollisionAlgorithm::btGImpactCollisionAlgorithm(btCollisionAlgorithmConstructionInfo const&, btCollisionObject*, btCollisionObject*)'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o):(.rodata._ZTV15btTriangleShape[_ZTV15btTriangleShape]+0xc0): undefined reference to `btPolyhedralConvexShape::initializePolyhedralFeatures()'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o):(.rodata._ZTV17btTriangleShapeEx[_ZTV17btTriangleShapeEx]+0xc0): undefined reference to `btPolyhedralConvexShape::initializePolyhedralFeatures()'
/home/deepfire/.cabal/lib/x86_64-linux-ghc-7.6.3/bullet-0.2.3/libHSbullet-0.2.3.a(Bullet.o):(.rodata._ZTV20btTetrahedronShapeEx[_ZTV20btTetrahedronShapeEx]+0xc0): undefined reference to `btPolyhedralConvexShape::initializePolyhedralFeatures()'
collect2: error: ld returned 1 exit status
[deepfire@andromedae hStunts]$ cabal --version
cabal-install version 1.20.0.2
using version 1.20.0.1 of the Cabal library
[deepfire@andromedae hStunts]$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
[deepfire@andromedae hStunts]$ yum info installed bullet-devel | grep ersion
Version : 2.81
lambdacube-core installed without issue.
$ cd q3demo; cabal install
Main.hs:428:47: Not in scope: data constructor `CoreProfile'
Failed to install q3demo-0.1.1
Seems the specific version needed to be added on (line 46) in q3demo.cabal
...
GLFW-b == 0.1.0.5,
...
It builds fine now. Thanks for sharing your project.
GHC-7.6 lacks GHC.TypeLits.KnownNat
, use of which was introduced in dec02d9
Short version: adding OpenGLRaw-1.4.0.0 and lambdacube-core-0.1.0 into project's cabal file leads to ghc-mod stopping from servicing ghc-show-type
emacs commands -- they block indefinitely.
A trivial repro follows:
Main.hs:
main :: IO ()
-- v--- the mark ought to be here, when invoking ghc-show-type
main = do
return ()
repro.cabal
name: repro
version: 0.1.0.0
synopsis: A Test Thing
-- description:
license: GPL-3
license-file: LICENSE
author: Samium Gromoff
maintainer: [email protected]
-- copyright:
-- category:
build-type: Simple
-- extra-source-files:
cabal-version: >=1.10
executable mood
main-is: Main.hs
build-depends: base >=4.6 && <4.7, OpenGLRaw >=1.4 && <1.6, lambdacube-core >=0.1 && <0.2
default-language: Haskell2010
GHC is 7.6.3, as is in Fedora 20.
I tried to compile and run the examples, but the fail at
Common/Utils.hs:9:8:
Could not find module ‘Graphics.Rendering.OpenGL.Raw.Core32’
Use -v to see a list of the files searched for.
FX.hs:7:15:
Could not find module ‘LambdaCube.GL’
Use -v to see a list of the files searched for.
FX.hs:8:15:
Could not find module ‘LambdaCube.GL.Mesh’
Use -v to see a list of the files searched for.
Even though I've installed lambdacube-core
. What am I missing?
In order to build lambdacube-samples
, I needed to build the vect
package. This is really an issue with that package, but unfortunately there is no issue tracker for it, as this is its homepage: http://code.haskell.org/~bkomuves/ I figure this is an ok place to put the issue, though, since there are only a couple other reverse dependencies beyond bullet / lambdacube-*: http://packdeps.haskellers.com/reverse/vect
/usr/bin/ld.gold: error: cannot find -lHSrandom-1.0.1.1-ghc7.8.2
collect2: ld returned 1 exit status
Failed to install vect-0.4.7
cabal: Error: some packages failed to install:
vect-0.4.7 failed during the building phase. The exception was:
ExitFailure 1
Thankfully the fix for this was quite simple - cabal install random-1.0.1.1 --reinstall --enable-shared
- but ideally such cabal-fu should be avoided - as such things can be a big barrier to entry. Why does vect need the dynamically linked version of random?
So anyway, ideally, either vect would be fixed or the dependency dropped.
Question: why? Follow-up: how?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.