[SOLVED] Unable to compilation in Manjaro/Arch

Support for running, installing or compiling OpenMW

Before you submit a bug report for the first time, please read: Bug reporting guidelines
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

[SOLVED] Unable to compilation in Manjaro/Arch

Post by Naugrim »

Hi,

It's been a while since (months) since I last tested and now the compilation fails with the same process I was using. Back in the day Iy took dependencies from https://aur.archlinux.org/packages/openmw-git/ and run without problems, but now I get.

Code: Select all

/usr/bin/ld: CMakeFiles/openmw.dir/mwphysics/physicssystem.cpp.o: in function `MWPhysics::PhysicsSystem::updateWater()':
physicssystem.cpp:(.text+0x2f3a): undefined reference to `btStaticPlaneShape::btStaticPlaneShape(btVector3 const&, double)'
/usr/bin/ld: CMakeFiles/openmw.dir/mwphysics/physicssystem.cpp.o: in function `MWPhysics::PhysicsSystem::getHitContact(MWWorld::ConstPtr const&, osg::Vec3f const&, osg::Quat const&, float, std::vector<MWWorld::Ptr, std::allocator<MWWorld::Ptr> >&)':
physicssystem.cpp:(.text+0x7485): undefined reference to `btConeShape::btConeShape(double, double)'
/usr/bin/ld: CMakeFiles/openmw.dir/mwphysics/heightfield.cpp.o: in function `MWPhysics::HeightField::HeightField(float const*, int, int, float, float, float, float, osg::Object const*)':
heightfield.cpp:(.text+0x27f): undefined reference to `btHeightfieldTerrainShape::btHeightfieldTerrainShape(int, int, void const*, double, double, double, int, PHY_ScalarType, bool)'
/usr/bin/ld: CMakeFiles/openmw.dir/mwphysics/mtphysics.cpp.o: in function `MWPhysics::PhysicsTaskScheduler::convexSweepTest(btConvexShape const*, btTransform const&, btTransform const&, btCollisionWorld::ConvexResultCallback&) const':
mtphysics.cpp:(.text+0x14d5): undefined reference to `btCollisionWorld::convexSweepTest(btConvexShape const*, btTransform const&, btTransform const&, btCollisionWorld::ConvexResultCallback&, double) const'
/usr/bin/ld: ../../components/libcomponents.a(bulletshapemanager.cpp.o):(.data.rel.ro._ZTVN8Resource17TriangleMeshShapeE[_ZTVN8Resource17TriangleMeshShapeE]+0x28): undefined reference to `btCollisionShape::getBoundingSphere(btVector3&, double&) const'
/usr/bin/ld: ../../components/libcomponents.a(bulletshapemanager.cpp.o):(.data.rel.ro._ZTVN8Resource17TriangleMeshShapeE[_ZTVN8Resource17TriangleMeshShapeE]+0x38): undefined reference to `btCollisionShape::getContactBreakingThreshold(double) const'
/usr/bin/ld: ../../components/libcomponents.a(bulletshapemanager.cpp.o):(.data.rel.ro._ZTVN8Resource17TriangleMeshShapeE[_ZTVN8Resource17TriangleMeshShapeE]+0x50): undefined reference to `btTriangleMeshShape::calculateLocalInertia(double, btVector3&) const'
/usr/bin/ld: CMakeFiles/openmw.dir/mwphysics/trace.cpp.o: in function `MWPhysics::ActorTracer::doTrace(btCollisionObject const*, osg::Vec3f const&, osg::Vec3f const&, btCollisionWorld const*)':
trace.cpp:(.text+0x1a2): undefined reference to `btCollisionWorld::convexSweepTest(btConvexShape const*, btTransform const&, btTransform const&, btCollisionWorld::ConvexResultCallback&, double) const'
/usr/bin/ld: CMakeFiles/openmw.dir/mwphysics/trace.cpp.o: in function `MWPhysics::ActorTracer::findGround(MWPhysics::Actor const*, osg::Vec3f const&, osg::Vec3f const&, btCollisionWorld const*)':
trace.cpp:(.text+0x4e2): undefined reference to `btCollisionWorld::convexSweepTest(btConvexShape const*, btTransform const&, btTransform const&, btCollisionWorld::ConvexResultCallback&, double) const'
collect2: error: ld returned 1 exit status
make[2]: *** [apps/openmw/CMakeFiles/openmw.dir/build.make:4465: openmw] Error 1
make[1]: *** [CMakeFiles/Makefile2:880: apps/openmw/CMakeFiles/openmw.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
I assumes the issue was because latest bullet version in the repos is 3.07 and downgraded to 2.86-2 as states in the wiki https://wiki.openmw.org/index.php/Devel ... ment_Setup, but no luck.

Any idea will be greatly and humbly appreciated?
Last edited by Naugrim on 03 Jan 2021, 22:41, edited 1 time in total.
User avatar
psi29a
Posts: 5356
Joined: 29 Sep 2011, 10:13
Location: Belgium
Gitlab profile: https://gitlab.com/psi29a/
Contact:

Re: Unable to compilation in Manjaro/Arch

Post by psi29a »

Manjaro/Arch needs to provide double precision bullet.

Apparently it's an open bug:
https://bugs.archlinux.org/task/41368

You'll need to contribute to this bug that openmw requires this as well.

You can point out that Debian/Ubuntu has had it for years now.
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

Re: Unable to compilation in Manjaro/Arch

Post by Naugrim »

Sorry, I did not understand the problem. It seems like a long standing issue, but I was able to compile without problems some time back.
I will start trying multiple versions of the standard "bullet" package just in case some fixes it.
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: Unable to compilation in Manjaro/Arch

Post by AnyOldName3 »

As we said, OpenMW needs double-precision Bullet, and it won't build without it. If you change OpenMW so it can be built without double-precision Bullet, you'll run into a bunch of collision bugs. The change to requiring double-precision Bullet was fairly recent, and is one of the reasons why we've closed so many collision-related issues recently. Just because old versions of OpenMW didn't need double-precision Bullet, it doesn't mean up-to-date ones don't.
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

Re: Unable to compilation in Manjaro/Arch

Post by Naugrim »

AnyOldName3 wrote: 03 Jan 2021, 21:22 As we said, OpenMW needs double-precision Bullet, and it won't build without it. If you change OpenMW so it can be built without double-precision Bullet, you'll run into a bunch of collision bugs. The change to requiring double-precision Bullet was fairly recent, and is one of the reasons why we've closed so many collision-related issues recently. Just because old versions of OpenMW didn't need double-precision Bullet, it doesn't mean up-to-date ones don't.
Thanks a lot for the exanaplation, now I understand.

After some head-bashing, I could work arround the issue compiling 2.89 tag of bullet3 and installing to a temp dir:

Code: Select all

cmake \
-DCMAKE_INSTALL_PREFIX:PATH=/BULLET_INSTALL_PATH \
-DUSE_DOUBLE_PRECISION=ON \
-DINSTALL_LIBS=ON \
-DCMAKE_BUILD_TYPE=Release ..
Then, compiling OpenMW pointing to it:

Code: Select all

rm -rf build && \
mkdir build && \
cd build && \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DBULLET_DYNAMICS_LIBRARY=/BULLET_INSTALL_PATH/lib/libBulletDynamics.a \
-DBULLET_COLLISION_LIBRARY=/BULLET_INSTALL_PATH/lib/libBulletCollision.a \
-DBULLET_MATH_LIBRARY=/BULLET_INSTALL_PATH/lib/libLinearMath.a \
-DBULLET_SOFTBODY_LIBRARY=/BULLET_INSTALL_PATH/lib/libBulletSoftBody.a \
-DBULLET_INCLUDE_DIR=/BULLET_INSTALL_PATH/include/bullet ../
unelsson
Posts: 227
Joined: 17 Mar 2018, 14:57

Re: [SOLVED] Unable to compilation in Manjaro/Arch

Post by unelsson »

I'm using Manjaro, and haven't encountered problems using bullet 3.05-1.
LoneWolf
Posts: 138
Joined: 26 Sep 2017, 19:13

Re: [SOLVED] Unable to compilation in Manjaro/Arch

Post by LoneWolf »

For those failing to build openmw-git on archlinux , manjaro and other distros that support AUR :
use my https://aur.archlinux.org/packages/bullet-multithreaded

It's built with multithreaded support (needed for async physics) AND Double precision .
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

Re: [SOLVED] Unable to compilation in Manjaro/Arch

Post by Naugrim »

unelsson wrote: 04 Jan 2021, 00:39 I'm using Manjaro, and haven't encountered problems using bullet 3.05-1.
I am curious, I tried again with 3.05-1, 3.05-2 and 3.07-1 and I get the error.
User avatar
AnyOldName3
Posts: 2668
Joined: 26 Nov 2015, 03:25

Re: [SOLVED] Unable to compilation in Manjaro/Arch

Post by AnyOldName3 »

Did you build them with single-precision or double-precision?
Naugrim
Posts: 172
Joined: 08 Jan 2016, 01:32
Location: Spain

Re: [SOLVED] Unable to compilation in Manjaro/Arch

Post by Naugrim »

Can't really say, been trting with different flags like -D BULLET2_MULTITHREADING=ON, but honestly, I don't see any performance change.
Post Reply