Link fail with bullet
Hi all, please help me.
bullet-3.24 link errors:
/usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o: in function
BulletWorldOffset::createRigidBody(bool, float, btTransform const&, btCollisionShape*, char const*)': /builddir/build/BUILD/stuntrally-2.7/source/ogre/common/SceneObjects.cpp:77: undefined reference tobtRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&)' /usr/bin/aarch64-rosa-linux-gnu-ld: /builddir/build/BUILD/stuntrally-2.7/source/ogre/common/SceneObjects.cpp:78: undefined reference tobtRigidBody::setDamping(float, float)' /usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x40): undefined reference tobtWorldImporter::createPlaneShape(btVector3 const&, float)' /usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x50): undefined reference tobtWorldImporter::createSphereShape(float)' /usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x58): undefined reference tobtWorldImporter::createCapsuleShapeX(float, float)' /usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x60): undefined reference tobtWorldImporter::createCapsuleShapeY(float, float)'> /usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o: in functionBulletWorldOffset::createRigidBody(bool, float, btTransform const&, btCollisionShape*, char const*)': /builddir/build/BUILD/stuntrally-2.7/source/ogre/common/SceneObjects.cpp:77: undefined reference tobtRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&)' /usr/bin/aarch64-rosa-linux-gnu-ld: /builddir/build/BUILD/stuntrally-2.7/source/ogre/common/SceneObjects.cpp:78: undefined reference tobtRigidBody::setDamping(float, float)' /usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x40): undefined reference tobtWorldImporter::createPlaneShape(btVector3 const&, float)' /usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x50): undefined reference tobtWorldImporter::createSphereShape(float)' /usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x58): undefined reference tobtWorldImporter::createCapsuleShapeX(float, float)' /usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x60): undefined reference tobtWorldImporter::createCapsuleShapeY(float, float)' /usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x68): undefined reference tobtWorldImporter::createCapsuleShapeZ(float, float)' /usr/bin/aarch64-rosa-linux-gnu-ld: source/CMakeFiles/sr-editor.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x68): undefined reference tobtWorldImporter::createCapsuleShapeZ(float, float)'
full log with ninja build https://file-store.rosalinux.ru/api/v1/file_stores/84682a62e8fc96aa4e6439a4b019c2f5fb25f4d6.log?show=true
I make patch and add more bullet libs: https://abf.io/import/stuntrally/blob/rosa2021.1/stuntrally-add-more-bullet-libs.patch not help me.
Looks like linker (ld) didnt't link btWorldImporter or something similar. Seems like it complied fine, because cpp.o files are there.
I'm not sure, but guessing that bulletXmlWorldImporter is not what we use. We need bulletWorldImporter for that binary .bullet files.
So I think something wrong here:
_BULLET_APPEND_LIBRARIES(BULLET_LIBRARIES BULLET_XMLWORLDIMPORTER_LIBRARY)
Does it work without XML?
And we likely don't need other 2 close to this line.
Other thing I noticed on last link:
The game features 49 tracks in 6 sceneries, 7 cars and a Track Editor.
Which year is this from? Now it's about 4x more than that.
The problem comes from bullet beeing built with double precision, I get the same build undefined reference to errors:
cd /root/stuntrally/BUILD/stuntrally-2.6.1/build/source && /usr/bin/cmake -E cmake_link_script CMakeFiles/stuntrally.dir/link.txt --verbose=1
/usr/bin/c++ -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fasynchronous-unwind-tables -fpermissive -std=c++14 -fPIC -DNDEBUG -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id=sha1 -Wl,--enable-new-dtags -rdynamic CMakeFiles/stuntrally.dir/network/gameclient.cpp.o CMakeFiles/stuntrally.dir/network/masterclient.cpp.o CMakeFiles/stuntrally.dir/ogre/BaseApp.cpp.o CMakeFiles/stuntrally.dir/ogre/BaseApp_Create.cpp.o CMakeFiles/stuntrally.dir/ogre/BaseApp_Effects.cpp.o CMakeFiles/stuntrally.dir/ogre/CGame.cpp.o CMakeFiles/stuntrally.dir/ogre/CGui.cpp.o CMakeFiles/stuntrally.dir/ogre/CHud.cpp.o CMakeFiles/stuntrally.dir/ogre/CInput.cpp.o CMakeFiles/stuntrally.dir/ogre/CarModel_Create.cpp.o CMakeFiles/stuntrally.dir/ogre/CarModel_Update.cpp.o CMakeFiles/stuntrally.dir/ogre/CarPosInfo.cpp.o CMakeFiles/stuntrally.dir/ogre/CarReflection.cpp.o CMakeFiles/stuntrally.dir/ogre/Challenges.cpp.o CMakeFiles/stuntrally.dir/ogre/ChallengesXml.cpp.o CMakeFiles/stuntrally.dir/ogre/ChampChall.cpp.o CMakeFiles/stuntrally.dir/ogre/Championships.cpp.o CMakeFiles/stuntrally.dir/ogre/ChampsXml.cpp.o CMakeFiles/stuntrally.dir/ogre/Compositor.cpp.o CMakeFiles/stuntrally.dir/ogre/FollowCamera.cpp.o CMakeFiles/stuntrally.dir/ogre/Gui_Events.cpp.o CMakeFiles/stuntrally.dir/ogre/Gui_Init.cpp.o CMakeFiles/stuntrally.dir/ogre/Gui_Input.cpp.o CMakeFiles/stuntrally.dir/ogre/Gui_KeyPress.cpp.o CMakeFiles/stuntrally.dir/ogre/Gui_Network.cpp.o CMakeFiles/stuntrally.dir/ogre/Gui_Replay.cpp.o CMakeFiles/stuntrally.dir/ogre/Gui_Tweak.cpp.o CMakeFiles/stuntrally.dir/ogre/Gui_Util.cpp.o CMakeFiles/stuntrally.dir/ogre/Hud_Create.cpp.o CMakeFiles/stuntrally.dir/ogre/Hud_Graphs.cpp.o CMakeFiles/stuntrally.dir/ogre/Hud_Update.cpp.o CMakeFiles/stuntrally.dir/ogre/LoadingBar.cpp.o CMakeFiles/stuntrally.dir/ogre/Replay.cpp.o CMakeFiles/stuntrally.dir/ogre/ReplayOld.cpp.o CMakeFiles/stuntrally.dir/ogre/ReplayTrk.cpp.o CMakeFiles/stuntrally.dir/ogre/SceneInit.cpp.o CMakeFiles/stuntrally.dir/ogre/SplitScreen.cpp.o CMakeFiles/stuntrally.dir/ogre/Update.cpp.o CMakeFiles/stuntrally.dir/ogre/Update_PerfTest.cpp.o CMakeFiles/stuntrally.dir/ogre/Update_Poses.cpp.o CMakeFiles/stuntrally.dir/ogre/common/Axes.cpp.o CMakeFiles/stuntrally.dir/ogre/common/CScene.cpp.o CMakeFiles/stuntrally.dir/ogre/common/GraphView.cpp.o CMakeFiles/stuntrally.dir/ogre/common/GuiCom_Options.cpp.o CMakeFiles/stuntrally.dir/ogre/common/GuiCom_Screen.cpp.o CMakeFiles/stuntrally.dir/ogre/common/GuiCom_Set.cpp.o CMakeFiles/stuntrally.dir/ogre/common/GuiCom_Track.cpp.o CMakeFiles/stuntrally.dir/ogre/common/GuiCom_TrackUpd.cpp.o CMakeFiles/stuntrally.dir/ogre/common/GuiCom_Util.cpp.o CMakeFiles/stuntrally.dir/ogre/common/Gui_Popup.cpp.o CMakeFiles/stuntrally.dir/ogre/common/Instancing.cpp.o CMakeFiles/stuntrally.dir/ogre/common/MessageBox/MessageBox.cpp.o CMakeFiles/stuntrally.dir/ogre/common/MessageBox/MessageBoxStyle.cpp.o CMakeFiles/stuntrally.dir/ogre/common/MultiList2.cpp.o CMakeFiles/stuntrally.dir/ogre/common/MyGUI_D3D11.cpp.o CMakeFiles/stuntrally.dir/ogre/common/PointerFix.cpp.o CMakeFiles/stuntrally.dir/ogre/common/PreviewTex.cpp.o CMakeFiles/stuntrally.dir/ogre/common/RenderBoxScene.cpp.o CMakeFiles/stuntrally.dir/ogre/common/SceneFluids.cpp.o CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o CMakeFiles/stuntrally.dir/ogre/common/SceneTrees.cpp.o CMakeFiles/stuntrally.dir/ogre/common/Shadows.cpp.o CMakeFiles/stuntrally.dir/ogre/common/Sky.cpp.o CMakeFiles/stuntrally.dir/ogre/common/Slider.cpp.o CMakeFiles/stuntrally.dir/ogre/common/SliderValue.cpp.o CMakeFiles/stuntrally.dir/ogre/common/Terrain.cpp.o CMakeFiles/stuntrally.dir/ogre/common/TerrainBlend.cpp.o CMakeFiles/stuntrally.dir/ogre/common/TerrainMaterial.cpp.o CMakeFiles/stuntrally.dir/ogre/common/Tools.cpp.o CMakeFiles/stuntrally.dir/ogre/common/TrackVdr.cpp.o CMakeFiles/stuntrally.dir/ogre/common/WaterRTT.cpp.o CMakeFiles/stuntrally.dir/ogre/common/data/BltObjects.cpp.o CMakeFiles/stuntrally.dir/ogre/common/data/CData.cpp.o CMakeFiles/stuntrally.dir/ogre/common/data/FluidsXml.cpp.o CMakeFiles/stuntrally.dir/ogre/common/data/SceneXml.cpp.o CMakeFiles/stuntrally.dir/ogre/common/data/SceneXml_Load.cpp.o CMakeFiles/stuntrally.dir/ogre/common/data/TracksXml.cpp.o CMakeFiles/stuntrally.dir/ogre/common/settings_com.cpp.o CMakeFiles/stuntrally.dir/ogre/common/simplexnoise.cpp.o CMakeFiles/stuntrally.dir/ogre/main.cpp.o CMakeFiles/stuntrally.dir/ogre/pch.cpp.o CMakeFiles/stuntrally.dir/road/PaceNotes.cpp.o CMakeFiles/stuntrally.dir/road/PaceNotesGen.cpp.o CMakeFiles/stuntrally.dir/road/Road_Edit.cpp.o CMakeFiles/stuntrally.dir/road/Road_File.cpp.o CMakeFiles/stuntrally.dir/road/Road_Markers.cpp.o CMakeFiles/stuntrally.dir/road/Road_Mesh.cpp.o CMakeFiles/stuntrally.dir/road/Road_Prepass.cpp.o CMakeFiles/stuntrally.dir/road/Road_Rebuild.cpp.o CMakeFiles/stuntrally.dir/road/SplineBase.cpp.o CMakeFiles/stuntrally.dir/sound/SoundBase.cpp.o CMakeFiles/stuntrally.dir/sound/SoundBaseMgr.cpp.o CMakeFiles/stuntrally.dir/sound/SoundBaseMgrUtil.cpp.o CMakeFiles/stuntrally.dir/sound/SoundMgr.cpp.o CMakeFiles/stuntrally.dir/vdrift/Buoyancy.cpp.o CMakeFiles/stuntrally.dir/vdrift/aabb.cpp.o CMakeFiles/stuntrally.dir/vdrift/aabb_space_partitioning.cpp.o CMakeFiles/stuntrally.dir/vdrift/bezier.cpp.o CMakeFiles/stuntrally.dir/vdrift/car.cpp.o CMakeFiles/stuntrally.dir/vdrift/car_sound.cpp.o CMakeFiles/stuntrally.dir/vdrift/caraero.cpp.o CMakeFiles/stuntrally.dir/vdrift/carbrake.cpp.o CMakeFiles/stuntrally.dir/vdrift/carclutch.cpp.o CMakeFiles/stuntrally.dir/vdrift/carcontrolmap_local.cpp.o CMakeFiles/stuntrally.dir/vdrift/cardifferential.cpp.o CMakeFiles/stuntrally.dir/vdrift/cardynamics.cpp.o CMakeFiles/stuntrally.dir/vdrift/cardynamics_load.cpp.o CMakeFiles/stuntrally.dir/vdrift/cardynamics_simulate.cpp.o CMakeFiles/stuntrally.dir/vdrift/cardynamics_update.cpp.o CMakeFiles/stuntrally.dir/vdrift/carengine.cpp.o CMakeFiles/stuntrally.dir/vdrift/carsuspension.cpp.o CMakeFiles/stuntrally.dir/vdrift/cartire.cpp.o CMakeFiles/stuntrally.dir/vdrift/cartransmission.cpp.o CMakeFiles/stuntrally.dir/vdrift/carwheel.cpp.o CMakeFiles/stuntrally.dir/vdrift/collision_world.cpp.o CMakeFiles/stuntrally.dir/vdrift/configfile.cpp.o CMakeFiles/stuntrally.dir/vdrift/crashdetection.cpp.o CMakeFiles/stuntrally.dir/vdrift/endian_utility.cpp.o CMakeFiles/stuntrally.dir/vdrift/forcefeedback.cpp.o CMakeFiles/stuntrally.dir/vdrift/game.cpp.o CMakeFiles/stuntrally.dir/vdrift/joepack.cpp.o CMakeFiles/stuntrally.dir/vdrift/joeserialize.cpp.o CMakeFiles/stuntrally.dir/vdrift/linearframe.cpp.o CMakeFiles/stuntrally.dir/vdrift/linearinterp.cpp.o CMakeFiles/stuntrally.dir/vdrift/mathplane.cpp.o CMakeFiles/stuntrally.dir/vdrift/mathvector.cpp.o CMakeFiles/stuntrally.dir/vdrift/model.cpp.o CMakeFiles/stuntrally.dir/vdrift/model_joe03.cpp.o CMakeFiles/stuntrally.dir/vdrift/model_obj.cpp.o CMakeFiles/stuntrally.dir/vdrift/objectloader.cpp.o CMakeFiles/stuntrally.dir/vdrift/optional.cpp.o CMakeFiles/stuntrally.dir/vdrift/par.cpp.o CMakeFiles/stuntrally.dir/vdrift/pathmanager.cpp.o CMakeFiles/stuntrally.dir/vdrift/quaternion.cpp.o CMakeFiles/stuntrally.dir/vdrift/reseatable_reference.cpp.o CMakeFiles/stuntrally.dir/vdrift/rigidbody.cpp.o CMakeFiles/stuntrally.dir/vdrift/roadpatch.cpp.o CMakeFiles/stuntrally.dir/vdrift/roadstrip.cpp.o CMakeFiles/stuntrally.dir/vdrift/rotationalframe.cpp.o CMakeFiles/stuntrally.dir/vdrift/settings.cpp.o CMakeFiles/stuntrally.dir/vdrift/suspensionbump.cpp.o CMakeFiles/stuntrally.dir/vdrift/timer.cpp.o CMakeFiles/stuntrally.dir/vdrift/toggle.cpp.o CMakeFiles/stuntrally.dir/vdrift/track.cpp.o CMakeFiles/stuntrally.dir/vdrift/track_object.cpp.o CMakeFiles/stuntrally.dir/vdrift/vertexarray.cpp.o -o ../stuntrally oics/liboics.a tinyxml/libtinyxml.a paged-geom/libpaged-geom.a btOgre/libbtOgre.a shiny/libshiny.a shiny/libshiny.OgrePlatform.a sdl4ogre/libsdl4ogre.a /usr/lib64/libboost_system.so.1.79.0 /usr/lib64/libboost_wave.so.1.79.0 -lOgreMain /usr/lib64/libboost_thread.so.1.79.0 /usr/lib64/libboost_date_time.so.1.79.0 -lOgreTerrain -lOgrePaging -lOgreOverlay -lBulletFileLoader -lBulletWorldImporter -lBulletDynamics -lBulletCollision -lLinearMath -lSDL2 -lMyGUIEngine -lMyGUI.OgrePlatform -logg -lvorbisfile -lrt -lopenal -lenet /usr/lib64/libboost_filesystem.so.1.79.0 /usr/lib64/libboost_atomic.so.1.79.0 /usr/lib64/libboost_chrono.so.1.79.0
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o: in function `BulletWorldOffset::createRigidBody(bool, float, btTransform const&, btCollisionShape*, char const*)':
/root/stuntrally/BUILD/stuntrally-2.6.1/source/ogre/common/SceneObjects.cpp:77: undefined reference to `btRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&)'
/usr/bin/ld: /root/stuntrally/BUILD/stuntrally-2.6.1/source/ogre/common/SceneObjects.cpp:78: undefined reference to `btRigidBody::setDamping(float, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x40): undefined reference to `btWorldImporter::createPlaneShape(btVector3 const&, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x50): undefined reference to `btWorldImporter::createSphereShape(float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x58): undefined reference to `btWorldImporter::createCapsuleShapeX(float, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x60): undefined reference to `btWorldImporter::createCapsuleShapeY(float, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x68): undefined reference to `btWorldImporter::createCapsuleShapeZ(float, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x70): undefined reference to `btWorldImporter::createCylinderShapeX(float, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x78): undefined reference to `btWorldImporter::createCylinderShapeY(float, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x80): undefined reference to `btWorldImporter::createCylinderShapeZ(float, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x88): undefined reference to `btWorldImporter::createConeShapeX(float, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x90): undefined reference to `btWorldImporter::createConeShapeY(float, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x98): undefined reference to `btWorldImporter::createConeShapeZ(float, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0xe0): undefined reference to `btWorldImporter::createMultiSphereShape(btVector3 const*, float const*, int)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0xf0): undefined reference to `btWorldImporter::createHeightfieldShape(int, int, void const*, float, float, float, int, int, bool)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x168): undefined reference to `btWorldImporter::createGearConstraint(btRigidBody&, btRigidBody&, btVector3 const&, btVector3 const&, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/SceneTrees.cpp.o: in function `CScene::CreateTrees()':
/root/stuntrally/BUILD/stuntrally-2.6.1/source/ogre/common/SceneTrees.cpp:401: undefined reference to `btCapsuleShapeZ::btCapsuleShapeZ(float, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/ogre/common/Terrain.cpp.o: in function `CScene::CreateBltTerrain()':
/root/stuntrally/BUILD/stuntrally-2.6.1/source/ogre/common/Terrain.cpp:313: undefined reference to `btHeightfieldTerrainShape::btHeightfieldTerrainShape(int, int, void const*, float, float, float, int, PHY_ScalarType, bool)'
/usr/bin/ld: /root/stuntrally/BUILD/stuntrally-2.6.1/source/ogre/common/Terrain.cpp:344: undefined reference to `btStaticPlaneShape::btStaticPlaneShape(btVector3 const&, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/vdrift/cardynamics_load.cpp.o: in function `CARDYNAMICS::Init(SETTINGS*, Scene*, FluidsXml*, COLLISION_WORLD&, MATHVECTOR<double, 3u> const&, QUATERNION<double> const&)':
/root/stuntrally/BUILD/stuntrally-2.6.1/source/vdrift/cardynamics_load.cpp:731: undefined reference to `btMultiSphereShape::btMultiSphereShape(btVector3 const*, float const*, int)'
/usr/bin/ld: /root/stuntrally/BUILD/stuntrally-2.6.1/source/vdrift/cardynamics_load.cpp:775: undefined reference to `btRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/vdrift/collision_world.cpp.o: in function `btDiscreteDynamicsWorld::updateVehicles(float)':
/usr/include/bullet/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h:188: undefined reference to `btDiscreteDynamicsWorld::updateActions(float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/vdrift/collision_world.cpp.o:(.data.rel.ro._ZTV13DynamicsWorld[_ZTV13DynamicsWorld]+0x80): undefined reference to `btDiscreteDynamicsWorld::stepSimulation(float, int, float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/vdrift/collision_world.cpp.o:(.data.rel.ro._ZTV13DynamicsWorld[_ZTV13DynamicsWorld]+0x130): undefined reference to `btDiscreteDynamicsWorld::predictUnconstraintMotion(float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/vdrift/collision_world.cpp.o:(.data.rel.ro._ZTV13DynamicsWorld[_ZTV13DynamicsWorld]+0x138): undefined reference to `btDiscreteDynamicsWorld::integrateTransforms(float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/vdrift/collision_world.cpp.o:(.data.rel.ro._ZTV13DynamicsWorld[_ZTV13DynamicsWorld]+0x148): undefined reference to `btDiscreteDynamicsWorld::updateActivationState(float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/vdrift/collision_world.cpp.o:(.data.rel.ro._ZTV13DynamicsWorld[_ZTV13DynamicsWorld]+0x150): undefined reference to `btDiscreteDynamicsWorld::internalSingleStepSimulation(float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/vdrift/collision_world.cpp.o:(.data.rel.ro._ZTV13DynamicsWorld[_ZTV13DynamicsWorld]+0x158): undefined reference to `btDiscreteDynamicsWorld::createPredictiveContacts(float)'
/usr/bin/ld: CMakeFiles/stuntrally.dir/vdrift/collision_world.cpp.o:(.data.rel.ro._ZTV13DynamicsWorld[_ZTV13DynamicsWorld]+0x160): undefined reference to `btDiscreteDynamicsWorld::saveKinematicState(float)'
/usr/bin/ld: btOgre/libbtOgre.a(BtOgre.cpp.o): in function `BtOgre::VertexIndexToShape::createConvex()':
/root/stuntrally/BUILD/stuntrally-2.6.1/source/btOgre/BtOgre.cpp:313: undefined reference to `btConvexHullShape::btConvexHullShape(float const*, int, int)'
collect2: error: ld returned 1 exit status
make[2]: *** [source/CMakeFiles/stuntrally.dir/build.make:2448: stuntrally] Error 1
make[2]: Leaving directory '/root/stuntrally/BUILD/stuntrally-2.6.1/build'
make[1]: *** [CMakeFiles/Makefile2:272: source/CMakeFiles/stuntrally.dir/all] Error 2
make[1]: Leaving directory '/root/stuntrally/BUILD/stuntrally-2.6.1/build'
make: *** [Makefile:139: all] Error 2
Is there a way to patch stuntrally to work with double precision bullet library ?
And how may I set the build mode to trigger an error when a wrong type is used in function call ? (double instead of float and vice-versa as it would help to try to patch all bullet call with an explicit conversion from float to double.
The patch that fixes this issue is here: https://svnweb.mageia.org/packages/cauldron/stuntrally/current/SOURCES/stuntrally-2.6.1-bullet-double.patch?revision=1919688&view=markup
You may need these patch too against bullet-3.24: https://svnweb.mageia.org/packages/cauldron/bullet/current/SOURCES/bullet-3.24-fix-bullet-config.cmake.patch?revision=1919697&view=markup
I was only able to fix the problem with version 2.6.2, after this one they complexified SOO MUCH the cmake stuff that I don't have any idea where to place the inclusion of the "-DBT_USE_DOUBLE_PRECISION" build flag
See your BulletConfig.cmake and BULLET_DEFINITIONS.
I give up on the pull request on this one.
https://svnweb.mageia.org/packages/cauldron/stuntrally/current/SOURCES/stuntrally-2.6.1-bullet-double.patch?revision=1919688&view=markup
this link not opening :(
Sorry I just updated the package to version 2.6.2: https://svnweb.mageia.org/packages/cauldron/stuntrally/current/SOURCES/stuntrally-2.6.2-bullet-double.patch?revision=1919778&view=markup
hmmm....
- i patch and rebuild bullet
- patch stuntrally and build with patched bullet Build fail.
Need more build option?
First, how may I help you without build logs ???
What command did you use to build libbullet & stuntrally ???
Plz see the SPECS files for bullet and stuntrally about how to build them. (replace SOURCES/... with SPECS/ in the links)
stuntrally 2.6.2 is available in mageia 9 by the way
Bullet spec and patch https://abf.io/import/bullet and build log https://file-store.rosalinux.ru/api/v1/file_stores/1c7071253cdfd069418dcdd3fb7943acfecbac3b.log?show=true
stuntrally spec and patch https://abf.io/import/stuntrally and build log https://file-store.rosalinux.ru/api/v1/file_stores/71cca51d72afce097c9ecc3de2d78c20f4546445.log?show=true
Bullet build seems fine, but your stuntrally build seems to miss "-DBT_USE_DOUBLE_PRECISION" in build commands.
You miss the part where BULLET_DEFINITIONS is extracted from BulletConfig.cmake and then reinjected as compile option: https://svnweb.mageia.org/packages/cauldron/stuntrally/current/SOURCES/stuntrally-2.6.2-bullet-double.patch?revision=1919778&view=markup
All is important in this patch ;)
-DBT_USE_DOUBLE_PRECISION need in stuntrally? i set it and see in build log:
Manually-specified variables were not used by the project: BT_USE_DOUBLE_PRECISION
For stuntrally-2.7 i rediff patch https://abf.io/import/stuntrally/blob/rosa2021.1/stuntrally-2.7-bullet-double.patch its not help me :( may be need other way to patch in this file https://github.com/stuntrally/stuntrally/blob/master/cmake/FindBULLET.cmake
full build log https://abf.io/build_lists/4191201
See my comment earlier: https://github.com/stuntrally/stuntrally/issues/107#issuecomment-1343891354
I tell you that I gave up because they, -fuck up-, changed so much the bullet cmake detection stuff that I have no idea where to add the build flag...