Bullet problems

Everything about development and the OpenMW source code.
Locked
User avatar
lgromanowski
Site Admin
Posts: 1193
Joined: 05 Aug 2011, 22:21
Location: Wroclaw, Poland
Contact:

Bullet problems

Post by lgromanowski »

jhooks1 wrote: Posted this in the NPC thread, should have put it here.




I updated my master branch to zini's latest. I am getting a cmake error that it can't find bullet. I downloaded bullet and C:\bullet-2.77\src is my bullet include directory.

OpenMW pre-built binaries not found. Using standard locations.
Looking for OGRE
Using OGRE SDK
Looking for OIS...
Found OIS: optimized;C:/OgreSDK_vc10_v1-7-1/lib/release/OIS.lib;debug;C:/OgreSDK_vc10_v1-7-1/lib/debug/OIS_d.lib
CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
Could NOT find Bullet (missing: BULLET_DYNAMICS_LIBRARY
BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY BULLET_SOFTBODY_LIBRARY)
Call Stack (most recent call first):
C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
cmake/FindBullet.cmake:66 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:259 (find_package)


Configuring incomplete, errors occurred!
Peppe wrote:
jhooks1 wrote:Could NOT find Bullet (missing: BULLET_DYNAMICS_LIBRARY
BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY BULLET_SOFTBODY_LIBRARY)
I'm reading that as that it can not locate the library so files. Just unpacking the bullet source code is not enough, you need to build it as well.
jhooks1 wrote: I didn't know it had to be built. I used cmake and vs2010 to build bullet, and set BULLET_INCLUDE_DIR to the build folder and I am still getting the same errors. On windows btw. I must be doing something wrong when building.
jhooks1 wrote: Could anyone provide instructions for building bullet in Windows? Or perhaps provide the library pre-built?

I've tried using mingw and vs2010 and have not gotten either to build the library.
jhooks1 wrote: The vs2010 build is successful and all the demo files execute properly. I have the .lib files but there are no .dlls.
Zini wrote: Looks you created a static build, so you don't need DLLs.
jhooks1 wrote: Ok, so what directory from what I built do I set as BULLET_INCLUDE_DIR?

EDIT: I also get this cmake warning for bullet
WARNING: you are using the obsolete 'GLU' package, please use 'OpenGL' instead
Zini wrote: On my system the cmake script created the following value for this variable:

/usr/local/include/bullet

That is on Linux though. No idea, if it is of any help to you.
gus wrote:
Ok, so what directory from what I built do I set as BULLET_INCLUDE_DIR?
I think it's the /src directory.
jhooks1 wrote: I have tried the src directory and I still get the same error.
gus wrote: You have to copy past your Bullet .lib in bullet/lib/ i think. Did you set BULLET_ROOT ?
jhooks1 wrote: Ah, Thank you!! Pasted the libs and set the BULLET_ROOT.

It works now!
jhooks1 wrote: I am getting this now when I try to generate:

CMake Error at apps/openmw/CMakeLists.txt:225 (add_executable):
Cannot find source file "btKinematicCharacterController.cpp". Tried
extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in
.txx
Zini wrote: This tells me you forgot to update your submodules.
jhooks1 wrote: Thanks, that fixed it.
Star-Demon wrote:
Zini wrote:This tells me you forgot to update your submodules.
Okay. I think it's time I made that "session" flowchart...
jhooks1 wrote: Openmw crashes with no error message now.
This is all I get:
C:\OgreSDK_vc10_v1-7-2\bin\release>openmw
Using global config file: openmw.cfg
Using user config file: openmw.cfg
Data directory: C:/Program Files/Bethesda Softworks/Morrowind/Data Files
Adding C:/Program Files/Bethesda Softworks/Morrowind/Data Files/Bloodmoon.bsa
Adding C:/Program Files/Bethesda Softworks/Morrowind/Data Files/Flora Glow.bsa
Adding C:/Program Files/Bethesda Softworks/Morrowind/Data Files/Morrowind.bsa
Adding C:/Program Files/Bethesda Softworks/Morrowind/Data Files/Tribunal.bsa
Loading ESM C:/Program Files/Bethesda Softworks/Morrowind/Data Files/Morrowind.e
sm
Sound output: OpenAL
Sound decoder: Audiere
loading cell 'Beshara'


I can still get my old pre-bullet exes to work. I have tried both the code from github and the .0.10.0 source package
Zini wrote: A configuration error maybe. Can't say more without more data. Stack backtrace, please!
jhooks1 wrote: I got it running now 8-) , I think I had some bad directories set which were causing the problems.
Star-Demon wrote: Having same problem. What was the cmd command to set the path and what is going where?

Code: Select all

CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:91 (MESSAGE):
  Could NOT find Bullet (missing: BULLET_DYNAMICS_LIBRARY
  BULLET_COLLISION_LIBRARY BULLET_MATH_LIBRARY BULLET_SOFTBODY_LIBRARY)
Call Stack (most recent call first):
  C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:252 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindBullet.cmake:66 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:259 (find_package)
Star-Demon wrote: I've tried different versions of:
setx BULLET_ROOT dfdfdf/lib
setx BULLET_ROOT dfdfdf/src

but none of it works.

Bullet builds, the demos run, but I can't find a header directory in the built directory (src?). the libraries re all in /debug/, but I just moved them one up.

otherwise, I'm back to not being able to make OpenMW...
jhooks1 wrote: Try setting your BULLET_ROOT cmake variable to dfdfdf

Set BULLET_INCLUDE_DIR to dfdfdf/src

Make sure you copy the libs that you built into dfdfdf/lib

Hope this helps.
Star-Demon wrote:

Code: Select all

openmw\libs\openengine/bullet/physic.hpp(4): fatal error C1083: Cannot open include file: 'BulletDynamics/Dynamics/btRigidBody.h': No such file or directory
Still won't build. I have it. I built it, Cmake doesn't complain, but the project still doesn't work because it still doesn't know where the library is, even though the include directory points to the place it needs to. (/BULLET-Build/src)
athile wrote: I updated the prebuilt debug binaries for Visual Studio 2010 that I made months ago to now include bullet, made a change to the root CMakeLists.txt to pick up the change, and a simple code change to fix a compile error (a missing header #include that must be implicitly included on Linux). That got OpenMW building and running for me after creating a fresh fork.

The updated VS2010 debug binaries (20 MB) are at: http://www.athile.net/files/openmw/open ... 0110531.7z

The small commit to update the CMakeLists.txt and fix the Windows compile issue is here: https://github.com/athile/openmw/commit ... 59d8dc78a1


Theoretically downloading that, unzipping to a "prebuilt" directory under the root "openmw" directory, and picking up the code changes from my branch should get OpenMW building and running -- or at least it did for me :)
Star-Demon wrote: Wow. Awesome. I'll try this soon.
jhooks1 wrote: Try this in Visual Studio:

openmw->Properties->Configuration Properties->C/C++->General->Additional Include Directories

Add C:/bullet/src. I think this will fix your problem
Star-Demon wrote:
jhooks1 wrote:Try this in Visual Studio:

openmw->Properties->Configuration Properties->C/C++->General->Additional Include Directories

Add C:/bullet/src. I think this will fix your problem
It's already there.
gus wrote: I wouldn't do that if i were you. I did it once, and I about forgot it. And hell broke loose when I installed a new version of bullet.
Star-Demon wrote: Well, you would think that as long as you set the correct directory in Cmake, the project would also have it, but that doesn't mean anything to Cmake, and even though VS has the same directory, it's obviously not correct.

Maybe I'll tear down the whole thing and start over. I don't look forward to that. Problem is I don't remember how I got the other libraries to work when neither their source would build correctly or the binaries don't install correctly.

Very frustrating.

You don't suppose there was something wrong when I built bullet, do you? I really don't know what's the proper way to go about it without experimenting on my own. I have zero guidance here.

I download libraries, build them, tell Cmake where they are, sometimes set environment variables, sometimes don't.

If there is any way I could simplify this process, I would do it and hopefully be the only fool who found the 1000 ways it doesn't work.
Star-Demon wrote:
athile wrote:I updated the prebuilt debug binaries for Visual Studio 2010 that I made months ago to now include bullet, made a change to the root CMakeLists.txt to pick up the change, and a simple code change to fix a compile error (a missing header #include that must be implicitly included on Linux). That got OpenMW building and running for me after creating a fresh fork.

The updated VS2010 debug binaries (20 MB) are at: http://www.athile.net/files/openmw/open ... 0110531.7z

The small commit to update the CMakeLists.txt and fix the Windows compile issue is here: https://github.com/athile/openmw/commit ... 59d8dc78a1


Theoretically downloading that, unzipping to a "prebuilt" directory under the root "openmw" directory, and picking up the code changes from my branch should get OpenMW building and running -- or at least it did for me :)
This worked very well. Great work! I hope we can maintain this as the project continues.
Locked