Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Discussion area about developing with Ogre-Next (2.1, 2.2 and beyond)


Post Reply
criatura
Gnoblar
Posts: 23
Joined: Sun Jul 17, 2011 1:35 am
x 1

Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Post by criatura »

Hi,

I want to compile Ogre with the samples2 and thread support (it is appears as None), but cmake is not finding boost and "sdl".

I'm a very sad person, using Windows 8.1 64, Visual Studio Community 2015 and CMake to compile Ogre 2.1 (from date November 3). I have boost 1.59 installed (I downloaded the source and compile it), I defined environment variables BOOST_ROOT,BOOST_INCLUDEDIR,BOOST_LIBRARYDIR. However boost is not found by CMake. I Also tried installing boost using the installer (boost_1_59_0-msvc-14.0-64.exe). Also tried adding 1.59 to the line set(Boost_ADDITIONAL_VERSIONS ..) in Dependencies.cmake. Boost is always mark as not found, injuring my soul and changing the meaning of my life.

I followed this guide:

http://michaelcummings.net/mathoms/gett ... indows-8-1 (Thanks for the creator!)

I just let the default options and mark OGRE_BUILD_SAMPLES2.

I downloaded libsdl2 (SDL2-2.0.3.zip), it is checked as found by CMake, but then it gives an error from the CMakeLists of Samples2, I checked the error if and it is related to OIS:

if (OGRE_BUILD_SAMPLES2 AND NOT OIS_FOUND)
message(STATUS "Could not find dependency: SDL2")
message(STATUS "Skipping samples build")
set(OGRE_BUILD_SAMPLES2 0)
else()

You need OIS for Samples2?

Anyways I downloaded and compiled OIS from here (http://ufpr.dl.sourceforge.net/project/ ... s-v1-3.zip) and let it in the Dependencies folder, it is not found by CMake.

Also, I tried deleting that checking and then got a hundreds of compilation errors!

I'm getting the following output from cmake:
-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ zlib
+ zziplib
+ freeimage
+ freetype
+ OpenGL
+ OpenGL 3+
+ OpenGL ES 1.x
+ OpenGL ES 2.x
+ OpenGL ES 3.x
+ DirectX11
+ SDL2
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ 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>
+ boost: Boost (general) <http://boost.org>
+ boost-thread: Used for threading support <http://boost.org>
+ boost-date_time: Used for threading support <http://boost.org>
+ boost-system: Used for threading support <http://boost.org>
+ boost-chrono: Used for threading support <http://boost.org>
+ boost-atomic: Used for threading support <http://boost.org>
+ POCO: POCO framework <http://pocoproject.org/>
+ tbb: Threading Building Blocks <http://www.threadingbuildingblocks.org/>
+ GLSL Optimizer: GLSL Optimizer <http://github.com/aras-p/glsl-optimizer/>
+ HLSL2GLSL: HLSL2GLSL <http://hlsl2glslfork.googlecode.com/>
+ OIS: Input library needed for the samples <http://sourceforge.net/projects/wgois>
+ Doxygen: Tool for building API documentation <http://doxygen.org>
+ Softimage: Softimage SDK needed for building XSIExporter <FALSE>
+ TinyXML: TinyXML needed for building OgreXMLConverter <FALSE>
+ CppUnit: Library for performing unit tests <http://cppunit.sourceforge.net>
-----------------------------------------------------------------------------

send_errorC:/Projects/Dependencies/bin/debug/OIS_d.dll did not exist, can't install!
send_errorC:/Projects/Dependencies/bin/release/OIS.dll did not exist, can't install!
Could not find dependency: SDL2
Skipping samples build

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

Building components:
+ MeshLodGenerator
+ Overlay
Building plugins:
+ Particle FX
Building rendersystems:
+ Direct3D 11
+ OpenGL 3+ (EXPERIMENTAL)
Building executables:
+ Tools
Building core features:
+ Mesh Lod
+ DDS image codec
+ ETC image codec
+ FreeImage codec
+ ZIP archives

Build type: dynamic
Threading support: none
Use double precision: disabled
Assert mode: standard
Allocator type: nedmalloc (pooling)
STL containers use allocator: enabled
Strings use allocator: disabled
Memory tracker (debug): disabled
Memory tracker (release): disabled
Use 1.x legacy animations: enabled
Use Boost: disabled
Use SIMD (SSE2): enabled
Use SIMD (NEON): enabled

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

Configuring done
Generating done


Any help is appreciated. I offer remote Chakras Alignment to any human being that helps me to get out of this compilation nightmare. The alignment will be made automatically if I got the problem solved ;)
User avatar
c6burns
Beholder
Posts: 1512
Joined: Fri Feb 22, 2013 4:44 am
Location: Deep behind enemy lines
x 138

Re: Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Post by c6burns »

The best way to satisfy all of Ogre's dependencies at once is the ogredeps project (SDL2 and OIS are in there as well as others):
https://bitbucket.org/cabalistic/ogredeps

If you drop that repo into the top level of your Ogre source in a folder named "Dependencies" then Ogre's CMake script should include it (I don't do this but I see it in the CMake scripts and I've heard tell of it). Or you can build ogredeps separately and its install target will create a folder structure you can drop into Ogre before building.

About the samples2 requiring OIS I noticed that line because I tore all references to OIS out of my fork ... I'm not sure it's correct either, but I am too lazy to confirm. I do all my work from 1.10 right now too, so I'm not in a great place to comment on anything 2.0 or 2.1

About boost I have been through some pain back when I used to depend on it, so I feel you. It's a rough journey but definitely turn on Boost_DEBUG and dig through its output to understand what exactly it is looking for and thus why exactly it fails. It doesn't hurt to open up FindBoost.cmake that installs along with CMake but much is externally documented about its functionality also: https://cmake.org/cmake/help/v3.0/module/FindBoost.html
User avatar
Kojack
OGRE Moderator
OGRE Moderator
Posts: 7157
Joined: Sun Jan 25, 2004 7:35 am
Location: Brisbane, Australia
x 534

Re: Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Post by Kojack »

c6burns wrote:The best way to satisfy all of Ogre's dependencies at once is the ogredeps project (SDL2 and OIS are in there as well as others):
https://bitbucket.org/cabalistic/ogredeps

If you drop that repo into the top level of your Ogre source in a folder named "Dependencies" then Ogre's CMake script should include it (I don't do this but I see it in the CMake scripts and I've heard tell of it). Or you can build ogredeps separately and its install target will create a folder structure you can drop into Ogre before building.
When I tried a couple of weeks ago, sdl2 didn't work with the ogredeps in Dependencies directory method. I had to build it separately. I don't know enough cmake to track down the problem though (I prefer premake).
criatura
Gnoblar
Posts: 23
Joined: Sun Jul 17, 2011 1:35 am
x 1

Re: Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Post by criatura »

Thanks for your patience and time. I got Ogre working with samples2. Using this repo: https://bitbucket.org/cabalistic/ogredeps was the key.

Anyways, I have a doubt. Ogre doesn't need boost or some other library for the threads that it uses internally?

I will post my experience, it is just a compilation of information that is in the tutorials, forum, etc.
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5298
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1279
Contact:

Re: Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Post by dark_sylinc »

criatura wrote:Anyways, I have a doubt. Ogre doesn't need boost or some other library for the threads that it uses internally?
There are two types of threading: The old one, and the new one (introduced in Ogre 2.0)

The old one is optional and needs Boost/Poco/TBB. It's crap to be honest. isn't really useful, doesn't improve performance in almost all cases.
The new one cannot be turned off and doesn't require any third party library.
User avatar
Moohasha
Gnoll
Posts: 672
Joined: Fri Dec 07, 2007 7:37 pm
x 8

Re: Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Post by Moohasha »

dark_sylinc wrote:The old one is optional and needs Boost/Poco/TBB. It's crap to be honest. isn't really useful, doesn't improve performance in almost all cases.
The new one cannot be turned off and doesn't require any third party library.
I'm really glad you mentioned that. I thought I needed boost to enable the new threading, but if not then I won't even bother with it.
Black holes are where God divided by 0
Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Post by Transporter »

dark_sylinc wrote:The old one is optional and needs Boost/Poco/TBB. It's crap to be honest. isn't really useful, doesn't improve performance in almost all cases.
The new one cannot be turned off and doesn't require any third party library.
Maybe it's time to drop that dependencies?
User avatar
dark_sylinc
OGRE Team Member
OGRE Team Member
Posts: 5298
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 1279
Contact:

Re: Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Post by dark_sylinc »

Transporter wrote:
dark_sylinc wrote:The old one is optional and needs Boost/Poco/TBB. It's crap to be honest. isn't really useful, doesn't improve performance in almost all cases.
The new one cannot be turned off and doesn't require any third party library.
Maybe it's time to drop that dependencies?
Nothing would make me happier. But I'm not sure if somebody has actual use for them.
User avatar
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 267
Joined: Wed Apr 23, 2014 3:49 pm
Location: Bologna, Italy
x 75
Contact:

Re: Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Post by TaaTT4 »

I'm using it (Boost) to prepare resources in background through the ResourceBackgroundQueue class.

Senior programmer at 505 Games; former senior engine programmer at Sandbox Games
Worked on: Racecraft EsportRacecraft Coin-Op, Victory: The Age of Racing

Transporter
Minaton
Posts: 933
Joined: Mon Mar 05, 2012 11:37 am
Location: Germany
x 110

Re: Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Post by Transporter »

TaaTT4 wrote:I'm using it (Boost) to prepare resources in background through the ResourceBackgroundQueue class.
Is Boost required for this class or is this using the new threading system, too?
User avatar
TaaTT4
OGRE Contributor
OGRE Contributor
Posts: 267
Joined: Wed Apr 23, 2014 3:49 pm
Location: Bologna, Italy
x 75
Contact:

Re: Compiling Branch 2.1 Windows 8.1: Boost, SDL2 not found

Post by TaaTT4 »

Transporter wrote:
TaaTT4 wrote: I'm using it (Boost) to prepare resources in background through the ResourceBackgroundQueue class.
Is Boost required for this class or is this using the new threading system, too?
Yep, it uses the old threading system.

Senior programmer at 505 Games; former senior engine programmer at Sandbox Games
Worked on: Racecraft EsportRacecraft Coin-Op, Victory: The Age of Racing

Post Reply