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

Unable to build on Ubuntu 20.04 #90

Open
AndyMender opened this issue Sep 17, 2022 · 13 comments
Open

Unable to build on Ubuntu 20.04 #90

AndyMender opened this issue Sep 17, 2022 · 13 comments

Comments

@AndyMender
Copy link

AndyMender commented Sep 17, 2022

I tried following the tutorial here: https://stuntrally.tuxfamily.org/wiki/doku.php?id=compilelinux
However, I am running into build issues similar to here and here.

If I compile against OGRE 1.12 with any compiler (tried GCC 9 and Clang 10 and 12), I get the following:

-- Adding OGRE::OGRE target
CMake Error at cmake/dependencies-helpers/OGRE.cmake:11 (set_target_properties):
  Property INTERFACE_LINK_LIBRARIES may not contain link-type keyword
  "optimized".  The INTERFACE_LINK_LIBRARIES property may contain
  configuration-sensitive generator-expressions which may be used to specify
  per-configuration rules.
Call Stack (most recent call first):
  cmake/DependenciesFunctions.cmake:294 (include)
  CMakeLists.txt:92 (resolve_conan_dependencies)


-- Configuring incomplete, errors occurred!
See also "/home/amender/projects/stuntrally/build/CMakeFiles/CMakeOutput.log".
See also "/home/amender/projects/stuntrally/build/CMakeFiles/CMakeError.log".

If I compile against OGRE 1.9 I get the following

FAILED: source/paged-geom/CMakeFiles/paged-geom.dir/BatchedGeometry.cpp.o 
/usr/bin/clang++-12 -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_CHRONO_DYN_LINK -DBOOST_DATE_TIME_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DBOOST_WAVE_DYN_LINK -DOGRE_PLUGIN_DIR_DBG=\"\" -DOGRE_PLUGIN_DIR_REL=\"\" -DSHARED_DATA_DIR=\"share/games/stuntrally\" -I/home/amender/projects/stuntrally/source/btOgre -I/home/amender/projects/stuntrally/source/ogre -I/home/amender/projects/stuntrally/source/ogre/common -I/home/amender/projects/stuntrally/source/paged-geom -I/home/amender/projects/stuntrally/source/road -I/home/amender/projects/stuntrally/source/sound -I/home/amender/projects/stuntrally/source/vdrift -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/OGRE/Overlay -isystem /usr/include/OGRE -isystem /usr/include/bullet -isystem /usr/include/SDL2 -isystem /usr/include/MYGUI -isystem /usr/include/AL -O3 -DNDEBUG -MD -MT source/paged-geom/CMakeFiles/paged-geom.dir/BatchedGeometry.cpp.o -MF source/paged-geom/CMakeFiles/paged-geom.dir/BatchedGeometry.cpp.o.d -o source/paged-geom/CMakeFiles/paged-geom.dir/BatchedGeometry.cpp.o -c /home/amender/projects/stuntrally/source/paged-geom/BatchedGeometry.cpp
/home/amender/projects/stuntrally/source/paged-geom/BatchedGeometry.cpp:228:8: error: invalid argument type 'const Ogre::MeshPtr' (aka 'const SharedPtr<Ogre::Mesh>') to unary expression
   if (!mesh || !mesh->sharedVertexData)
       ^~~~~
/home/amender/projects/stuntrally/source/paged-geom/BatchedGeometry.cpp:487:8: error: invalid argument type 'const Ogre::MaterialPtr' (aka 'const SharedPtr<Ogre::Material>') to unary expression
   if (!parentMaterial)
       ^~~~~~~~~~~~~~~
/home/amender/projects/stuntrally/source/paged-geom/BatchedGeometry.cpp:493:11: error: invalid argument type 'Ogre::MaterialPtr' (aka 'SharedPtr<Ogre::Material>') to unary expression
      if (!m_ptrMaterial)
          ^~~~~~~~~~~~~~
/home/amender/projects/stuntrally/source/paged-geom/BatchedGeometry.cpp:972:33: error: no member named 'reset' in 'Ogre::HardwareIndexBufferSharedPtr'
      m_pIndexData->indexBuffer.reset();
      ~~~~~~~~~~~~~~~~~~~~~~~~~ ^
4 errors generated.
[6/273] Building CXX object source/paged-geom/CMakeFiles/paged-geom.dir/BatchPage.cpp.o
FAILED: source/paged-geom/CMakeFiles/paged-geom.dir/BatchPage.cpp.o 
/usr/bin/clang++-12 -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_CHRONO_DYN_LINK -DBOOST_DATE_TIME_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DBOOST_WAVE_DYN_LINK -DOGRE_PLUGIN_DIR_DBG=\"\" -DOGRE_PLUGIN_DIR_REL=\"\" -DSHARED_DATA_DIR=\"share/games/stuntrally\" -I/home/amender/projects/stuntrally/source/btOgre -I/home/amender/projects/stuntrally/source/ogre -I/home/amender/projects/stuntrally/source/ogre/common -I/home/amender/projects/stuntrally/source/paged-geom -I/home/amender/projects/stuntrally/source/road -I/home/amender/projects/stuntrally/source/sound -I/home/amender/projects/stuntrally/source/vdrift -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/OGRE/Overlay -isystem /usr/include/OGRE -isystem /usr/include/bullet -isystem /usr/include/SDL2 -isystem /usr/include/MYGUI -isystem /usr/include/AL -O3 -DNDEBUG -MD -MT source/paged-geom/CMakeFiles/paged-geom.dir/BatchPage.cpp.o -MF source/paged-geom/CMakeFiles/paged-geom.dir/BatchPage.cpp.o.d -o source/paged-geom/CMakeFiles/paged-geom.dir/BatchPage.cpp.o -c /home/amender/projects/stuntrally/source/paged-geom/BatchPage.cpp
In file included from /home/amender/projects/stuntrally/source/paged-geom/BatchPage.cpp:30:
/home/amender/projects/stuntrally/source/paged-geom/../ogre/common/RenderConst.h:50:72: warning: '/*' within block comment [-Wcomment]
        RV_WaterReflect = RV_Terrain + RV_Vegetation + RV_Road /*+ RV_Objects /*+ RV_Car*/,
                                                                              ^
/home/amender/projects/stuntrally/source/paged-geom/BatchPage.cpp:234:7: error: invalid argument type 'Ogre::MaterialPtr' (aka 'SharedPtr<Ogre::Material>') to unary expression
                if (!generatedMaterial)
                    ^~~~~~~~~~~~~~~~~~
1 warning and 1 error generated.
[8/273] Building CXX object source/paged-geom/CMakeFiles/paged-geom.dir/ImpostorPage.cpp.o
FAILED: source/paged-geom/CMakeFiles/paged-geom.dir/ImpostorPage.cpp.o 
/usr/bin/clang++-12 -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_CHRONO_DYN_LINK -DBOOST_DATE_TIME_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DBOOST_WAVE_DYN_LINK -DOGRE_PLUGIN_DIR_DBG=\"\" -DOGRE_PLUGIN_DIR_REL=\"\" -DSHARED_DATA_DIR=\"share/games/stuntrally\" -I/home/amender/projects/stuntrally/source/btOgre -I/home/amender/projects/stuntrally/source/ogre -I/home/amender/projects/stuntrally/source/ogre/common -I/home/amender/projects/stuntrally/source/paged-geom -I/home/amender/projects/stuntrally/source/road -I/home/amender/projects/stuntrally/source/sound -I/home/amender/projects/stuntrally/source/vdrift -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/OGRE/Overlay -isystem /usr/include/OGRE -isystem /usr/include/bullet -isystem /usr/include/SDL2 -isystem /usr/include/MYGUI -isystem /usr/include/AL -O3 -DNDEBUG -MD -MT source/paged-geom/CMakeFiles/paged-geom.dir/ImpostorPage.cpp.o -MF source/paged-geom/CMakeFiles/paged-geom.dir/ImpostorPage.cpp.o.d -o source/paged-geom/CMakeFiles/paged-geom.dir/ImpostorPage.cpp.o -c /home/amender/projects/stuntrally/source/paged-geom/ImpostorPage.cpp
In file included from /home/amender/projects/stuntrally/source/paged-geom/ImpostorPage.cpp:33:
In file included from /home/amender/projects/stuntrally/source/paged-geom/../shiny/Main/Factory.hpp:8:
In file included from /home/amender/projects/stuntrally/source/paged-geom/../shiny/Main/MaterialInstance.hpp:7:
/home/amender/projects/stuntrally/source/paged-geom/../shiny/Main/PropertyBase.hpp:192:14: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (typeid(*value).name() == typeid(LinkedValue).name())
                           ^
/home/amender/projects/stuntrally/source/paged-geom/../shiny/Main/PropertyBase.hpp:198:34: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (typeid(T).name() == typeid(*value).name())
                                               ^
/home/amender/projects/stuntrally/source/paged-geom/../shiny/Main/PropertyBase.hpp:205:14: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                        && typeid(*value).name() != typeid(StringValue).name())
                                  ^
/home/amender/projects/stuntrally/source/paged-geom/ImpostorPage.cpp:480:11: error: no member named 'reset' in 'Ogre::SharedPtr<Ogre::Texture>'
                texture.reset();
                ~~~~~~~ ^
/home/amender/projects/stuntrally/source/paged-geom/ImpostorPage.cpp:496:10: error: no member named 'reset' in 'Ogre::SharedPtr<Ogre::Texture>'
        texture.reset();
        ~~~~~~~ ^
/home/amender/projects/stuntrally/source/paged-geom/ImpostorPage.cpp:529:6: error: invalid argument type 'Ogre::TexturePtr' (aka 'SharedPtr<Ogre::Texture>') to unary expression
        if (!renderTexture)
            ^~~~~~~~~~~~~~
/home/amender/projects/stuntrally/source/paged-geom/ImpostorPage.cpp:721:16: error: no member named 'reset' in 'Ogre::SharedPtr<Ogre::Texture>'
        renderTexture.reset();
        ~~~~~~~~~~~~~ ^
3 warnings and 4 errors generated.
[11/273] Building CXX object source/paged-geom/CMakeFiles/paged-geom.dir/GrassLoader.cpp.o
FAILED: source/paged-geom/CMakeFiles/paged-geom.dir/GrassLoader.cpp.o 
/usr/bin/clang++-12 -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_CHRONO_DYN_LINK -DBOOST_DATE_TIME_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DBOOST_WAVE_DYN_LINK -DOGRE_PLUGIN_DIR_DBG=\"\" -DOGRE_PLUGIN_DIR_REL=\"\" -DSHARED_DATA_DIR=\"share/games/stuntrally\" -I/home/amender/projects/stuntrally/source/btOgre -I/home/amender/projects/stuntrally/source/ogre -I/home/amender/projects/stuntrally/source/ogre/common -I/home/amender/projects/stuntrally/source/paged-geom -I/home/amender/projects/stuntrally/source/road -I/home/amender/projects/stuntrally/source/sound -I/home/amender/projects/stuntrally/source/vdrift -isystem /usr/include/OGRE/Terrain -isystem /usr/include/OGRE/Paging -isystem /usr/include/OGRE/Overlay -isystem /usr/include/OGRE -isystem /usr/include/bullet -isystem /usr/include/SDL2 -isystem /usr/include/MYGUI -isystem /usr/include/AL -O3 -DNDEBUG -MD -MT source/paged-geom/CMakeFiles/paged-geom.dir/GrassLoader.cpp.o -MF source/paged-geom/CMakeFiles/paged-geom.dir/GrassLoader.cpp.o.d -o source/paged-geom/CMakeFiles/paged-geom.dir/GrassLoader.cpp.o -c /home/amender/projects/stuntrally/source/paged-geom/GrassLoader.cpp
In file included from /home/amender/projects/stuntrally/source/paged-geom/GrassLoader.cpp:41:
/home/amender/projects/stuntrally/source/paged-geom/../ogre/common/RenderConst.h:50:72: warning: '/*' within block comment [-Wcomment]
        RV_WaterReflect = RV_Terrain + RV_Vegetation + RV_Road /*+ RV_Objects /*+ RV_Car*/,
                                                                              ^
In file included from /home/amender/projects/stuntrally/source/paged-geom/GrassLoader.cpp:43:
In file included from /home/amender/projects/stuntrally/source/paged-geom/../shiny/Main/Factory.hpp:8:
In file included from /home/amender/projects/stuntrally/source/paged-geom/../shiny/Main/MaterialInstance.hpp:7:
/home/amender/projects/stuntrally/source/paged-geom/../shiny/Main/PropertyBase.hpp:192:14: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (typeid(*value).name() == typeid(LinkedValue).name())
                           ^
/home/amender/projects/stuntrally/source/paged-geom/../shiny/Main/PropertyBase.hpp:198:34: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                if (typeid(T).name() == typeid(*value).name())
                                               ^
/home/amender/projects/stuntrally/source/paged-geom/../shiny/Main/PropertyBase.hpp:205:14: warning: expression with side effects will be evaluated despite being used as an operand to 'typeid' [-Wpotentially-evaluated-expression]
                        && typeid(*value).name() != typeid(StringValue).name())
                                  ^
/home/amender/projects/stuntrally/source/paged-geom/GrassLoader.cpp:774:7: error: invalid argument type 'Ogre::MaterialPtr' (aka 'SharedPtr<Ogre::Material>') to unary expression
                if (!material || matName != material->getName()){
                    ^~~~~~~~~
/home/amender/projects/stuntrally/source/paged-geom/GrassLoader.cpp:776:8: error: invalid argument type 'Ogre::MaterialPtr' (aka 'SharedPtr<Ogre::Material>') to unary expression
                        if (!material)
                            ^~~~~~~~~
/home/amender/projects/stuntrally/source/paged-geom/GrassLoader.cpp:851:7: error: value of type 'Ogre::TexturePtr' (aka 'SharedPtr<Ogre::Texture>') is not contextually convertible to 'bool'
                if (map){
                    ^~~
/home/amender/projects/stuntrally/source/paged-geom/GrassLoader.cpp:1095:7: error: value of type 'Ogre::TexturePtr' (aka 'SharedPtr<Ogre::Texture>') is not contextually convertible to 'bool'
                if (map){
                    ^~~
/home/amender/projects/stuntrally/source/paged-geom/GrassLoader.cpp:1141:9: error: invalid argument type 'Ogre::MaterialPtr' (aka 'SharedPtr<Ogre::Material>') to unary expression
                                if (!tmpMat)
                                    ^~~~~~~
4 warnings and 5 errors generated.
[17/273] Building CXX object source/paged-geom/CMakeFiles/paged-geom.dir/PropertyMaps.cpp.o
ninja: build stopped: subcommand failed.

What is the recommend tool set to build Stunt Rally from source?

Also, would it be okay to help out with setting up simple CI, for instance Travis to make catching such issues easier?

@cryham
Copy link
Member

cryham commented Sep 17, 2022

Ah crap. I thought fixing those warnings won't break building. IDK anymore, for sure I won't want to put so many #ifdefs to support both.
But I think it is probably inevitable to say that: latest SR from master will need Ogre 1.13. I simply can't spend so much time and test if 1.9 will still work after trying fixes for 1.13. Sorry for inconvenience.

@cryham
Copy link
Member

cryham commented Sep 17, 2022

I updated https://stuntrally.tuxfamily.org/wiki/doku.php?id=compile#ogre
with more info. Didn't exactly test those hashes build with 1.9, just estimated them.

We have CI on Actions tab, these assume Ogre 1.13.

@AndyMender
Copy link
Author

Big thanks for the quick response and for updating the tutorial!

I think it's completely fair to support only one version of Ogre (1.13), as it looks like there's been some non-trivial changes since version 1.9. I will give it a try with Ogre 1.13. Looks like I need to build from source, since version 1.13 (13.x?) is only packaged for Arch: https://repology.org/project/ogre/versions

@AndyMender
Copy link
Author

AndyMender commented Sep 18, 2022

Here are the steps I followed to build OGRE, MyGUI and StuntRally with GCC 9

  • Download OGRE from here and build + install via cmake
  • If Bullet was installed as a system package, symlink to directory expected by OGRE (seems like a bug in OGRE, though?)
sudo ln -s /usr/include/bullet /usr/local/include/bullet
  • Download latest release of MyGUI from here and build + install via cmake (the OGRE backend will be automatically detected)
  • Build Stunt Rally from tip of master branch via cmake

Hitting the following now

FAILED: source/CMakeFiles/sr-editor.dir/editor/BaseApp.cpp.o 
/usr/bin/c++ -DBOOST_ALL_NO_LIB -DBOOST_ATOMIC_DYN_LINK -DBOOST_CHRONO_DYN_LINK -DBOOST_DATE_TIME_DYN_LINK -DBOOST_FILESYSTEM_DYN_LINK -DBOOST_SYSTEM_DYN_LINK -DBOOST_THREAD_DYN_LINK -DBOOST_WAVE_DYN_LINK -DOGRE_PLUGIN_DIR_DBG=\"/usr/local/lib/OGRE\" -DOGRE_PLUGIN_DIR_REL=\"/usr/local/lib/OGRE\" -DSHARED_DATA_DIR=\"share/games/stuntrally\" -I/home/amender/projects/stuntrally/source/btOgre -I/home/amender/projects/stuntrally/source/ogre -I/home/amender/projects/stuntrally/source/ogre/common -I/home/amender/projects/stuntrally/source/paged-geom -I/home/amender/projects/stuntrally/source/road -I/home/amender/projects/stuntrally/source/sound -I/home/amender/projects/stuntrally/source/vdrift -isystem /usr/local/include/OGRE -isystem /usr/local/include/OGRE/Bites -isystem /usr/local/include/OGRE/Overlay -isystem /usr/local/include/OGRE/RTShaderSystem -isystem /usr/local/include/OGRE/Bullet -isystem /usr/local/include/bullet -isystem /usr/local/include/OGRE/MeshLodGenerator -isystem /usr/local/include/OGRE/Paging -isystem /usr/local/include/OGRE/Property -isystem /usr/local/include/OGRE/Terrain -isystem /usr/local/include/OGRE/Volume -isystem /usr/include/SDL2 -isystem /usr/local/include/MYGUI -isystem /usr/include/AL -fPIC -DSR_EDITOR -Winvalid-pch -include /home/amender/projects/stuntrally/build/source/CMakeFiles/sr-editor.dir/cmake_pch.hxx -MD -MT source/CMakeFiles/sr-editor.dir/editor/BaseApp.cpp.o -MF source/CMakeFiles/sr-editor.dir/editor/BaseApp.cpp.o.d -o source/CMakeFiles/sr-editor.dir/editor/BaseApp.cpp.o -c /home/amender/projects/stuntrally/source/editor/BaseApp.cpp
/home/amender/projects/stuntrally/source/editor/BaseApp.cpp: In member function ‘void BaseApp::updateStats()’:
/home/amender/projects/stuntrally/source/editor/BaseApp.cpp:26:26: error: ‘class Ogre::Camera’ has no member named ‘getDirection’; did you mean ‘getRealDirection’?
   26 |   Vector3 dir = mCamera->getDirection();  //const Quaternion& rot = mCamera->getDerivedOrientation();
      |                          ^~~~~~~~~~~~
      |                          getRealDirection
/home/amender/projects/stuntrally/source/editor/BaseApp.cpp: In member function ‘virtual bool BaseApp::frameStarted(const Ogre::FrameEvent&)’:
/home/amender/projects/stuntrally/source/editor/BaseApp.cpp:51:31: error: ‘class Ogre::Camera’ has no member named ‘getPosition’; did you mean ‘getRealPosition’?
   51 |   ndSky->setPosition(mCamera->getPosition());
      |                               ^~~~~~~~~~~
      |                               getRealPosition
[20/273] Building CXX object source/paged-geom/CMakeFiles/paged-geom.dir/StaticBillboardSet.cpp.o
In file included from /home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:41:
/home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.h: In constructor ‘Forests::StaticBillboardSet::StaticBillboard::StaticBillboard(const Vector3&, float, float, const Ogre::ColourValue&, Ogre::uint16, Ogre::uint16)’:
/home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.h:77:93: warning: ‘static void Ogre::RenderSystem::convertColourValue(const Ogre::ColourValue&, Ogre::uint32*)’ is deprecated [-Wdeprecated-declarations]
   77 |             Ogre::Root::getSingletonPtr()->getRenderSystem()->convertColourValue(clr, &color);
      |                                                                                             ^
In file included from /usr/local/include/OGRE/OgreCompositorManager.h:33,
                 from /usr/local/include/OGRE/Ogre.h:46,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:16:
/usr/local/include/OGRE/OgreRenderSystem.h:761:37: note: declared here
  761 |         OGRE_DEPRECATED static void convertColourValue(const ColourValue& colour, uint32* pDest)
      |                                     ^~~~~~~~~~~~~~~~~~
In file included from /home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:41:
/home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.h:77:93: warning: ‘static void Ogre::RenderSystem::convertColourValue(const Ogre::ColourValue&, Ogre::uint32*)’ is deprecated [-Wdeprecated-declarations]
   77 |             Ogre::Root::getSingletonPtr()->getRenderSystem()->convertColourValue(clr, &color);
      |                                                                                             ^
In file included from /usr/local/include/OGRE/OgreCompositorManager.h:33,
                 from /usr/local/include/OGRE/Ogre.h:46,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:16:
/usr/local/include/OGRE/OgreRenderSystem.h:761:37: note: declared here
  761 |         OGRE_DEPRECATED static void convertColourValue(const ColourValue& colour, uint32* pDest)
      |                                     ^~~~~~~~~~~~~~~~~~
/home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp: In member function ‘void Forests::StaticBillboardSet::build()’:
/home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:346:56: warning: ‘void Ogre::LogManager::setLogDetail(Ogre::LoggingLevel)’ is deprecated [-Wdeprecated-declarations]
  346 |          LogManager::getSingleton().setLogDetail(LL_LOW);
      |                                                        ^
In file included from /usr/local/include/OGRE/Ogre.h:74,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:16:
/usr/local/include/OGRE/OgreLogManager.h:138:30: note: declared here
  138 |         OGRE_DEPRECATED void setLogDetail(LoggingLevel ll);
      |                              ^~~~~~~~~~~~
/home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:348:59: warning: ‘void Ogre::LogManager::setLogDetail(Ogre::LoggingLevel)’ is deprecated [-Wdeprecated-declarations]
  348 |          LogManager::getSingleton().setLogDetail(LL_NORMAL);
      |                                                           ^
In file included from /usr/local/include/OGRE/Ogre.h:74,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:16:
/usr/local/include/OGRE/OgreLogManager.h:138:30: note: declared here
  138 |         OGRE_DEPRECATED void setLogDetail(LoggingLevel ll);
      |                              ^~~~~~~~~~~~
/home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp: In static member function ‘static void Forests::SBMaterialRef::addMaterialRef(const MaterialPtr&, Ogre::BillboardOrigin)’:
/home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:602:36: warning: ‘T* Ogre::SharedPtr<T>::getPointer() const [with T = Ogre::Material]’ is deprecated [-Wdeprecated-declarations]
  602 |    Material *mat = matP.getPointer();
      |                                    ^
In file included from /usr/local/include/OGRE/OgreHardwareVertexBuffer.h:34,
                 from /usr/local/include/OGRE/OgrePose.h:33,
                 from /usr/local/include/OGRE/OgreAnimationTrack.h:36,
                 from /usr/local/include/OGRE/OgreAnimation.h:34,
                 from /usr/local/include/OGRE/Ogre.h:33,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:16:
/usr/local/include/OGRE/OgreSharedPtr.h:84:28: note: declared here
   84 |         OGRE_DEPRECATED T* getPointer() const { return shared_ptr<T>::get(); }
      |                            ^~~~~~~~~~
/home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp: In static member function ‘static void Forests::SBMaterialRef::removeMaterialRef(const MaterialPtr&)’:
/home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:623:36: warning: ‘T* Ogre::SharedPtr<T>::getPointer() const [with T = Ogre::Material]’ is deprecated [-Wdeprecated-declarations]
  623 |    Material *mat = matP.getPointer();
      |                                    ^
In file included from /usr/local/include/OGRE/OgreHardwareVertexBuffer.h:34,
                 from /usr/local/include/OGRE/OgrePose.h:33,
                 from /usr/local/include/OGRE/OgreAnimationTrack.h:36,
                 from /usr/local/include/OGRE/OgreAnimation.h:34,
                 from /usr/local/include/OGRE/Ogre.h:33,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/paged-geom/StaticBillboardSet.cpp:16:
/usr/local/include/OGRE/OgreSharedPtr.h:84:28: note: declared here
   84 |         OGRE_DEPRECATED T* getPointer() const { return shared_ptr<T>::get(); }
      |                            ^~~~~~~~~~
[22/273] Building CXX object source/paged-geom/CMakeFiles/paged-geom.dir/WindBatchPage.cpp.o
/home/amender/projects/stuntrally/source/paged-geom/WindBatchPage.cpp: In member function ‘virtual void Forests::WindBatchPage::init(Forests::PagedGeometry*, const Ogre::Any&)’:
/home/amender/projects/stuntrally/source/paged-geom/WindBatchPage.cpp:45:31: warning: ‘bool Ogre::Any::isEmpty() const’ is deprecated [-Wdeprecated-declarations]
   45 |  int datacast = !data.isEmpty() ? Ogre::any_cast<int>(data) : 0;
      |                               ^
In file included from /usr/local/include/OGRE/Ogre.h:36,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/paged-geom/WindBatchPage.cpp:14:
/usr/local/include/OGRE/OgreAny.h:112:30: note: declared here
  112 |         OGRE_DEPRECATED bool isEmpty() const { return !has_value(); }
      |                              ^~~~~~~
[23/273] Building CXX object source/paged-geom/CMakeFiles/paged-geom.dir/TreeLoader2D.cpp.o
In file included from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader2D.h:12,
                 from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader2D.cpp:19:
/home/amender/projects/stuntrally/source/paged-geom/PropertyMaps.h: In member function ‘Ogre::ColourValue Forests::ColorMap::getColorAt_Unpacked(Ogre::Real, Ogre::Real, const Ogre::TRect<float>&)’:
/home/amender/projects/stuntrally/source/paged-geom/PropertyMaps.h:184:123: warning: ‘static Ogre::VertexElementType Ogre::RenderSystem::getColourVertexElementType()’ is deprecated [-Wdeprecated-declarations]
  184 |          static Ogre::VertexElementType format = Ogre::Root::getSingleton().getRenderSystem()->getColourVertexElementType();
      |                                                                                                                           ^
In file included from /usr/local/include/OGRE/OgreCompositorManager.h:33,
                 from /usr/local/include/OGRE/Ogre.h:46,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader2D.cpp:10:
/usr/local/include/OGRE/OgreRenderSystem.h:766:50: note: declared here
  766 |         OGRE_DEPRECATED static VertexElementType getColourVertexElementType(void) { return VET_UBYTE4_NORM; }
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader2D.h:12,
                 from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader2D.cpp:19:
/home/amender/projects/stuntrally/source/paged-geom/PropertyMaps.h:184:123: warning: ‘static Ogre::VertexElementType Ogre::RenderSystem::getColourVertexElementType()’ is deprecated [-Wdeprecated-declarations]
  184 |          static Ogre::VertexElementType format = Ogre::Root::getSingleton().getRenderSystem()->getColourVertexElementType();
      |                                                                                                                           ^
In file included from /usr/local/include/OGRE/OgreCompositorManager.h:33,
                 from /usr/local/include/OGRE/Ogre.h:46,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader2D.cpp:10:
/usr/local/include/OGRE/OgreRenderSystem.h:766:50: note: declared here
  766 |         OGRE_DEPRECATED static VertexElementType getColourVertexElementType(void) { return VET_UBYTE4_NORM; }
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
[24/273] Building CXX object source/paged-geom/CMakeFiles/paged-geom.dir/TreeLoader3D.cpp.o
In file included from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader3D.h:12,
                 from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader3D.cpp:17:
/home/amender/projects/stuntrally/source/paged-geom/PropertyMaps.h: In member function ‘Ogre::ColourValue Forests::ColorMap::getColorAt_Unpacked(Ogre::Real, Ogre::Real, const Ogre::TRect<float>&)’:
/home/amender/projects/stuntrally/source/paged-geom/PropertyMaps.h:184:123: warning: ‘static Ogre::VertexElementType Ogre::RenderSystem::getColourVertexElementType()’ is deprecated [-Wdeprecated-declarations]
  184 |          static Ogre::VertexElementType format = Ogre::Root::getSingleton().getRenderSystem()->getColourVertexElementType();
      |                                                                                                                           ^
In file included from /usr/local/include/OGRE/OgreCompositorManager.h:33,
                 from /usr/local/include/OGRE/Ogre.h:46,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader3D.cpp:10:
/usr/local/include/OGRE/OgreRenderSystem.h:766:50: note: declared here
  766 |         OGRE_DEPRECATED static VertexElementType getColourVertexElementType(void) { return VET_UBYTE4_NORM; }
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader3D.h:12,
                 from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader3D.cpp:17:
/home/amender/projects/stuntrally/source/paged-geom/PropertyMaps.h:184:123: warning: ‘static Ogre::VertexElementType Ogre::RenderSystem::getColourVertexElementType()’ is deprecated [-Wdeprecated-declarations]
  184 |          static Ogre::VertexElementType format = Ogre::Root::getSingleton().getRenderSystem()->getColourVertexElementType();
      |                                                                                                                           ^
In file included from /usr/local/include/OGRE/OgreCompositorManager.h:33,
                 from /usr/local/include/OGRE/Ogre.h:46,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/paged-geom/TreeLoader3D.cpp:10:
/usr/local/include/OGRE/OgreRenderSystem.h:766:50: note: declared here
  766 |         OGRE_DEPRECATED static VertexElementType getColourVertexElementType(void) { return VET_UBYTE4_NORM; }
      |                                                  ^~~~~~~~~~~~~~~~~~~~~~~~~~
[25/273] Building CXX object source/btOgre/CMakeFiles/btOgre.dir/DynamicLines.cpp.o
/home/amender/projects/stuntrally/source/btOgre/DynamicLines.cpp: In member function ‘virtual void DynamicLines::fillHardwareBuffers()’:
/home/amender/projects/stuntrally/source/btOgre/DynamicLines.cpp:265:154: warning: ‘static Ogre::uint32 Ogre::VertexElement::convertColourValue(const Ogre::ColourValue&, Ogre::VertexElementType)’ is deprecated [-Wdeprecated-declarations]
  265 |        *pCol++ = Ogre::VertexElement::convertColourValue(Ogre::ColourValue(mColors[i].r, mColors[i].g, mColors[i].b, mColors[i].a), Ogre::VET_COLOUR_ARGB);
      |                                                                                                                                                          ^
In file included from /usr/local/include/OGRE/OgrePose.h:33,
                 from /usr/local/include/OGRE/OgreAnimationTrack.h:36,
                 from /usr/local/include/OGRE/OgreAnimation.h:34,
                 from /usr/local/include/OGRE/Ogre.h:33,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/btOgre/DynamicLines.cpp:1:
/usr/local/include/OGRE/OgreHardwareVertexBuffer.h:227:39: note: declared here
  227 |         OGRE_DEPRECATED static uint32 convertColourValue(const ColourValue& src, VertexElementType)
      |                                       ^~~~~~~~~~~~~~~~~~
/home/amender/projects/stuntrally/source/btOgre/DynamicLines.cpp:265:154: warning: ‘static Ogre::uint32 Ogre::VertexElement::convertColourValue(const Ogre::ColourValue&, Ogre::VertexElementType)’ is deprecated [-Wdeprecated-declarations]
  265 |        *pCol++ = Ogre::VertexElement::convertColourValue(Ogre::ColourValue(mColors[i].r, mColors[i].g, mColors[i].b, mColors[i].a), Ogre::VET_COLOUR_ARGB);
      |                                                                                                                                                          ^
In file included from /usr/local/include/OGRE/OgrePose.h:33,
                 from /usr/local/include/OGRE/OgreAnimationTrack.h:36,
                 from /usr/local/include/OGRE/OgreAnimation.h:34,
                 from /usr/local/include/OGRE/Ogre.h:33,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/btOgre/DynamicLines.cpp:1:
/usr/local/include/OGRE/OgreHardwareVertexBuffer.h:227:39: note: declared here
  227 |         OGRE_DEPRECATED static uint32 convertColourValue(const ColourValue& src, VertexElementType)
      |                                       ^~~~~~~~~~~~~~~~~~
/home/amender/projects/stuntrally/source/btOgre/DynamicLines.cpp:267:118: warning: ‘static Ogre::uint32 Ogre::VertexElement::convertColourValue(const Ogre::ColourValue&, Ogre::VertexElementType)’ is deprecated [-Wdeprecated-declarations]
  267 |        *pCol++ = Ogre::VertexElement::convertColourValue(Ogre::ColourValue(0.0, 0.0, 0.0, 0.0), Ogre::VET_COLOUR_ARGB);
      |                                                                                                                      ^
In file included from /usr/local/include/OGRE/OgrePose.h:33,
                 from /usr/local/include/OGRE/OgreAnimationTrack.h:36,
                 from /usr/local/include/OGRE/OgreAnimation.h:34,
                 from /usr/local/include/OGRE/Ogre.h:33,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/btOgre/DynamicLines.cpp:1:
/usr/local/include/OGRE/OgreHardwareVertexBuffer.h:227:39: note: declared here
  227 |         OGRE_DEPRECATED static uint32 convertColourValue(const ColourValue& src, VertexElementType)
      |                                       ^~~~~~~~~~~~~~~~~~
/home/amender/projects/stuntrally/source/btOgre/DynamicLines.cpp:267:118: warning: ‘static Ogre::uint32 Ogre::VertexElement::convertColourValue(const Ogre::ColourValue&, Ogre::VertexElementType)’ is deprecated [-Wdeprecated-declarations]
  267 |        *pCol++ = Ogre::VertexElement::convertColourValue(Ogre::ColourValue(0.0, 0.0, 0.0, 0.0), Ogre::VET_COLOUR_ARGB);
      |                                                                                                                      ^
In file included from /usr/local/include/OGRE/OgrePose.h:33,
                 from /usr/local/include/OGRE/OgreAnimationTrack.h:36,
                 from /usr/local/include/OGRE/OgreAnimation.h:34,
                 from /usr/local/include/OGRE/Ogre.h:33,
                 from /home/amender/projects/stuntrally/source/ogre/pch.h:44,
                 from /home/amender/projects/stuntrally/source/btOgre/DynamicLines.cpp:1:
/usr/local/include/OGRE/OgreHardwareVertexBuffer.h:227:39: note: declared here
  227 |         OGRE_DEPRECATED static uint32 convertColourValue(const ColourValue& src, VertexElementType)
      |                                       ^~~~~~~~~~~~~~~~~~
[31/273] Building CXX object source/shiny/CMakeFiles/shiny.dir/Main/Factory.cpp.o
ninja: build stopped: subcommand failed.

I will see if I can fix it.

EDIT: Nope, looks like there's been quite some deprecations and SceneNode is used for Position and Orientation get/set instead of the Camera: https://ogrecave.github.io/ogre/api/1.12/class_ogre_1_1_camera.html#ab6b87536a32e04638eb73f70034e811d
Unfortunately, I'm not familiar with the code base of Stunt Rally enough to address this.

@cryham
Copy link
Member

cryham commented Sep 18, 2022

Right this error is because of 1.13 change.
You can set OGRE_NODELESS_POSITIONING=ON in CMake and rebuild Ogre.
Or I should probably fix this for the new way, like written on top of https://github.com/OGRECave/ogre/blob/master/Docs/13-Notes.md

@AndyMender
Copy link
Author

AndyMender commented Sep 18, 2022

Ah, I forgot to apply the defines from your tutorial, my bad!

It builds with MyGUI 3.4.1 and OGRE 13.4.3 (GCC 9 used for all), but segfaults on start:

Creating resource group General
Creating resource group OgreInternal
Creating resource group OgreAutodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
ArchiveFactory for type 'FileSystem' registered
ArchiveFactory for type 'Zip' registered
ArchiveFactory for type 'EmbeddedZip' registered
DDS codec registering
ETC codec registering
ASTC codec registering
Registering ResourceManager for type GpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
MovableObjectFactory for type 'StaticGeometry' registered.
MovableObjectFactory for type 'Rectangle2D' registered.
*-*-* OGRE Initialising
*-*-* Version 13.4.3 (Tsathoggua)
::: Time Init main:   2 ms
System: Linux
Paths info
-------------------------
Ogre plugin:  /usr/local/lib/OGRE
Data:         /home/amender/projects/stuntrally/data
Home:         /home/amender
User cfg,log: /home/amender/.config/stuntrally
User data:    /home/amender/.local/share/stuntrally
Cache:        /home/amender/.cache/stuntrally
-------------------------
malloc(): invalid size (unsorted)

The same happens when building with Clang 12.

@cryham
Copy link
Member

cryham commented Sep 18, 2022

This is strange. Config paths look okay.
Can you build Debug configuration, use e.g. gdb to start stuntrally and get the bt (backtrace / call stack) to see where did this come from?
End of this wiki page tells more how.

@AndyMender
Copy link
Author

AndyMender commented Sep 19, 2022

I built OGRE, MyGUI and Stunt Rally in Debug mode. Here's the gdb run + backtrace:

gdb stuntrally
GNU gdb (Ubuntu 9.2-0ubuntu1~20.04.1) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from stuntrally...
(gdb) run
Starting program: /home/amender/projects/stuntrally/build/stuntrally 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Creating resource group General
Creating resource group OgreInternal
Creating resource group OgreAutodetect
SceneManagerFactory for type 'DefaultSceneManager' registered.
Registering ResourceManager for type Material
Registering ResourceManager for type Mesh
Registering ResourceManager for type Skeleton
MovableObjectFactory for type 'ParticleSystem' registered.
ArchiveFactory for type 'FileSystem' registered
ArchiveFactory for type 'Zip' registered
ArchiveFactory for type 'EmbeddedZip' registered
DDS codec registering
ETC codec registering
ASTC codec registering
Registering ResourceManager for type GpuProgram
Registering ResourceManager for type Compositor
MovableObjectFactory for type 'Entity' registered.
MovableObjectFactory for type 'Light' registered.
MovableObjectFactory for type 'BillboardSet' registered.
MovableObjectFactory for type 'ManualObject' registered.
MovableObjectFactory for type 'BillboardChain' registered.
MovableObjectFactory for type 'RibbonTrail' registered.
MovableObjectFactory for type 'StaticGeometry' registered.
MovableObjectFactory for type 'Rectangle2D' registered.
*-*-* OGRE Initialising
*-*-* Version 13.4.3 (Tsathoggua)
::: Time Init main:   7 ms
System: Linux
Paths info
-------------------------
Ogre plugin:  /usr/local/lib/OGRE
Data:         /home/amender/projects/stuntrally/data
Home:         /home/amender
User cfg,log: /home/amender/.config/stuntrally
User data:    /home/amender/.local/share/stuntrally
Cache:        /home/amender/.cache/stuntrally
-------------------------
malloc(): invalid size (unsorted)

Program received signal SIGABRT, Aborted.
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
50	../sysdeps/unix/sysv/linux/raise.c: そのようなファイルやディレクトリはありません.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#1  0x00007ffff5b5b859 in __GI_abort () at abort.c:79
#2  0x00007ffff5bc626e in __libc_message (action=action@entry=do_abort, fmt=fmt@entry=0x7ffff5cf0298 "%s\n") at ../sysdeps/posix/libc_fatal.c:155
#3  0x00007ffff5bce2fc in malloc_printerr (str=str@entry=0x7ffff5cf2a50 "malloc(): invalid size (unsorted)") at malloc.c:5347
#4  0x00007ffff5bd10b4 in _int_malloc (av=av@entry=0x7ffff5d25b80 <main_arena>, bytes=bytes@entry=543) at malloc.c:3736
#5  0x00007ffff5bd3154 in __GI___libc_malloc (bytes=543) at malloc.c:3058
#6  0x00007ffff7d3fa6d in btAllocDefault (size=543) at /home/amender/Downloads/ogre-13.4.3/build/bullet3-3.24/src/LinearMath/btAlignedAllocator.cpp:27
#7  0x00007ffff7d3fade in btAlignedAllocDefault (size=520, alignment=16) at /home/amender/Downloads/ogre-13.4.3/build/bullet3-3.24/src/LinearMath/btAlignedAllocator.cpp:69
#8  0x00007ffff7d3fc29 in btAlignedAllocInternal (size=520, alignment=16) at /home/amender/Downloads/ogre-13.4.3/build/bullet3-3.24/src/LinearMath/btAlignedAllocator.cpp:252
#9  0x00000000007d14da in btDiscreteDynamicsWorld::operator new (sizeInBytes=520) at /usr/local/include/bullet/BulletDynamics/Dynamics/btDiscreteDynamicsWorld.h:100
#10 0x00000000007cfa33 in COLLISION_WORLD::COLLISION_WORLD (this=0xb18290) at /home/amender/projects/stuntrally/source/vdrift/collision_world.cpp:216
#11 0x00000000007dea3f in GAME::GAME (this=0xb18200, pSettings=0xb092f0) at /home/amender/projects/stuntrally/source/vdrift/game.cpp:31
#12 0x000000000073456e in main (argc=1, argv=0x7fffffffded8) at /home/amender/projects/stuntrally/source/ogre/main.cpp:119

At first glance looks like an issue with the Bullet code in OGRE, but not sure why a basic malloc at the start of a game would fail.

@cryham
Copy link
Member

cryham commented Sep 19, 2022

This doesn't look good. I don't really know what to do next.
This is even before Ogre, in just GAME ctor, inside bullet allocating memory. Maybe something wrong with bullet version or configuration or some memory aligment, just guessing.
I have bullet version 3.06 here on Debian 11.
If this was a memory leak or corruption, maybe you could use valgrind tool but I don't know much about it.

@AndyMender
Copy link
Author

AndyMender commented Sep 19, 2022

I have bullet version 3.06 here on Debian 11.

I have version 2.88 from the ubuntu 20.04 repos. I guess I could try building a higher version from source and/or also in Debug mode. If it works with a higher version it might be worth mentioning a minimum known working one in the build instructions :). I will version 3.24 from here a shot: https://github.com/bulletphysics/bullet3/releases/tag/3.24

If this was a memory leak or corruption, maybe you could use valgrind tool but I don't know much about it.

I guess it's worth a shot.

@AndyMender
Copy link
Author

Just a heads-up that bullet 3.24 split its cmake target into multiple ones:

set ( BULLET_FOUND 1 )
set ( BULLET_USE_FILE     "lib/cmake/bullet/UseBullet.cmake" )
set ( BULLET_DEFINITIONS  "" )
set ( BULLET_INCLUDE_DIR  "" )
set ( BULLET_INCLUDE_DIRS "" )
set ( BULLET_LIBRARIES    "LinearMath;Bullet3Common;BulletInverseDynamics;BulletCollision;BulletDynamics;BulletSoftBody" )
set ( BULLET_LIBRARY_DIRS "" )
set ( BULLET_ROOT_DIR     "/usr/local" )
set ( BULLET_VERSION_STRING "3.24" )

I will try next with your version 3.06 or something closer to that.

@AndyMender
Copy link
Author

AndyMender commented Sep 20, 2022

Same issues with bullet 3.06. The cmake setup of Stunt Rally is failing to find the Bullet::Bullet target:

CMake Error at source/CMakeLists.txt:79 (target_link_libraries):
  Target "stuntrally" links to:

    Bullet::Bullet

  but the target was not found.  Possible reasons include:

    * There is a typo in the target name.
    * A find_package call is missing for an IMPORTED target.
    * An ALIAS target is missing.

EDIT: Apparently it was an issue with using ninja as the generator for building Bullet. No issues with regular make.


Build everything in Debug mode with the "Unix Makefiles" generator gives the following error:

/usr/bin/ld: /usr/local/lib/libBulletWorldImporter.a(btBulletWorldImporter.o): in function `btBulletWorldImporter::loadFile(char const*, char const*)':
/home/amender/Downloads/bullet3-3.06/Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.cpp:40: undefined reference to `bParse::btBulletFile::btBulletFile(char const*)'
/usr/bin/ld: /home/amender/Downloads/bullet3-3.06/Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.cpp:49: undefined reference to `bParse::bFile::preSwap()'
/usr/bin/ld: /home/amender/Downloads/bullet3-3.06/Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.cpp:50: undefined reference to `bParse::bFile::writeFile(char const*)'
/usr/bin/ld: /usr/local/lib/libBulletWorldImporter.a(btBulletWorldImporter.o): in function `btBulletWorldImporter::loadFileFromMemory(char*, int)':
/home/amender/Downloads/bullet3-3.06/Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.cpp:60: undefined reference to `bParse::btBulletFile::btBulletFile(char*, int)'
/usr/bin/ld: /usr/local/lib/libBulletWorldImporter.a(btBulletWorldImporter.o): in function `btBulletWorldImporter::loadFileFromMemory(bParse::btBulletFile*)':
/home/amender/Downloads/bullet3-3.06/Extras/Serialize/BulletWorldImporter/btBulletWorldImporter.cpp:80: undefined reference to `bParse::bFile::dumpChunks(bParse::bDNA*)'
collect2: error: ld returned 1 exit status
make[2]: *** [source/CMakeFiles/stuntrally.dir/build.make:2619: stuntrally] error 1
make[1]: *** [CMakeFiles/Makefile2:267: source/CMakeFiles/stuntrally.dir/all] error 2
make: *** [Makefile:136: all] error 2

@cryham
Copy link
Member

cryham commented Sep 20, 2022

Looks like SR didn't link to something that has btBulletFile. Not sure how this goes when building bullet from sources, but we have both libbullet-dev and libbullet-extras-dev needed as dependencies.

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

2 participants