Jump to content

Step by step - Bullet on the Mac


Recommended Posts

Hi,

I'm hoping to lay the groundwork for easy to follow step by step instructions for getting Bullet up and running on the Mac. I have been able to compile the Bullet library, but I have not been able to create the Houdini DSO from it. Any help there would be greatly appreciated.

So, here goes:

Before beginning, you will need several things.

1. The latest source code of bullet. (http://code.google.com/p/bullet/downloads/list). At the time of this post, I believe bullet-2.76.zip is the version to download.

2. The latest Bullet RBD DOP code (http://gitorious.org/bullet-physics-solver). I believe you need to click on Source Tree, and then on Download master as tar.gz (on the right side of the page).

3. XCode. XCode is a coding and compiling application for the Mac. This application comes standard on the OSX install - although it is optional, so please check that it is installed and working correctly. It should be located here: HD/Developer/Applications/Xcode. It can be downloaded from Apple's site for free (http://developer.apple.com/technologies/xcode.html). You just need to set up a developer account to download.

4. CMake. (http://www.cmake.org/cmake/resources/software.html). This piece of software will make an XCode project from the downloaded bullet. Make sure to download the Mac OSX Universal version.

Ok, now that all the pieces are gathered...

1. Create a directory that will hold the compiled bullet library. I put mine here, so that all users may access it: HD/Users/Shared/BulletCompile

2. Start CMake. In the "Where is the source code:" dialog browse to the bullet source code folder. This will be wherever you have downloaded it to on your computer. So, in my case, it is: /Users/Username/Documents/bullet-2.76. In the "Where to build binaries:" field enter the path to the directory you created in step 1. Now, click Configure. A window will pop up asking you to specify the generator for this project. Choose Xcode, and select Use default native compilers. Click done. You may see a red type warnings. From what I can tell this may not be a problem, as long as at the bottom of the text report it says "Configuring done." Now, select all the items in the top window, and click Configure. Then, click Generate. If you look in the directory from step 1, you will now see an Xcode project and a bunch of folders.

3. Open the Xcode project that CMake created in step 2. Change the dropdown menu from Debug to release, then click the Build button. XCode will then compile the Bullet libraries. This will take a few minutes providing everything goes correctly.

4. Check that the Bullet library compile worked. Navigate to the folder you created in step 1. Go into Demos/AllBulletDemos/Release and launch AppAllBulletDemos. If you have done everything correctly you should now have an application that has links to a bunch of different Bullet test scenes. Check them all to see if they are working.

This is as far as I got. Hoping someone can help out from here.

Link to comment
Share on other sites

I was able to get everything working pretty painlessly. However I don't use Xcode and therefore generated the make files to compile. Only thing I had to make sure of was to enable INSTALL_LIBS so as to be able to run "sudo make install" afterwards. Once it was built and installed all I had to do was run the build.sh script to build the DOP object and I was good to go.

Link to comment
Share on other sites

I was able to get everything working pretty painlessly. However I don't use Xcode and therefore generated the make files to compile. Only thing I had to make sure of was to enable INSTALL_LIBS so as to be able to run "sudo make install" afterwards. Once it was built and installed all I had to do was run the build.sh script to build the DOP object and I was good to go.

Can you elaborate on this Graham? I'm really after a usable step-by-step guide. If you did not use Xcode, how did you do this? And did you have to change the paths in the build.sh script? Where do you suggest users install the library?

At the moment the build.sh script is not working for me:

rm: *.o: No such file or directory

Making debug version

Linking with 'libBulletDynamics'

Linking with 'libBulletCollision'

Linking with 'libBulletSoftBody'

Linking with 'libLinearMath'

Making SIM_SolverBullet.o and /Users/aswaab/Library/Preferences/houdini/10.0/dso/SIM_SolverBullet.dylib from SIM_SolverBullet.cpp

i686-apple-darwin9-g++-4.0.1: SIM_SolverBullet.cpp: No such file or directory

i686-apple-darwin9-g++-4.0.1: no input files

Compile failed

I was hoping not to clutter this thread up with compiling issues, but I guess this thread can be cleaned up or added to the wiki page after it takes shape.

Edited by bandini
Link to comment
Share on other sites

It doesn't know where your "SIM_SolverBullet.cpp" is.

Thanks. It looks like I need to cd into that directory first before running the shell script.

Getting a little closer.

In the shell script, I modified the BULLET_INC variable to point to the header files from the downloaded bullet source code, in my case /Users/aswaab/Documents/bullet-2.76/src. Looking at the SIM_SolverBullet.cpp file I can see it is trying to include the files in that directory, so that seems correct there.

For the BULLET_LIB variable, I tried changing it to both /Users/Shared/BulletCompile and /Users/Shared/BulletCompile/src, but the script did not see the libraries. So, I went into the folders and copied the lib files out of there and placed them into a single directory here: /Users/Shared/BulletLibFiles. Changed the shell script to use that directory for the lib files. Now I get:

Making debug version

Linking with 'libBulletDynamics'

Linking with 'libBulletCollision'

Linking with 'libBulletSoftBody'

Linking with 'libLinearMath'

Making SIM_SolverBullet.o and /Users/aswaab/Library/Preferences/houdini/10.0/dso/SIM_SolverBullet.dylib from SIM_SolverBullet.cpp

cc1plus: warning: command line option "-fobjc-gc-only" is valid for ObjC/ObjC++ but not for C++

ld: warning in /Users/Shared/BulletLibFiles/libBulletDynamics.a, file is not of required architecture

ld: warning in /Users/Shared/BulletLibFiles/libBulletCollision.a, file is not of required architecture

ld: warning in /Users/Shared/BulletLibFiles/libBulletSoftBody.a, file is not of required architecture

ld: warning in /Users/Shared/BulletLibFiles/libLinearMath.a, file is not of required architecture

Undefined symbols:

"btAlignedFreeInternal(void*)", referenced from:

btCollisionObject::operator delete(void*)in SIM_SolverBullet.o

btConvexShape::operator delete(void*)in SIM_SolverBullet.o

btSphereShape::operator delete(void*)in SIM_SolverBullet.o

btTriangleIndexVertexArray::operator delete(void*)in SIM_SolverBullet.o

btAlignedAllocator<int, 16u>::deallocate(int*) in SIM_SolverBullet.o

btAlignedAllocator<BT_QUANTIZED_BVH_NODE, 16u>::deallocate(BT_QUANTIZED_BVH_NODE*)in SIM_SolverBullet.o

btAlignedAllocator<btGImpactMeshShapePart*, 16u>::deallocate(btGImpactMeshShapePart**)in SIM_SolverBullet.o

btAlignedAllocator<btHashInt, 16u>::deallocate(btHashInt*) in SIM_SolverBullet.o

btAlignedAllocator<btTriangleInfo, 16u>::deallocate(btTriangleInfo*)in SIM_SolverBullet.o

"btCollisionShape::getContactBreakingThreshold(float) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btConvexTriangleMeshShape::btConvexTriangleMeshShape(btStridingMeshInterface*, bool)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btTypedConstraint::serialize(void*, btSerializer*) const", referenced from:

vtable for btTypedConstraintin SIM_SolverBullet.o

"vtable for btBoxShape", referenced from:

btBoxShape::btBoxShape(btVector3 const&)in SIM_SolverBullet.o

"vtable for btConvexInternalShape", referenced from:

btConvexInternalShape::~btConvexInternalShape()in SIM_SolverBullet.o

"btMultiSphereShape::btMultiSphereShape(btVector3 const*, float const*, int)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"vtable for btGImpactMeshShapePart", referenced from:

btGImpactMeshShapePart::btGImpactMeshShapePart(btStridingMeshInterface*, int)in SIM_SolverBullet.o

"btPolyhedralConvexShape::btPolyhedralConvexShape()", referenced from:

btBoxShape::btBoxShape(btVector3 const&)in SIM_SolverBullet.o

"btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher*, btBroadphaseInterface*, btConstraintSolver*, btCollisionConfiguration*)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btConcaveShape::btConcaveShape()", referenced from:

btGImpactShapeInterface::btGImpactShapeInterface()in SIM_SolverBullet.o

"btCollisionShape::getBoundingSphere(btVector3&, float&) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btConcaveShape::~btConcaveShape()", referenced from:

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

"btGImpactQuantizedBvh::buildSet()", referenced from:

btGImpactShapeInterface::calcLocalAABB() in SIM_SolverBullet.o

"btRigidBody::btRigidBody(btRigidBody::btRigidBodyConstructionInfo const&)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"vtable for btGImpactMeshShape", referenced from:

btGImpactMeshShape::btGImpactMeshShape(btStridingMeshInterface*)in SIM_SolverBullet.o

"vtable for btPolyhedralConvexShape", referenced from:

btPolyhedralConvexShape::~btPolyhedralConvexShape()in SIM_SolverBullet.o

"btAlignedAllocInternal(unsigned long, int)", referenced from:

btCollisionObject::operator new(unsigned long)in SIM_SolverBullet.o

btConvexShape::operator new(unsigned long)in SIM_SolverBullet.o

btSphereShape::operator new(unsigned long)in SIM_SolverBullet.o

btTriangleIndexVertexArray::operator new(unsigned long)in SIM_SolverBullet.o

btAlignedAllocator<btGImpactMeshShapePart*, 16u>::allocate(int, btGImpactMeshShapePart* const**)in SIM_SolverBullet.o

"btRigidBody::setGravity(btVector3 const&)", referenced from:

SIM_SolverBullet::processSubData(SIM_Object*, bulletBodystr&) in SIM_SolverBullet.o

"vtable for btSphereShape", referenced from:

btSphereShape::btSphereShape(float)in SIM_SolverBullet.o

"btGImpactQuantizedBvh::refit()", referenced from:

btGImpactQuantizedBvh::update() in SIM_SolverBullet.o

"btCapsuleShape::btCapsuleShape(float, float)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btConvexInternalShape::btConvexInternalShape()", referenced from:

btSphereShape::btSphereShape(float)in SIM_SolverBullet.o

"btCollisionShape::serializeSingleShape(btSerializer*) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btDefaultCollisionConstructionInfo const&)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btGImpactCollisionAlgorithm::registerAlgorithm(btCollisionDispatcher*)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btCollisionDispatcher::btCollisionDispatcher(btCollisionConfiguration*)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btCollisionShape::getAngularMotionDisc() const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btCollisionShape::serialize(void*, btSerializer*) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btTriangleIndexVertexArray::btTriangleIndexVertexArray(int, int*, int, int, float*, int)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btConvexShape::~btConvexShape()", referenced from:

btConvexInternalShape::~btConvexInternalShape()in SIM_SolverBullet.o

"typeinfo for btConcaveShape", referenced from:

typeinfo for btGImpactShapeInterfacein SIM_SolverBullet.o

"btDbvtBroadphase::btDbvtBroadphase(btOverlappingPairCache*)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

ld: symbol(s) not found

collect2: ld returned 1 exit status

Link to comment
Share on other sites

Basically I did as follows:

1. Extracted the Bullet files to a directory and ran the CMake application as you talk about above. However, I make sure to choose that I want to create Unix Makefiles and I make sure that INSTALL_LIBS is set to on. This option allows you to actually install the libs to the proper folders in /usr.

2. Next I navigate to the directory I extracted the files to using my terminal and type 'make'. This compiles all the libraries.

3. After the compiler is done I type 'sudo make install'. This runs the install part of the Makefile definition and moves all the compiles libraries to their proper folders in the system area.

4. Next I navigate to the directory that I extracted the DOP solver files. In the build.sh script I set BULLET_INC=/usr/include and BULLET_LIB=/usr/lib.

5. I then just run it with ./build.sh. It compiles and then all is well and I can use it in Houdini.

Link to comment
Share on other sites

Basically I did as follows:

1. Extracted the Bullet files to a directory and ran the CMake application as you talk about above. However, I make sure to choose that I want to create Unix Makefiles and I make sure that INSTALL_LIBS is set to on. This option allows you to actually install the libs to the proper folders in /usr.

2. Next I navigate to the directory I extracted the files to using my terminal and type 'make'. This compiles all the libraries.

3. After the compiler is done I type 'sudo make install'. This runs the install part of the Makefile definition and moves all the compiles libraries to their proper folders in the system area.

4. Next I navigate to the directory that I extracted the DOP solver files. In the build.sh script I set BULLET_INC=/usr/include and BULLET_LIB=/usr/lib.

5. I then just run it with ./build.sh. It compiles and then all is well and I can use it in Houdini.

So it looks like there were a couple things I was missing. I feel like I am getting close, but I am definitely not there yet.

First thing, in CMake, when installing, it must be set up for command line use. You can go to Tools->Install for command line use to set that up.

Second, I did not see the option in CMake for INSTALL_LIBS. This must be checked and I think you have to set the INSTALL_LIBRARY_PATH variable. I then compiled as Graham explained above. This appeared successful. Then ran the "sudo make install" command, which appeared to run correctly, as well. Some output here to confirm it (just an excerpt):

-- Install configuration: "Release"

-- Installing: /usr/local/lib/libOpenGLSupport.a

/usr/bin/ranlib: file: /usr/local/lib/libOpenGLSupport.a(Win32DemoApplication.o) has no symbols

-- Installing: /usr/local/include/OpenGL

-- Installing: /usr/local/include/OpenGL/DebugCastResult.h

-- Installing: /usr/local/include/OpenGL/DemoApplication.h

-- Installing: /usr/local/include/OpenGL/GL_DialogDynamicsWorld.h

-- Installing: /usr/local/include/OpenGL/GL_DialogWindow.h

-- Installing: /usr/local/include/OpenGL/GL_ShapeDrawer.h

-- Installing: /usr/local/include/OpenGL/GL_Simplex1to4.h

-- Installing: /usr/local/include/OpenGL/GLDebugDrawer.h

-- Installing: /usr/local/include/OpenGL/GLDebugFont.h

-- Installing: /usr/local/include/OpenGL/GlutDemoApplication.h

-- Installing: /usr/local/include/OpenGL/GlutStuff.h

-- Installing: /usr/local/include/OpenGL/ibmsdk

-- Installing: /usr/local/include/OpenGL/RenderTexture.h

-- Installing: /usr/local/include/OpenGL/Win32DemoApplication.h

-- Installing: /usr/local/include/btBulletCollisionCommon.h

-- Installing: /usr/local/include/btBulletDynamicsCommon.h

-- Installing: /usr/local/include/Bullet-C-Api.h

-- Installing: /usr/local/lib/libBulletMultiThreaded.a

/usr/bin/ranlib: file: /usr/local/lib/libBulletMultiThreaded.a(SpuLibspe2Support.o) has no symbols

/usr/bin/ranlib: file: /usr/local/lib/libBulletMultiThreaded.a(Win32ThreadSupport.o) has no symbols

-- Installing: /usr/local/include/BulletMultiThreaded

-- Installing: /usr/local/include/BulletMultiThreaded/btGpu3DGridBroadphase.h

-- Installing: /usr/local/include/BulletMultiThreaded/btGpu3DGridBroadphaseSharedCode.h

-- Installing: /usr/local/include/BulletMultiThreaded/btGpu3DGridBroadphaseSharedDefs.h

-- Installing: /usr/local/include/BulletMultiThreaded/btGpu3DGridBroadphaseSharedTypes.h

-- Installing: /usr/local/include/BulletMultiThreaded/btGpuDefines.h

-- Installing: /usr/local/include/BulletMultiThreaded/btGpuUtilsSharedCode.h

-- Installing: /usr/local/include/BulletMultiThreaded/btGpuUtilsSharedDefs.h

-- Installing: /usr/local/include/BulletMultiThreaded/btParallelConstraintSolver.h

-- Installing: /usr/local/include/BulletMultiThreaded/btThreadSupportInterface.h

-- Installing: /usr/local/include/BulletMultiThreaded/MiniCLTask

-- Installing: /usr/local/include/BulletMultiThreaded/MiniCLTask/MiniCLTask.h

-- Installing: /usr/local/include/BulletMultiThreaded/MiniCLTaskScheduler.h

-- Installing: /usr/local/include/BulletMultiThreaded/out

-- Installing: /usr/local/include/BulletMultiThreaded/PlatformDefinitions.h

-- Installing: /usr/local/include/BulletMultiThreaded/PosixThreadSupport.h

-- Installing: /usr/local/include/BulletMultiThreaded/PpuAddressSpace.h

-- Installing: /usr/local/include/BulletMultiThreaded/SequentialThreadSupport.h

-- Installing: /usr/local/include/BulletMultiThreaded/SpuCollisionObjectWrapper.h

Then updated the build.sh script to reflect the location of the include and lib directories:

BULLET_INC=/usr/local/include

BULLET_LIB=/usr/local/lib

And, sadly, it errors out. No Bullet.

Making debug version

Linking with 'libBulletDynamics'

Linking with 'libBulletCollision'

Linking with 'libBulletSoftBody'

Linking with 'libLinearMath'

Making SIM_SolverBullet.o and /Users/aswaab/Library/Preferences/houdini/10.0/dso/SIM_SolverBullet.dylib from SIM_SolverBullet.cpp

cc1plus: warning: command line option "-fobjc-gc-only" is valid for ObjC/ObjC++ but not for C++

ld: warning in /usr/local/lib/libBulletDynamics.a, file is not of required architecture

ld: warning in /usr/local/lib/libBulletCollision.a, file is not of required architecture

ld: warning in /usr/local/lib/libBulletSoftBody.a, file is not of required architecture

ld: warning in /usr/local/lib/libLinearMath.a, file is not of required architecture

Undefined symbols:

"btAlignedFreeInternal(void*)", referenced from:

btCollisionObject::operator delete(void*)in SIM_SolverBullet.o

btConvexShape::operator delete(void*)in SIM_SolverBullet.o

btSphereShape::operator delete(void*)in SIM_SolverBullet.o

btTriangleIndexVertexArray::operator delete(void*)in SIM_SolverBullet.o

btAlignedAllocator<int, 16u>::deallocate(int*) in SIM_SolverBullet.o

btAlignedAllocator<BT_QUANTIZED_BVH_NODE, 16u>::deallocate(BT_QUANTIZED_BVH_NODE*)in SIM_SolverBullet.o

btAlignedAllocator<btGImpactMeshShapePart*, 16u>::deallocate(btGImpactMeshShapePart**)in SIM_SolverBullet.o

btAlignedAllocator<btHashInt, 16u>::deallocate(btHashInt*) in SIM_SolverBullet.o

btAlignedAllocator<btTriangleInfo, 16u>::deallocate(btTriangleInfo*)in SIM_SolverBullet.o

"btCollisionShape::getContactBreakingThreshold(float) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btConvexTriangleMeshShape::btConvexTriangleMeshShape(btStridingMeshInterface*, bool)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btTypedConstraint::serialize(void*, btSerializer*) const", referenced from:

vtable for btTypedConstraintin SIM_SolverBullet.o

"vtable for btBoxShape", referenced from:

btBoxShape::btBoxShape(btVector3 const&)in SIM_SolverBullet.o

"vtable for btConvexInternalShape", referenced from:

btConvexInternalShape::~btConvexInternalShape()in SIM_SolverBullet.o

"btMultiSphereShape::btMultiSphereShape(btVector3 const*, float const*, int)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"vtable for btGImpactMeshShapePart", referenced from:

btGImpactMeshShapePart::btGImpactMeshShapePart(btStridingMeshInterface*, int)in SIM_SolverBullet.o

"btPolyhedralConvexShape::btPolyhedralConvexShape()", referenced from:

btBoxShape::btBoxShape(btVector3 const&)in SIM_SolverBullet.o

"btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher*, btBroadphaseInterface*, btConstraintSolver*, btCollisionConfiguration*)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btConcaveShape::btConcaveShape()", referenced from:

btGImpactShapeInterface::btGImpactShapeInterface()in SIM_SolverBullet.o

"btCollisionShape::getBoundingSphere(btVector3&, float&) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btConcaveShape::~btConcaveShape()", referenced from:

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

"btGImpactQuantizedBvh::buildSet()", referenced from:

btGImpactShapeInterface::calcLocalAABB() in SIM_SolverBullet.o

"btRigidBody::btRigidBody(btRigidBody::btRigidBodyConstructionInfo const&)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"vtable for btGImpactMeshShape", referenced from:

btGImpactMeshShape::btGImpactMeshShape(btStridingMeshInterface*)in SIM_SolverBullet.o

"vtable for btPolyhedralConvexShape", referenced from:

btPolyhedralConvexShape::~btPolyhedralConvexShape()in SIM_SolverBullet.o

"btAlignedAllocInternal(unsigned long, int)", referenced from:

btCollisionObject::operator new(unsigned long)in SIM_SolverBullet.o

btConvexShape::operator new(unsigned long)in SIM_SolverBullet.o

btSphereShape::operator new(unsigned long)in SIM_SolverBullet.o

btTriangleIndexVertexArray::operator new(unsigned long)in SIM_SolverBullet.o

btAlignedAllocator<btGImpactMeshShapePart*, 16u>::allocate(int, btGImpactMeshShapePart* const**)in SIM_SolverBullet.o

"btRigidBody::setGravity(btVector3 const&)", referenced from:

SIM_SolverBullet::processSubData(SIM_Object*, bulletBodystr&) in SIM_SolverBullet.o

"vtable for btSphereShape", referenced from:

btSphereShape::btSphereShape(float)in SIM_SolverBullet.o

"btGImpactQuantizedBvh::refit()", referenced from:

btGImpactQuantizedBvh::update() in SIM_SolverBullet.o

"btCapsuleShape::btCapsuleShape(float, float)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btConvexInternalShape::btConvexInternalShape()", referenced from:

btSphereShape::btSphereShape(float)in SIM_SolverBullet.o

"btCollisionShape::serializeSingleShape(btSerializer*) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btDefaultCollisionConstructionInfo const&)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btGImpactCollisionAlgorithm::registerAlgorithm(btCollisionDispatcher*)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btCollisionDispatcher::btCollisionDispatcher(btCollisionConfiguration*)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btCollisionShape::getAngularMotionDisc() const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btCollisionShape::serialize(void*, btSerializer*) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btTriangleIndexVertexArray::btTriangleIndexVertexArray(int, int*, int, int, float*, int)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btConvexShape::~btConvexShape()", referenced from:

btConvexInternalShape::~btConvexInternalShape()in SIM_SolverBullet.o

"typeinfo for btConcaveShape", referenced from:

typeinfo for btGImpactShapeInterfacein SIM_SolverBullet.o

"btDbvtBroadphase::btDbvtBroadphase(btOverlappingPairCache*)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

ld: symbol(s) not found

collect2: ld returned 1 exit status

Not sure what's happening there.

Link to comment
Share on other sites

I've been able to get it to work, but not with Xcode. Here are the steps I took (similar to Graham):

- OS X 10.6.2

- Xcode 3.2 (to update gcc and such)

- Cmake 2.8 (when installing, say yes to allowing access for non-terminal apps)

- Bullet 2.75 r1776

- Git 1.6.6 (http://git-scm.com/download)

- Bullet-Physics-Solver 0.12

- Houdini 10.0.XX (I did it with build 461)

Building Bullet:

* Open the Terminal.

* Untar the bullet .tgz, and cd into a directory.

* cmake -G "Unix Makefiles" -DBUILD_DEMOS=off (this will compile much faster)

* make

* sudo make install (this should put the bullet libraries in the appropriate places for hcustom to see them)

Bullet DOP:

* untar the bullet-physics-solver, and edit the build.sh inside the src directory so the hcustom line shows as follows:

* hcustom -g -lBulletDynamics -lBulletCollision -lBulletSoftBody -lLinearMath SIM_SolverBullet.cpp

* save and close it

* In Applications/Houdini10.0.XX, run Houdini Shell.terminal

* in that new shell that pops up, cd into the bullet-physics-solver directory, then src/ and run the following:

* sh build.sh

that should build the plugin properly, and when you open houdini the next time, there will be the Bullet RBD Solver, Bullet Data DOPs available in Houdini.

Edited by goldleaf
Link to comment
Share on other sites

I've been able to get it to work, but not with Xcode. Here are the steps I took (similar to Graham):

- OS X 10.6.2

- Xcode 3.2 (to update gcc and such)

- Cmake 2.8 (when installing, say yes to allowing access for non-terminal apps)

- Bullet 2.75 r1776

- Git 1.6.6 (http://git-scm.com/download)

- Bullet-Physics-Solver 0.12

- Houdini 10.0.XX (I did it with build 461)

Building Bullet:

* Open the Terminal.

* Untar the bullet .tgz, and cd into a directory.

* cmake -G "Unix Makefiles" -DBUILD_DEMOS=off (this will compile much faster)

* make

* sudo make install (this should put the bullet libraries in the appropriate places for hcustom to see them)

Bullet DOP:

* untar the bullet-physics-solver, and edit the build.sh inside the src directory so the hcustom line shows as follows:

* hcustom -g -lBulletDynamics -lBulletCollision -lBulletSoftBody -lLinearMath SIM_SolverBullet.cpp

* save and close it

* In Applications/Houdini10.0.XX, run Houdini Shell.terminal

* in that new shell that pops up, cd into the bullet-physics-solver directory, then src/ and run the following:

* sh build.sh

that should build the plugin properly, and when you open houdini the next time, there will be the Bullet RBD Solver, Bullet Data DOPs available in Houdini.

Uggg... This just isn't working for me. Same errors as before when running build.sh.

I'm wondering if the wrong library files are installed. If I built the .zip version instead of the .tgz (unix line endings) would that be it? There are a lot of errors about "file not of required architecture."

I can see by cd into /usr/local/lib that the library files are installed:

libBulletCollision.a libBulletSoftBody.a

libBulletDynamics.a libLinearMath.a

libBulletMultiThreaded.a libOpenGLSupport.a

How do I delete them and try again by compiling the .tgz version? I tried compiling it, but it did not seem to overwrite them, so I would like to delete them and start fresh. I tried with rm libBulletCollision.a, for example, but just get permission denied.

Link to comment
Share on other sites

What version of xcode have you installed? I had Xcode 3.1, and upgrading to 3.2 got rid of a lot of errors.

3.0. I'll try upgrading and see what happens.

Thank you everyone sincerely for helping! Hoping to get it working soon.

Link to comment
Share on other sites

3.0. I'll try upgrading and see what happens.

Thank you everyone sincerely for helping! Hoping to get it working soon.

Looks like I can't update XCode unless I update to Snow Leopard. I guess it's time. In the meantime would someone mind posting the mac version of the Bullet DSO somewhere or PM it to me. I'd like to play around with it - even if I can't actually do the compile myself just yet.

Link to comment
Share on other sites

I just had to turn off the benchmarking and the dynamica options and set LIBRARY_OUTPUT_PATH, and everything worked fine.

From Xcode, build all, build install.

Set the INC and LIB paths in build.sh and it worked fine.

In XCode...

Build All - no problems.

Build Install - problem:

/Applications/CMake\ 2.8-1.app/Contents/bin/cmake -DBUILD_TYPE=Release -P cmake_install.cmake

-- Install configuration: "Release"

-- Installing: /usr/local/include/btBulletCollisionCommon.h

CMake Error at src/cmake_install.cmake:31 (FILE):

file INSTALL cannot copy file

"/Users/aswaab/Documents/bullet-2.76/src/btBulletCollisionCommon.h" to

"/usr/local/include/btBulletCollisionCommon.h".

Call Stack (most recent call first):

cmake_install.cmake:33 (INCLUDE)

make: *** [install_buildpart_0] Error 1

Looks like it cannot copy into /usr/local/include. Not sure why. Nice to see a few people got it working, though.

Link to comment
Share on other sites

Oops, here you go. I had to zip it up first.

Thank you so much for doing that, goldleaf! And thanks to everyone else for helping me with this. I'm sure other people will be helped by this, as well.

Unfortunately, goldleaf's DSO doesn't seem to be loading for me, so I'm guessing I have some kind of configuration issue that is compounding the problem. I'm going to update to Snow Leopard later this week, install the newest XCode, and then see what happens. Sounds like it may just be an OS configuration issue screwing with the DSOs somehow. All the "file is not of required architecture" warnings sound like that may be the issue.

Link to comment
Share on other sites

Thank you so much for doing that, goldleaf! And thanks to everyone else for helping me with this. I'm sure other people will be helped by this, as well.

Unfortunately, goldleaf's DSO doesn't seem to be loading for me, so I'm guessing I have some kind of configuration issue that is compounding the problem. I'm going to update to Snow Leopard later this week, install the newest XCode, and then see what happens. Sounds like it may just be an OS configuration issue screwing with the DSOs somehow. All the "file is not of required architecture" warnings sound like that may be the issue.

SUCCESS!!!!!!! :D

Updated to Mac OS 10.6.3. Updated XCode to 3.2.1 Using Houdini 10.0.528

Goldleaf's DSO did not work for me, even after the update, so I ended up doing the compile myself. I'm going to post a detailed walk through tomorrow to explain how I did it with XCode. I can see that there are already several nicely detailed responses in here, but I'm going to add mine, as well, since it differs slightly from some of the other posts. I also want to be very specific about the instructions so that someone who has never opened the terminal or XCode can put this together.

THANK YOU SO MUCH FOR THE HELP, EVERYONE!

Edited by bandini
Link to comment
Share on other sites

Then updated the build.sh script to reflect the location of the include and lib directories:

BULLET_INC=/usr/local/include

BULLET_LIB=/usr/local/lib

And, sadly, it errors out. No Bullet.

Making debug version

Linking with 'libBulletDynamics'

Linking with 'libBulletCollision'

Linking with 'libBulletSoftBody'

Linking with 'libLinearMath'

Making SIM_SolverBullet.o and /Users/aswaab/Library/Preferences/houdini/10.0/dso/SIM_SolverBullet.dylib from SIM_SolverBullet.cpp

cc1plus: warning: command line option "-fobjc-gc-only" is valid for ObjC/ObjC++ but not for C++

ld: warning in /usr/local/lib/libBulletDynamics.a, file is not of required architecture

ld: warning in /usr/local/lib/libBulletCollision.a, file is not of required architecture

ld: warning in /usr/local/lib/libBulletSoftBody.a, file is not of required architecture

ld: warning in /usr/local/lib/libLinearMath.a, file is not of required architecture

Undefined symbols:

"btAlignedFreeInternal(void*)", referenced from:

btCollisionObject::operator delete(void*)in SIM_SolverBullet.o

btConvexShape::operator delete(void*)in SIM_SolverBullet.o

btSphereShape::operator delete(void*)in SIM_SolverBullet.o

btTriangleIndexVertexArray::operator delete(void*)in SIM_SolverBullet.o

btAlignedAllocator<int, 16u>::deallocate(int*) in SIM_SolverBullet.o

btAlignedAllocator<BT_QUANTIZED_BVH_NODE, 16u>::deallocate(BT_QUANTIZED_BVH_NODE*)in SIM_SolverBullet.o

btAlignedAllocator<btGImpactMeshShapePart*, 16u>::deallocate(btGImpactMeshShapePart**)in SIM_SolverBullet.o

btAlignedAllocator<btHashInt, 16u>::deallocate(btHashInt*) in SIM_SolverBullet.o

btAlignedAllocator<btTriangleInfo, 16u>::deallocate(btTriangleInfo*)in SIM_SolverBullet.o

"btCollisionShape::getContactBreakingThreshold(float) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btSequentialImpulseConstraintSolver::btSequentialImpulseConstraintSolver()", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btConvexTriangleMeshShape::btConvexTriangleMeshShape(btStridingMeshInterface*, bool)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btTypedConstraint::serialize(void*, btSerializer*) const", referenced from:

vtable for btTypedConstraintin SIM_SolverBullet.o

"vtable for btBoxShape", referenced from:

btBoxShape::btBoxShape(btVector3 const&)in SIM_SolverBullet.o

"vtable for btConvexInternalShape", referenced from:

btConvexInternalShape::~btConvexInternalShape()in SIM_SolverBullet.o

"btMultiSphereShape::btMultiSphereShape(btVector3 const*, float const*, int)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"vtable for btGImpactMeshShapePart", referenced from:

btGImpactMeshShapePart::btGImpactMeshShapePart(btStridingMeshInterface*, int)in SIM_SolverBullet.o

"btPolyhedralConvexShape::btPolyhedralConvexShape()", referenced from:

btBoxShape::btBoxShape(btVector3 const&)in SIM_SolverBullet.o

"btDiscreteDynamicsWorld::btDiscreteDynamicsWorld(btDispatcher*, btBroadphaseInterface*, btConstraintSolver*, btCollisionConfiguration*)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btConcaveShape::btConcaveShape()", referenced from:

btGImpactShapeInterface::btGImpactShapeInterface()in SIM_SolverBullet.o

"btCollisionShape::getBoundingSphere(btVector3&, float&) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btConcaveShape::~btConcaveShape()", referenced from:

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

btGImpactShapeInterface::~btGImpactShapeInterface()in SIM_SolverBullet.o

"btGImpactQuantizedBvh::buildSet()", referenced from:

btGImpactShapeInterface::calcLocalAABB() in SIM_SolverBullet.o

"btRigidBody::btRigidBody(btRigidBody::btRigidBodyConstructionInfo const&)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"vtable for btGImpactMeshShape", referenced from:

btGImpactMeshShape::btGImpactMeshShape(btStridingMeshInterface*)in SIM_SolverBullet.o

"vtable for btPolyhedralConvexShape", referenced from:

btPolyhedralConvexShape::~btPolyhedralConvexShape()in SIM_SolverBullet.o

"btAlignedAllocInternal(unsigned long, int)", referenced from:

btCollisionObject::operator new(unsigned long)in SIM_SolverBullet.o

btConvexShape::operator new(unsigned long)in SIM_SolverBullet.o

btSphereShape::operator new(unsigned long)in SIM_SolverBullet.o

btTriangleIndexVertexArray::operator new(unsigned long)in SIM_SolverBullet.o

btAlignedAllocator<btGImpactMeshShapePart*, 16u>::allocate(int, btGImpactMeshShapePart* const**)in SIM_SolverBullet.o

"btRigidBody::setGravity(btVector3 const&)", referenced from:

SIM_SolverBullet::processSubData(SIM_Object*, bulletBodystr&) in SIM_SolverBullet.o

"vtable for btSphereShape", referenced from:

btSphereShape::btSphereShape(float)in SIM_SolverBullet.o

"btGImpactQuantizedBvh::refit()", referenced from:

btGImpactQuantizedBvh::update() in SIM_SolverBullet.o

"btCapsuleShape::btCapsuleShape(float, float)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btConvexInternalShape::btConvexInternalShape()", referenced from:

btSphereShape::btSphereShape(float)in SIM_SolverBullet.o

"btCollisionShape::serializeSingleShape(btSerializer*) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btDefaultCollisionConfiguration::btDefaultCollisionConfiguration(btDefaultCollisionConstructionInfo const&)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btGImpactCollisionAlgorithm::registerAlgorithm(btCollisionDispatcher*)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btCollisionDispatcher::btCollisionDispatcher(btCollisionConfiguration*)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

"btCollisionShape::getAngularMotionDisc() const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btCollisionShape::serialize(void*, btSerializer*) const", referenced from:

vtable for btGImpactShapeInterfacein SIM_SolverBullet.o

"btTriangleIndexVertexArray::btTriangleIndexVertexArray(int, int*, int, int, float*, int)", referenced from:

SIM_SolverBullet::addBulletBody(SIM_Object*) in SIM_SolverBullet.o

"btConvexShape::~btConvexShape()", referenced from:

btConvexInternalShape::~btConvexInternalShape()in SIM_SolverBullet.o

"typeinfo for btConcaveShape", referenced from:

typeinfo for btGImpactShapeInterfacein SIM_SolverBullet.o

"btDbvtBroadphase::btDbvtBroadphase(btOverlappingPairCache*)", referenced from:

SIM_SolverBulletState::initSystem() in SIM_SolverBullet.o

ld: symbol(s) not found

collect2: ld returned 1 exit status

Not sure what's happening there.

This error was caused by "SIM_API"

Search the SIM_SolverBullet.h, and you will find "class SIM_API SIM_BulletData : public SIM_Data", which should be "class SIM_BulletData : public SIM_Data"

Check this :

And with this problem solved, my dso was compiled successfully

Edited by GuiQing
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...