Why are just some Ogre3D dependencies building for Release when the rest builds for Debug?

179 Views Asked by At

I am building for Ogre version 14.1.1 Github link https://github.com/OGRECave/ogre Windows 10 Renderer d3d11

I am having trouble with these 2 dependencies: OgreBullet, Assimp

I have followed the official building tutorial, AND followed forum discussions for any fixes. Build tutorial link: https://ogrecave.github.io/ogre/api/latest/building-ogre.html

These are the steps I am doing:

  1. Downloaded the repository and extracted it.
  2. I made a folder /build/debug inside it.
  3. then after go to cmd prompt from the folder path and initiate a variable. This is because of the dependencies are built during the configure stage of CMake, we must specify the desired CMAKE_BUILD_TYPE via command-line. Changing the value in the CMake GUI will have no effect. set CMAKE_BUILD_TYPE=Debug
  4. then run cmake-gui.exe -DCMAKE_BUILD-TYPE=Debug in cmd prompt
  5. then after CMAKE interface open, I clicked BrowseSource to set the downloaded repository folder.
  6. in BrowseBuild I set the /build/debug folder
  7. I hit configure button, then with given settings (for debug build) I generate, if no errors occurred. CMake configuration
  8. Then I open the generated solution in Visual Studio 2022.
  9. I build for the predefined target "ALL_BUILD"

I was already able to build for debug once such that Assimp was working. I worked with Assimp in Ogre. But now I am trying to build OgreBullet also, and now both these dependencies fail to build in debug.

the dependencies are built during configure . Here is my outputs

Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.19045.
Configuring OGRE 14.1.1
DEPENDENCIES_DIR: D:/Ogre_3/ogre-master/build/debug/Dependencies
Looking for FreeImage...
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
Could not locate FreeImage
Looking for DirectX9...
Could not locate DirectX9
Looking for DirectX11...
Found DirectX11 headers: C:/Program Files (x86)/Windows Kits/10/Include/10.0.22621.0/um
Found DirectX11: d3d11.lib;dxgi.lib;dxguid.lib
Looking for Cg...
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
Could not locate Cg
CMake Warning (dev) at CMake/Dependencies.cmake:278 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  CMakeLists.txt:284 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find PythonInterp (missing: PYTHON_EXECUTABLE) 
CMake Warning (dev) at CMake/Dependencies.cmake:279 (find_package):
  Policy CMP0148 is not set: The FindPythonInterp and FindPythonLibs modules
  are removed.  Run "cmake --help-policy CMP0148" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

Call Stack (most recent call first):
  CMakeLists.txt:284 (include)
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find PythonLibs (missing: PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) 
Looking for Softimage...
Could not locate Softimage
send_errorD:/Ogre_3/ogre-master/build/debug/Dependencies/bin/debug/libGLESv2.dll did not exist, can't install!
send_errorD:/Ogre_3/ogre-master/build/debug/Dependencies/bin/release/libEGL.dll did not exist, can't install!
Looking for GLSL_Optimizer...
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
Could not locate GLSL_Optimizer
Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 

-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ freetype
+ OpenGL
+ OpenGL ES 2.x
+ DirectX11
+ pugixml
+ zlib
+ Assimp
+ Bullet
+ SDL2
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ freeimage: Support for commonly used graphics image formats <http://freeimage.sourceforge.net>
+ DirectX9: Support for the DirectX render system <http://msdn.microsoft.com/en-us/directx/>
+ cg: C for graphics shader language <http://developer.nvidia.com/object/cg_toolkit.html>
+ Vulkan SDK: Vulkan RenderSystem, glslang Plugin. Alternatively use system packages <https://vulkan.lunarg.com/>
+ OpenEXR: Load High dynamic range images <http://www.openexr.com/>
+ Python: Language bindings to use OGRE from Python <http://www.python.org/>
+ SWIG: Language bindings (Python, Java, C#) for OGRE <http://www.swig.org/>
+ Qt: optional integration with the Qt Library for window creation and input <http://www.qt.io/>
+ Doxygen: Tool for building API documentation <http://doxygen.org>
+ Softimage: Softimage SDK needed for building XSIExporter <>
+ GLSL Optimizer: GLSL Optimizer <http://github.com/aras-p/glsl-optimizer/>
+ HLSL2GLSL: HLSL2GLSL <http://hlsl2glslfork.googlecode.com/>
-----------------------------------------------------------------------------


----------------------------------------------------------------------------
  FEATURE SUMMARY
----------------------------------------------------------------------------

Building components:
  + Bites
  + Bullet
  + MeshLodGenerator
  + Overlay
  + Overlay Dear Imgui
  + Paging
  + Property
  + RTShader System
  + RTShader System Shaders
  + Terrain
  + Volume
Building plugins:
  + BSP scene manager
  + Octree scene manager
  + STBI codec (generic)
  + Portal connected zone scene manager
  + Particle FX
  + DotScene loader
  + Assimp loader (.obj, .ply, .fbx and more)
Building rendersystems:
  + Direct3D 11
  + OpenGL
  + OpenGL 3+
  + OpenGL ES2/ ES3
Building executables:
  + Samples
  + Tools
Building core features:
  + Mesh Lod
  + DDS image codec (.dds)
  + ETC image codec (.pkm, .ktx) 
  + ASTC image codec (.astc)
  + ZIP archives
  + Multi-threaded WorkQueue

Build type:                      shared
Use double precision:            disabled
Assert mode:                     release exceptions

----------------------------------------------------------------------------

Configuring done (1.9s)
Generating done (0.4s)
1

There are 1 best solutions below

7
On

Visual Studio generated project's will require you to select your build type from it's four defaults Release, Debug, MinSizeRel & RelWithDebInfo) even when the project is generated with CMake. Having generated your visual studio project knowing that the build has failed is now it's own issue. You haven't mentioned the issue but I assume you are facing linking errors because in CMake you can see that:

BULLET_SOFTBODY_LIBRARY=C:/....
BULLET_SOFTBODY_LBRARY_DEBUG=BULLET_SOFTBODY_LBRARY_DEBUG-NOTFOUND

Suggesting you don't have the debug libraries for this bullet library. So if you attempt to build it, it won't have the debug library to link to. If the library does exist, make sure to set the CMake variable to the location of that library. But if that is not your issue, then posting your error message will be useful.