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

sr3 compilation fails during linking, Bullet has BT_USE_DOUBLE_PRECISION #45

Open
bassmadrigal opened this issue Dec 27, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@bassmadrigal
Copy link

Describe the issue
Stuntrally3 compilation fails on Slackware Linux 15.0 when linking sr-editor3.

Just in case this was related to only the editor, I modified the sr3 cmake options in build-sr3-Linux.py to disable the editor (BUILD_EDITOR=OFF), but it was still essentially the same errors except for sr3 instead of the editor.

I am unable to run the pre-built version due to #44.

[249/400] Linking CXX executable ../../bin/Debug/sr-editor3
FAILED: ../../bin/Debug/sr-editor3 
: && /usr/bin/c++ -Wno-comment -Wno-dangling-else -Wno-deprecated-declarations -Wno-parentheses -fPIC -g  CMakeFiles/sr-editor3.dir/src/btOgre2/BtOgreExtras.cpp.o CMakeFiles/sr-editor3.dir/src/btOgre2/BtOgreGP.cpp.o CMakeFiles/sr-editor3.dir/src/btOgre2/BtOgrePG.cpp.o CMakeFiles/sr-editor3.dir/src/common/AppGui_Compositor.cpp.o CMakeFiles/sr-editor3.dir/src/common/AppGui_CompositorUtil.cpp.o CMakeFiles/sr-editor3.dir/src/common/AppGui_CubeReflect.cpp.o CMakeFiles/sr-editor3.dir/src/common/AppGui_Fps.cpp.o CMakeFiles/sr-editor3.dir/src/common/AppGui_GI.cpp.o CMakeFiles/sr-editor3.dir/src/common/AppGui_Init.cpp.o CMakeFiles/sr-editor3.dir/src/common/AppGui_SSAO.cpp.o CMakeFiles/sr-editor3.dir/src/common/AppGui_Shadows.cpp.o CMakeFiles/sr-editor3.dir/src/common/AppGui_Util.cpp.o CMakeFiles/sr-editor3.dir/src/common/AppGui_UtilMem.cpp.o CMakeFiles/sr-editor3.dir/src/common/App_SceneCollects.cpp.o CMakeFiles/sr-editor3.dir/src/common/App_SceneEmitters.cpp.o CMakeFiles/sr-editor3.dir/src/common/App_SceneFields.cpp.o CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o CMakeFiles/sr-editor3.dir/src/common/Atmosphere.cpp.o CMakeFiles/sr-editor3.dir/src/common/Axes.cpp.o CMakeFiles/sr-editor3.dir/src/common/CGui_Tools.cpp.o CMakeFiles/sr-editor3.dir/src/common/CScene.cpp.o CMakeFiles/sr-editor3.dir/src/common/CScene_Sky.cpp.o CMakeFiles/sr-editor3.dir/src/common/CScene_Terrain.cpp.o CMakeFiles/sr-editor3.dir/src/common/CScene_Terrain2.cpp.o CMakeFiles/sr-editor3.dir/src/common/CScene_Trail.cpp.o CMakeFiles/sr-editor3.dir/src/common/CScene_Veget.cpp.o CMakeFiles/sr-editor3.dir/src/common/FluidsReflect.cpp.o CMakeFiles/sr-editor3.dir/src/common/GraphView.cpp.o CMakeFiles/sr-editor3.dir/src/common/Grass_Mesh.cpp.o CMakeFiles/sr-editor3.dir/src/common/GuiCom_Options.cpp.o CMakeFiles/sr-editor3.dir/src/common/GuiCom_Presets.cpp.o CMakeFiles/sr-editor3.dir/src/common/GuiCom_Screen.cpp.o CMakeFiles/sr-editor3.dir/src/common/GuiCom_Track.cpp.o CMakeFiles/sr-editor3.dir/src/common/GuiCom_TrackUpd.cpp.o CMakeFiles/sr-editor3.dir/src/common/GuiCom_TweakMat.cpp.o CMakeFiles/sr-editor3.dir/src/common/GuiCom_Util.cpp.o CMakeFiles/sr-editor3.dir/src/common/Gui_Popup.cpp.o CMakeFiles/sr-editor3.dir/src/common/HlmsPbs2.cpp.o CMakeFiles/sr-editor3.dir/src/common/HudRenderable.cpp.o CMakeFiles/sr-editor3.dir/src/common/Main.cpp.o CMakeFiles/sr-editor3.dir/src/common/MultiList2.cpp.o CMakeFiles/sr-editor3.dir/src/common/PreviewScene.cpp.o CMakeFiles/sr-editor3.dir/src/common/PreviewTex.cpp.o CMakeFiles/sr-editor3.dir/src/common/Slider.cpp.o CMakeFiles/sr-editor3.dir/src/common/SliderValue.cpp.o CMakeFiles/sr-editor3.dir/src/common/TrackGhost.cpp.o CMakeFiles/sr-editor3.dir/src/common/ViewDim.cpp.o CMakeFiles/sr-editor3.dir/src/common/settings_com.cpp.o CMakeFiles/sr-editor3.dir/src/common/simplexnoise.cpp.o CMakeFiles/sr-editor3.dir/src/common/data/BltObjects.cpp.o CMakeFiles/sr-editor3.dir/src/common/data/CAllowed.cpp.o CMakeFiles/sr-editor3.dir/src/common/data/CData.cpp.o CMakeFiles/sr-editor3.dir/src/common/data/FluidsXml.cpp.o CMakeFiles/sr-editor3.dir/src/common/data/PresetsXml.cpp.o CMakeFiles/sr-editor3.dir/src/common/data/SColor.cpp.o CMakeFiles/sr-editor3.dir/src/common/data/SceneClasses.cpp.o CMakeFiles/sr-editor3.dir/src/common/data/SceneXml.cpp.o CMakeFiles/sr-editor3.dir/src/common/data/SceneXml_Load.cpp.o CMakeFiles/sr-editor3.dir/src/common/data/SceneXml_Save.cpp.o CMakeFiles/sr-editor3.dir/src/common/data/TracksXml.cpp.o CMakeFiles/sr-editor3.dir/src/common/MessageBox/MessageBox.cpp.o CMakeFiles/sr-editor3.dir/src/common/MessageBox/MessageBoxStyle.cpp.o CMakeFiles/sr-editor3.dir/src/road/Grid.cpp.o CMakeFiles/sr-editor3.dir/src/road/Grid_Mesh.cpp.o CMakeFiles/sr-editor3.dir/src/road/PaceNotes.cpp.o CMakeFiles/sr-editor3.dir/src/road/PaceNotesGen.cpp.o CMakeFiles/sr-editor3.dir/src/road/Road_Edit.cpp.o CMakeFiles/sr-editor3.dir/src/road/Road_File.cpp.o CMakeFiles/sr-editor3.dir/src/road/Road_Markers.cpp.o CMakeFiles/sr-editor3.dir/src/road/Road_Mesh.cpp.o CMakeFiles/sr-editor3.dir/src/road/Road_Prepass.cpp.o CMakeFiles/sr-editor3.dir/src/road/Road_Rebuild.cpp.o CMakeFiles/sr-editor3.dir/src/road/SplineBase.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/BaseSystem.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/GameEntityManager.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/GraphicsSystem.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/GraphicsSystemCache.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/GraphicsSystemEntity.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/LogicSystem.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/SdlInputHandler.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/System/MainEntryPoints.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/System/StaticPluginLoader.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/System/Android/AndroidSystems.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/System/Desktop/MainLoopMultiThreaded.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/System/Desktop/MainLoopSingleThreaded.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/System/Desktop/UnitTesting.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/Threading/MessageQueueSystem.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/Utils/HdrUtils.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/Utils/MeshUtils.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/Utils/MiscUtils.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/Utils/ScreenSpaceReflections.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/Utils/SmaaUtils.cpp.o CMakeFiles/sr-editor3.dir/src/OgreCommon/Utils/TestUtils.cpp.o CMakeFiles/sr-editor3.dir/src/Terra/OgrePlanarReflectionActor.cpp.o CMakeFiles/sr-editor3.dir/src/Terra/OgrePlanarReflections.cpp.o CMakeFiles/sr-editor3.dir/src/Terra/Terra.cpp.o CMakeFiles/sr-editor3.dir/src/Terra/Terra2.cpp.o CMakeFiles/sr-editor3.dir/src/Terra/TerraShadowMapper.cpp.o CMakeFiles/sr-editor3.dir/src/Terra/TerraWorkspaceListener.cpp.o CMakeFiles/sr-editor3.dir/src/Terra/TerrainCell.cpp.o CMakeFiles/sr-editor3.dir/src/Terra/Hlms/OgreHlmsJsonTerra.cpp.o CMakeFiles/sr-editor3.dir/src/Terra/Hlms/OgreHlmsTerra.cpp.o CMakeFiles/sr-editor3.dir/src/Terra/Hlms/OgreHlmsTerraDatablock.cpp.o CMakeFiles/sr-editor3.dir/src/Terra/Hlms/PbsListener/OgreHlmsPbsTerraShadows.cpp.o CMakeFiles/sr-editor3.dir/src/sound/SoundBase.cpp.o CMakeFiles/sr-editor3.dir/src/sound/SoundBaseMgr.cpp.o CMakeFiles/sr-editor3.dir/src/sound/SoundBaseMgrUtil.cpp.o CMakeFiles/sr-editor3.dir/src/sound/SoundDynamic.cpp.o CMakeFiles/sr-editor3.dir/src/sound/SoundMgr_Init.cpp.o CMakeFiles/sr-editor3.dir/src/sound/SoundMgr_Update.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/Buoyancy.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/aabb.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/car.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/car_sound.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/caraero.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/carbrake.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/carclutch.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/carcontrolmap_local.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/cardifferential.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/cardynamics.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/cardynamics_load.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/cardynamics_simulate.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/cardynamics_update.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/carengine.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/carsuspension.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/cartire.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/cartransmission.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/carwheel.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/collision_world.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/configfile.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/crashdetection.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/endian_utility.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/forcefeedback.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/game.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/linearframe.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/linearinterp.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/mathplane.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/mathvector.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/optional.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/par.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/paths.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/quaternion.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/reseatable_reference.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/rigidbody.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/rotationalframe.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/suspensionbump.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/timer.cpp.o CMakeFiles/sr-editor3.dir/src/vdrift/toggle.cpp.o CMakeFiles/sr-editor3.dir/src/editor/AlignTerToRoad.cpp.o CMakeFiles/sr-editor3.dir/src/editor/App_Cursors.cpp.o CMakeFiles/sr-editor3.dir/src/editor/App_Render2tex.cpp.o CMakeFiles/sr-editor3.dir/src/editor/App_SceneInitEd.cpp.o CMakeFiles/sr-editor3.dir/src/editor/App_TerrainEdit.cpp.o CMakeFiles/sr-editor3.dir/src/editor/BaseApp.cpp.o CMakeFiles/sr-editor3.dir/src/editor/BaseApp_Old.cpp.o CMakeFiles/sr-editor3.dir/src/editor/BrushesIni.cpp.o CMakeFiles/sr-editor3.dir/src/editor/CApp.cpp.o CMakeFiles/sr-editor3.dir/src/editor/CGui.cpp.o CMakeFiles/sr-editor3.dir/src/editor/ExportRoR.cpp.o CMakeFiles/sr-editor3.dir/src/editor/ExportRoR_Objects.cpp.o CMakeFiles/sr-editor3.dir/src/editor/ExportRoR_Road.cpp.o CMakeFiles/sr-editor3.dir/src/editor/ExportRoR_Terrain.cpp.o CMakeFiles/sr-editor3.dir/src/editor/ExportRoR_Tools.cpp.o CMakeFiles/sr-editor3.dir/src/editor/ExportRoR_Veget.cpp.o CMakeFiles/sr-editor3.dir/src/editor/ExportRoR_WaterSky.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Gui_Events.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Gui_EventsPick.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Gui_EventsTer.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Gui_Init.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Gui_InitLists.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Gui_TerrainBrushes.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Gui_Tools.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Gui_Util.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Gui_UtilitySystem.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Gui_Warnings.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Update_EditKeyTxt.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Update_EditMouse.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Update_Frame.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Update_Frame2.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Update_Key.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Update_KeyEdit.cpp.o CMakeFiles/sr-editor3.dir/src/editor/Update_KeyRoad.cpp.o CMakeFiles/sr-editor3.dir/src/editor/settings.cpp.o -o ../../bin/Debug/sr-editor3 -L/home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/build/Debug/lib -Wl,-rpath,/home/jbhansen/program-downloads/compile-stuntrally3/Ogre/ogre-next/build/Debug/lib:/home/jbhansen/program-downloads/compile-stuntrally3/mygui-next/build/Debug/lib  -lpthread  /usr/lib64/libopenal.so  /usr/lib64/libBulletDynamics.so  /usr/lib64/libBulletCollision.so  /usr/lib64/libLinearMath.so  /usr/lib64/libBulletSoftBody.so  -lBulletWorldImporter  -lOgreAtmosphere_d  -lOgreOverlay_d  -lOgreHlmsUnlit_d  -lOgreHlmsPbs_d  -lOgreMain_d  -lSDL2  /home/jbhansen/program-downloads/compile-stuntrally3/mygui-next/build/Debug/lib/libMyGUI.Ogre2Platform_d.a  /home/jbhansen/program-downloads/compile-stuntrally3/mygui-next/build/Debug/lib/libMyGUIEngine_d.so  /usr/lib64/libvorbis.so  /usr/lib64/libvorbisfile.so  /usr/lib64/libogg.so  /usr/lib64/libtinyxml2.so && :
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/btOgre2/BtOgreGP.cpp.o: in function `BtOgre::VertexIndexToShape::createConvex()':
/home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/btOgre2/BtOgreGP.cpp:266: undefined reference to `btConvexHullShape::btConvexHullShape(float const*, int, int)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/btOgre2/BtOgreGP.cpp.o: in function `BtOgre::VertexIndexToShape::createCapsule()':
/home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/btOgre2/BtOgreGP.cpp:311: undefined reference to `btCapsuleShape::btCapsuleShape(float, float)'
/usr/bin/ld: /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/btOgre2/BtOgreGP.cpp:316: undefined reference to `btCapsuleShapeX::btCapsuleShapeX(float, float)'
/usr/bin/ld: /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/btOgre2/BtOgreGP.cpp:321: undefined reference to `btCapsuleShapeZ::btCapsuleShapeZ(float, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o: in function `BulletWorldOffset::createRigidBody(bool, float, btTransform const&, btCollisionShape*, char const*)':
/home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/common/App_SceneObjects.cpp:77: undefined reference to `btRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&)'
/usr/bin/ld: /home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/common/App_SceneObjects.cpp:78: undefined reference to `btRigidBody::setDamping(float, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x40): undefined reference to `btWorldImporter::createPlaneShape(btVector3 const&, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x50): undefined reference to `btWorldImporter::createSphereShape(float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x58): undefined reference to `btWorldImporter::createCapsuleShapeX(float, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x60): undefined reference to `btWorldImporter::createCapsuleShapeY(float, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x68): undefined reference to `btWorldImporter::createCapsuleShapeZ(float, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x70): undefined reference to `btWorldImporter::createCylinderShapeX(float, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x78): undefined reference to `btWorldImporter::createCylinderShapeY(float, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x80): undefined reference to `btWorldImporter::createCylinderShapeZ(float, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x88): undefined reference to `btWorldImporter::createConeShapeX(float, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x90): undefined reference to `btWorldImporter::createConeShapeY(float, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0x98): undefined reference to `btWorldImporter::createConeShapeZ(float, float)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_SceneObjects.cpp.o:(.data.rel.ro._ZTV17BulletWorldOffset[_ZTV17BulletWorldOffset]+0xe0): undefined reference to `btWorldImporter::createMultiSphereShape(btVector3 const*, float const*, int)'
/usr/bin/ld: CMakeFiles/sr-editor3.dir/src/common/App_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/sr-editor3.dir/src/common/App_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/sr-editor3.dir/src/common/CScene_Terrain.cpp.o: in function `CScene::CreateBltTerrains()':
/home/jbhansen/program-downloads/compile-stuntrally3/sr3/src/common/CScene_Terrain.cpp:196: undefined reference to `btHeightfieldTerrainShape::btHeightfieldTerrainShape(int, int, void const*, float, float, float, int, PHY_ScalarType, bool)'
collect2: error: ld returned 1 exit status

How to Reproduce
Create folder, place build-sr3-Linux.py, and run it.
Compilation of ogre-next-deps, ogre-next, and mygui-next complete, but sr3's compilation fails.

Desktop (please complete the following information):

  • OS: Slackware Linux 15.0
  • Game Version: latest from git (9fe6bbe)
  • Bullet Version: 3.2.5
@cryham
Copy link
Member

cryham commented Dec 27, 2024

Okay this is likely that issue with bullet that was built with double precision.
It has a BT_USE_DOUBLE_PRECISION defined.
I'm looking if it can be supported. And fixed in SR.
But for now it won't build like this. BT_USE_DOUBLE_PRECISION has to be not defined. And this way btScalar is float. It is so for me and it builds.
If you could build Bullet simulation from sources without BT_USE_DOUBLE_PRECISION then I think it would work.

@cryham cryham changed the title sr3 compilation fails during linking sr3 compilation fails during linking, Bullet has BT_USE_DOUBLE_PRECISION Dec 27, 2024
@bassmadrigal
Copy link
Author

That's a bummer since the Slackware software repo that has bullet only has it with double precision. I was able to modify the build script locally to build it without double precision on my local machine, but that would prevent me from providing this build on that repo unless I figure out how to build bullet and statically link it when building sr.

(I'll also be checking if the maintainer of the bullet package is able to turn that off without breaking other packages that rely on it, but it's been there a long time, so the other packages that rely on bullet might require double precision.)

Anyway, thanks for the insight. This allowed me to build a debug version of stuntrally so I can hopefully provide enough detail tp figure out the segfault on #44. I'll be updating that shortly.

@cryham
Copy link
Member

cryham commented Dec 28, 2024

I'd like to support BT_USE_DOUBLE_PRECISION in SR3, and I think it was already working.
There is #ifdef BT_USE_DOUBLE_PRECISION in CScene::CreateBltTerrains() etc.
So in these file:line locations:

src/btOgre2/BtOgreGP.cpp:266: undefined reference to `btConvexHullShape::btConvexHullShape(float const*, int, int)'
src/btOgre2/BtOgreGP.cpp:311: undefined reference to `btCapsuleShape::btCapsuleShape(float, float)'
src/btOgre2/BtOgreGP.cpp:316: undefined reference to `btCapsuleShapeX::btCapsuleShapeX(float, float)'
src/btOgre2/BtOgreGP.cpp:321: undefined reference to `btCapsuleShapeZ::btCapsuleShapeZ(float, float)'
src/common/App_SceneObjects.cpp:77: undefined reference to `btRigidBody::btRigidBody(float, btMotionState*, btCollisionShape*, btVector3 const&)'
src/common/App_SceneObjects.cpp:78: undefined reference to `btRigidBody::setDamping(float, float)'
src/common/CScene_Terrain.cpp:196: undefined reference to `btHeightfieldTerrainShape::btHeightfieldTerrainShape(int, int, void const*, float, float, float, int, PHY_ScalarType, bool)'

There was a float not double but here:
src/btOgre2/BtOgreGP.cpp:266
src/common/CScene_Terrain.cpp:196
this is in #else part block of #ifdef BT_USE_DOUBLE_PRECISION, meaning BT_USE_DOUBLE_PRECISION was not defined.
Maybe this was just an issue with old bullet or some mismatch, IDK

I did a small fix ef0d612
it shouldn't matter IMO, and even if, it won't fix all those locations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants