Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link fail with bullet #107

Open
Pro-pra opened this issue Nov 26, 2022 · 12 comments
Open

Link fail with bullet #107

Pro-pra opened this issue Nov 26, 2022 · 12 comments

Comments

@Pro-pra
Copy link

Pro-pra commented Nov 26, 2022

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 to btRigidBody::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 to btRigidBody::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 to btWorldImporter::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 to btWorldImporter::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 to btWorldImporter::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 to btWorldImporter::createCapsuleShapeY(float, float)'> /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 to btRigidBody::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 to btRigidBody::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 to btWorldImporter::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 to btWorldImporter::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 to btWorldImporter::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 to btWorldImporter::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 to btWorldImporter::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 to btWorldImporter::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.

@cryham
Copy link
Member

cryham commented Nov 26, 2022

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.

@rapsys
Copy link

rapsys commented Dec 8, 2022

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.

@rapsys
Copy link

rapsys commented Dec 9, 2022

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.

@rapsys
Copy link

rapsys commented Dec 9, 2022

@Pro-pra
Copy link
Author

Pro-pra commented Dec 10, 2022

hmmm....

  1. i patch and rebuild bullet
  2. patch stuntrally and build with patched bullet
    Build fail.

Need more build option?

@rapsys
Copy link

rapsys commented Dec 10, 2022

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

@rapsys
Copy link

rapsys commented Dec 19, 2022

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 ;)

@Pro-pra
Copy link
Author

Pro-pra commented Dec 20, 2022

-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

@rapsys
Copy link

rapsys commented Dec 20, 2022

See my comment earlier: #107 (comment)

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants