Can't build OpenMW with bullet built from git with double precision and multithreading

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Post Reply
User avatar
heilkitty
Posts: 158
Joined: 11 Aug 2011, 07:57
Location: Vivec City, MW
Contact:

Can't build OpenMW with bullet built from git with double precision and multithreading

Post by heilkitty »

ld throws the following error for every executable:

Code: Select all

/usr/bin/ld: cannot find -lBulletCollision-float64
/usr/bin/ld: cannot find -lLinearMath-float64
collect2: error: ld returned 1 exit status
make[2]: *** [apps/openmw/CMakeFiles/openmw.dir/build.make:4502: openmw] Error 1
make[1]: *** [CMakeFiles/Makefile2:881: apps/openmw/CMakeFiles/openmw.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
I'm pretty sure, it's because of bullet.
Ubuntu 20.04.
OpenMW@68ddde84fe77ec2c51098f61933d66d3d1c009a7 :

Code: Select all

$ cmake -LA | grep -i bullet
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error: The source directory "/home/heilkitty/soft/openmw/build" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
BULLET_COLLISION_LIBRARY:FILEPATH=/usr/local/lib/libBulletCollision.so
BULLET_COLLISION_LIBRARY_DEBUG:FILEPATH=BULLET_COLLISION_LIBRARY_DEBUG-NOTFOUND
BULLET_DYNAMICS_LIBRARY:FILEPATH=/usr/local/lib/libBulletDynamics.so
BULLET_DYNAMICS_LIBRARY_DEBUG:FILEPATH=BULLET_DYNAMICS_LIBRARY_DEBUG-NOTFOUND
BULLET_INCLUDE_DIR:PATH=/usr/local/include/bullet
BULLET_MATH_LIBRARY:FILEPATH=/usr/local/lib/libLinearMath.so
BULLET_MATH_LIBRARY_DEBUG:FILEPATH=BULLET_MATH_LIBRARY_DEBUG-NOTFOUND
BULLET_SOFTBODY_LIBRARY:FILEPATH=/usr/local/lib/libBulletSoftBody.so
BULLET_SOFTBODY_LIBRARY_DEBUG:FILEPATH=BULLET_SOFTBODY_LIBRARY_DEBUG-NOTFOUND
BULLET_STATIC:BOOL=OFF
BULLET_USE_DOUBLES:BOOL=TRUE
OPENMW_USE_SYSTEM_BULLET:BOOL=ON
bullet@00cd39dc500dfe26818aaaae8db0ed5ac6a50fa2 :

Code: Select all

$ cmake -LA | grep -i -e "thread" -e "double"
CMake Warning:
  No source or binary directory provided.  Both will be assumed to be the
  same as the current working directory, but note that this warning will
  become a fatal error in future CMake releases.


CMake Error: The source directory "/home/heilkitty/soft/bullet3/build_cmake" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.
BULLET2_MULTITHREADING:BOOL=ON
BULLET2_USE_OPEN_MP_MULTITHREADING:BOOL=OFF
BULLET2_USE_TBB_MULTITHREADING:BOOL=OFF
USE_DOUBLE_PRECISION:BOOL=ON
Last edited by heilkitty on 30 Apr 2021, 11:22, edited 1 time in total.
User avatar
psi29a
Posts: 5360
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Can't build OpenMW with bullet built from git with double precision

Post by psi29a »

If you're running Ubuntu 20.04, then you should have bullet installed with these files:

https://packages.ubuntu.com/focal/amd64 ... 8/filelist

Code: Select all

/usr/lib/x86_64-linux-gnu/libBullet3Collision-float64.so.2.88
/usr/lib/x86_64-linux-gnu/libBullet3Collision.so.2.88
/usr/lib/x86_64-linux-gnu/libBullet3Common-float64.so.2.88
/usr/lib/x86_64-linux-gnu/libBullet3Common.so.2.88
/usr/lib/x86_64-linux-gnu/libBullet3Dynamics-float64.so.2.88
/usr/lib/x86_64-linux-gnu/libBullet3Dynamics.so.2.88
/usr/lib/x86_64-linux-gnu/libBullet3Geometry-float64.so.2.88
/usr/lib/x86_64-linux-gnu/libBullet3Geometry.so.2.88
/usr/lib/x86_64-linux-gnu/libBullet3OpenCL_clew-float64.so.2.88
/usr/lib/x86_64-linux-gnu/libBullet3OpenCL_clew.so.2.88
/usr/lib/x86_64-linux-gnu/libBulletCollision-float64.so.2.88
/usr/lib/x86_64-linux-gnu/libBulletCollision.so.2.88
/usr/lib/x86_64-linux-gnu/libBulletDynamics-float64.so.2.88
/usr/lib/x86_64-linux-gnu/libBulletDynamics.so.2.88
/usr/lib/x86_64-linux-gnu/libBulletSoftBody-float64.so.2.88
/usr/lib/x86_64-linux-gnu/libBulletSoftBody.so.2.88
/usr/lib/x86_64-linux-gnu/libLinearMath-float64.so.2.88
/usr/lib/x86_64-linux-gnu/libLinearMath.so.2.88
/usr/share/doc/libbullet2.88/changelog.Debian.gz
/usr/share/doc/libbullet2.88/copyright
/usr/share/lintian/overrides/libbullet2.88
The fact that it can't be found on your system, indicates that you're not using standard bullet libraries.

Double precision comes out of the box by Ubuntu. However your title is misleading... it looks like you are trying to enable multithreading. In that case, you'll need to modify your libraries to prepend float64 to them, like above, to follow the Debian and Ubuntu way of doing things so that single precision and double precision can live side by side.
User avatar
heilkitty
Posts: 158
Joined: 11 Aug 2011, 07:57
Location: Vivec City, MW
Contact:

Re: Can't build OpenMW with bullet built from git with double precision and multithreading

Post by heilkitty »

Changed the title in order to avoid further confusion.
Do you mean applying 0003-If-building-with-double-precision-namespace-all-libr.patch and 0004-CMake-definitions-use-the-namespaced-library-names.patch ?
User avatar
psi29a
Posts: 5360
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Can't build OpenMW with bullet built from git with double precision and multithreading

Post by psi29a »

I believe those are it, yes.
User avatar
heilkitty
Posts: 158
Joined: 11 Aug 2011, 07:57
Location: Vivec City, MW
Contact:

Re: Can't build OpenMW with bullet built from git with double precision and multithreading

Post by heilkitty »

Thanks, I'll try it.
Post Reply