Ogre 1.10 default branch fails to compile on MinGW-W64 32bit

Problems building or running the engine, queries about how to use features etc.
Post Reply
libolt
Greenskin
Posts: 126
Joined: Wed Jan 19, 2005 4:48 am
x 9

Ogre 1.10 default branch fails to compile on MinGW-W64 32bit

Post by libolt »

Until recently I had been building ogre from the V1-10 branch, which works just fine. Upon attempting to build the default branch from a fresh checkout I get several errors. I am using the 32-bit version of GCC 6.2.0 from MSYS2/MinGW-W64 on Windows 10.

Code: Select all

[ 18%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/OgreParticleEmitterCommands.cpp.obj
In file included from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\OgreMain\src\OgreOptimisedUtilSSE.cpp:39:0:
C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\OgreMain\src\OgreSIMDHelper.h: In function '__m128 Ogre::__mm_rsqrt_nr_ps(const __m128&)':
C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\OgreMain\src\OgreSIMDHelper.h:285:69: warning: SSE vector return without SSE enabled changes the ABI [-Wpsabi]
     static OGRE_FORCE_INLINE __m128 __mm_rsqrt_nr_ps(const __m128& x)
                                                                     ^
In file included from C:/msys64/mingw32/lib/gcc/i686-w64-mingw32/6.2.0/include/x86intrin.h:33:0,
                 from C:/msys64/mingw32/i686-w64-mingw32/include/intrin.h:73,
                 from C:/Users/mmclean/Nextcloud/builds/MinGW/boost-mingw/include/boost-1_62/boost/detail/interlocked.hpp:154,
                 from C:/Users/mmclean/Nextcloud/builds/MinGW/boost-mingw/include/boost-1_62/boost/thread/win32/thread_primitives.hpp:18,
                 from C:/Users/mmclean/Nextcloud/builds/MinGW/boost-mingw/include/boost-1_62/boost/thread/win32/thread_heap_alloc.hpp:9,
                 from C:/Users/mmclean/Nextcloud/builds/MinGW/boost-mingw/include/boost-1_62/boost/thread/detail/thread_heap_alloc.hpp:15,
                 from C:/Users/mmclean/Nextcloud/builds/MinGW/boost-mingw/include/boost-1_62/boost/thread/tss.hpp:10,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/Threading/OgreThreadHeadersBoost.h:47,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/Threading/OgreThreadHeaders.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreStringInterface.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreResource.h:33,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreGpuProgram.h:33,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderable.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreShadowCaster.h:32,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMovableObject.h:36,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreFrustum.h:32,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreCamera.h:36,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreStableHeaders.h:45,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\OgreMain\src\OgreOptimisedUtilSSE.cpp:28:
C:/msys64/mingw32/lib/gcc/i686-w64-mingw32/6.2.0/include/xmmintrin.h: In member function 'virtual void Ogre::OptimisedUtilSSE::softwareVertexMorph(Ogre::Real, const float*, const float*, float*, size_t, size_t, size_t, size_t, bool)':
C:/msys64/mingw32/lib/gcc/i686-w64-mingw32/6.2.0/include/xmmintrin.h:919:1: error: inlining failed in call to always_inline '__m128 _mm_load_ps1(const float*)': target specific option mismatch
 _mm_load_ps1 (float const *__P)
 ^~~~~~~~~~~~
C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\OgreMain\src\OgreOptimisedUtilSSE.cpp:1298:36: note: called from here
         __m128 t4 = _mm_load_ps1(&t);
                                    ^
In file included from C:/msys64/mingw32/lib/gcc/i686-w64-mingw32/6.2.0/include/x86intrin.h:33:0,
                 from C:/msys64/mingw32/i686-w64-mingw32/include/intrin.h:73,
                 from C:/Users/mmclean/Nextcloud/builds/MinGW/boost-mingw/include/boost-1_62/boost/detail/interlocked.hpp:154,
                 from C:/Users/mmclean/Nextcloud/builds/MinGW/boost-mingw/include/boost-1_62/boost/thread/win32/thread_primitives.hpp:18,
                 from C:/Users/mmclean/Nextcloud/builds/MinGW/boost-mingw/include/boost-1_62/boost/thread/win32/thread_heap_alloc.hpp:9,
                 from C:/Users/mmclean/Nextcloud/builds/MinGW/boost-mingw/include/boost-1_62/boost/thread/detail/thread_heap_alloc.hpp:15,
                 from C:/Users/mmclean/Nextcloud/builds/MinGW/boost-mingw/include/boost-1_62/boost/thread/tss.hpp:10,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/Threading/OgreThreadHeadersBoost.h:47,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/Threading/OgreThreadHeaders.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreStringInterface.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreResource.h:33,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreGpuProgram.h:33,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderable.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreShadowCaster.h:32,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMovableObject.h:36,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreFrustum.h:32,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreCamera.h:36,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreStableHeaders.h:45,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\OgreMain\src\OgreOptimisedUtilSSE.cpp:28:
C:/msys64/mingw32/lib/gcc/i686-w64-mingw32/6.2.0/include/xmmintrin.h:185:1: error: inlining failed in call to always_inline '__m128 _mm_add_ps(__m128, __m128)': target specific option mismatch
 _mm_add_ps (__m128 __A, __m128 __B)
 ^~~~~~~~~~
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Ogre 1.10 default branch fails to compile on MinGW-W64 3

Post by paroj »

try to add -msse to CMAKE_CXX_FLAGS
libolt
Greenskin
Posts: 126
Joined: Wed Jan 19, 2005 4:48 am
x 9

Re: Ogre 1.10 default branch fails to compile on MinGW-W64 3

Post by libolt »

Thanks, that fixed the error. Unfortunately it now dies building the OpenGL Rendersystem

Code: Select all

[ 37%] Building CXX object RenderSystems/GLSupport/CMakeFiles/OgreGLSupport.dir/src/win32/OgreWin32Context.cpp.obj
In file included from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreBlendMode.h:32:0,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreTextureUnitState.h:33,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderSystem.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/RenderSystems/GLSupport/include/OgreGLRenderSystemCommon.h:32,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\RenderSystems\GLSupport\src\win32\OgreWin32Context.cpp:34:
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreColourValue.h:321:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::ColourValue&)' declared as  dllimport: attribute ignored [-Wattributes]
         inline _OgreExport friend std::ostream& operator <<
                                                 ^~~~~~~~
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreColourValue.h:321:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::ColourValue&)' declared as  dllimport: attribute ignored [-Wattributes]
In file included from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreQuaternion.h:40:0,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreVector3.h:32,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix3.h:33,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix4.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreTextureUnitState.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderSystem.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/RenderSystems/GLSupport/include/OgreGLRenderSystemCommon.h:32,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\RenderSystems\GLSupport\src\win32\OgreWin32Context.cpp:34:
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMath.h:85:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Radian&)' declared as  dllimport: attribute ignored [-Wattributes]
         inline _OgreExport friend std::ostream& operator <<
                                                 ^~~~~~~~
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMath.h:85:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Radian&)' declared as  dllimport: attribute ignored [-Wattributes]
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMath.h:136:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Degree&)' declared as  dllimport: attribute ignored [-Wattributes]
         inline _OgreExport friend std::ostream& operator <<
                                                 ^~~~~~~~
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMath.h:136:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Degree&)' declared as  dllimport: attribute ignored [-Wattributes]
In file included from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreVector3.h:32:0,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix3.h:33,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix4.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreTextureUnitState.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderSystem.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/RenderSystems/GLSupport/include/OgreGLRenderSystemCommon.h:32,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\RenderSystems\GLSupport\src\win32\OgreWin32Context.cpp:34:
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreQuaternion.h:334:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Quaternion&)' declared as  dllimport: attribute ignored [-Wattributes]
         inline _OgreExport friend std::ostream& operator <<
                                                 ^~~~~~~~
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreQuaternion.h:334:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Quaternion&)' declared as  dllimport: attribute ignored [-Wattributes]
In file included from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreVector3.h:33:0,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix3.h:33,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix4.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreTextureUnitState.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderSystem.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/RenderSystems/GLSupport/include/OgreGLRenderSystemCommon.h:32,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\RenderSystems\GLSupport\src\win32\OgreWin32Context.cpp:34:
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreVector2.h:594:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Vector2&)' declared as  dllimport: attribute ignored [-Wattributes]
         inline _OgreExport friend std::ostream& operator <<
                                                 ^~~~~~~~
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreVector2.h:594:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Vector2&)' declared as  dllimport: attribute ignored [-Wattributes]
In file included from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix3.h:33:0,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix4.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreTextureUnitState.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderSystem.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/RenderSystems/GLSupport/include/OgreGLRenderSystemCommon.h:32,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\RenderSystems\GLSupport\src\win32\OgreWin32Context.cpp:34:
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreVector3.h:783:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Vector3&)' declared as  dllimport: attribute ignored [-Wattributes]
         inline _OgreExport friend std::ostream& operator <<
                                                 ^~~~~~~~
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreVector3.h:783:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Vector3&)' declared as  dllimport: attribute ignored [-Wattributes]
In file included from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix4.h:34:0,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreTextureUnitState.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderSystem.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/RenderSystems/GLSupport/include/OgreGLRenderSystemCommon.h:32,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\RenderSystems\GLSupport\src\win32\OgreWin32Context.cpp:34:
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix3.h:257:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Matrix3&)' declared as  dllimport: attribute ignored [-Wattributes]
         inline _OgreExport friend std::ostream& operator <<
                                                 ^~~~~~~~
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix3.h:257:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Matrix3&)' declared as  dllimport: attribute ignored [-Wattributes]
In file included from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix4.h:35:0,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreTextureUnitState.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderSystem.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/RenderSystems/GLSupport/include/OgreGLRenderSystemCommon.h:32,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\RenderSystems\GLSupport\src\win32\OgreWin32Context.cpp:34:
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreVector4.h:415:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Vector4&)' declared as  dllimport: attribute ignored [-Wattributes]
         inline _OgreExport friend std::ostream& operator <<
                                                 ^~~~~~~~
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreVector4.h:415:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Vector4&)' declared as  dllimport: attribute ignored [-Wattributes]
In file included from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreTextureUnitState.h:34:0,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderSystem.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/RenderSystems/GLSupport/include/OgreGLRenderSystemCommon.h:32,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\RenderSystems\GLSupport\src\win32\OgreWin32Context.cpp:34:
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix4.h:526:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Matrix4&)' declared as  dllimport: attribute ignored [-Wattributes]
         inline _OgreExport friend std::ostream& operator <<
                                                 ^~~~~~~~
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreMatrix4.h:526:49: warning: inline function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::Matrix4&)' declared as  dllimport: attribute ignored [-Wattributes]
In file included from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgrePlaneBoundedVolume.h:33:0,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRay.h:34,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreSceneQuery.h:33,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreSceneManager.h:40,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreSceneManagerEnumerator.h:33,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRoot.h:34,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\RenderSystems\GLSupport\src\win32\OgreWin32Context.cpp:35:
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreAxisAlignedBox.h:353:42: error: function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::AxisAlignedBox&)' definition is marked dllimport
         _OgreExport friend std::ostream& operator<<( std::ostream& o, const AxisAlignedBox &aab )
                                          ^~~~~~~~
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreAxisAlignedBox.h:353:42: error: function 'std::ostream& Ogre::operator<<(std::ostream&, const Ogre::AxisAlignedBox&)' definition is marked dllimport
In file included from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreSceneManager.h:44:0,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreSceneManagerEnumerator.h:33,
                 from C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRoot.h:34,
                 from C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\RenderSystems\GLSupport\src\win32\OgreWin32Context.cpp:35:
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderQueueSortingGrouping.h:137:30: error: function 'bool Ogre::QueuedRenderableCollection::PassGroupLess::operator()(const Ogre::Pass*, const Ogre::Pass*) const' definition is marked dllimport
             bool _OgreExport operator()(const Pass* a, const Pass* b) const
                              ^~~~~~~~
C:/Users/mmclean/Nextcloud/builds/sources/ogre-1.10/OgreMain/include/OgreRenderQueueSortingGrouping.h:163:30: error: function 'bool Ogre::QueuedRenderableCollection::DepthSortDescendingLess::operator()(const Ogre::RenderablePass&, const Ogre::RenderablePass&) const' definition is marked dllimport
             bool _OgreExport operator()(const RenderablePass& a, const RenderablePass& b) const
                              ^~~~~~~~
RenderSystems\GLSupport\CMakeFiles\OgreGLSupport.dir\build.make:62: recipe for target 'RenderSystems/GLSupport/CMakeFiles/OgreGLSupport.dir/src/win32/OgreWin32Context.cpp.obj' failed
mingw32-make[2]: *** [RenderSystems/GLSupport/CMakeFiles/OgreGLSupport.dir/src/win32/OgreWin32Context.cpp.obj] Error 1
CMakeFiles\Makefile2:163: recipe for target 'RenderSystems/GLSupport/CMakeFiles/OgreGLSupport.dir/all' failed
mingw32-make[1]: *** [RenderSystems/GLSupport/CMakeFiles/OgreGLSupport.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Ogre 1.10 default branch fails to compile on MinGW-W64 3

Post by paroj »

it seems to be this issue: https://github.com/ocornut/imgui/issues/349

remove the superficial _OgreExport from the reported inline functions and you should be set. Please make a PR if you are done ;)
libolt
Greenskin
Posts: 126
Joined: Wed Jan 19, 2005 4:48 am
x 9

Re: Ogre 1.10 default branch fails to compile on MinGW-W64 3

Post by libolt »

Okay I removed _OgreExport from that line as well as lines in a couple of other files to get further. Now it dies with the following:

Code: Select all

[ 46%] Building CXX object RenderSystems/GL/CMakeFiles/RenderSystem_GL.dir/src/OgreGLContext.cpp.obj                                                                                                         
C:\Users\mmclean\Nextcloud\builds\sources\ogre-1.10\RenderSystems\GL\src\OgreGLContext.cpp:35:1: error: 'GLEWContext' does not name a type                                                                   
 GLEWContext * glewGetContext()                                                                                                                                                                              
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Ogre 1.10 default branch fails to compile on MinGW-W64 3

Post by paroj »

set OGRE_CONFIG_THREADS= 2 in cmake while I figure out what this was supposed to do..
libolt
Greenskin
Posts: 126
Joined: Wed Jan 19, 2005 4:48 am
x 9

Re: Ogre 1.10 default branch fails to compile on MinGW-W64 3

Post by libolt »

Okay that got me further. Now it fails linking RenderSystem_GL.dll.

Thanks for the help.

Code: Select all

[ 39%] Linking CXX shared library ..\..\bin\RenderSystem_GL.dll
../../lib/OgreGLSupport.a(OgreWin32GLSupport.cpp.obj):OgreWin32GLSupport.cpp:(.text+0x7d29): undefined reference to `_imp__wglCreateContext@4'
../../lib/OgreGLSupport.a(OgreWin32GLSupport.cpp.obj):OgreWin32GLSupport.cpp:(.text+0x7d42): undefined reference to `_imp__wglGetCurrentContext@0'
../../lib/OgreGLSupport.a(OgreWin32GLSupport.cpp.obj):OgreWin32GLSupport.cpp:(.text+0x7d60): undefined reference to `_imp__wglMakeCurrent@8'
../../lib/OgreGLSupport.a(OgreWin32GLSupport.cpp.obj):OgreWin32GLSupport.cpp:(.text+0x802d): undefined reference to `_imp__wglDeleteContext@4'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x18b): undefined reference to `_imp__wglDeleteContext@4'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x84b): undefined reference to `_imp__wglDeleteContext@4'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x97b): undefined reference to `_imp__wglDeleteContext@4'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x1355): undefined reference to `_imp__wglGetCurrentContext@0'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x135b): undefined reference to `_imp__wglMakeCurrent@8'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x1680): undefined reference to `_imp__wglGetCurrentContext@0'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x1686): undefined reference to `_imp__wglMakeCurrent@8'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x2fa2): undefined reference to `_imp__wglGetCurrentContext@0'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x304d): undefined reference to `_imp__wglShareLists@8'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x3068): undefined reference to `_imp__wglMakeCurrent@8'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x32eb): undefined reference to `_imp__wglCreateContext@4'
../../lib/OgreGLSupport.a(OgreWin32Window.cpp.obj):OgreWin32Window.cpp:(.text+0x33c2): undefined reference to `_imp__wglGetCurrentContext@0'
../../lib/OgreGLSupport.a(OgreWin32Context.cpp.obj):OgreWin32Context.cpp:(.text+0x42): undefined reference to `_imp__wglMakeCurrent@8'
../../lib/OgreGLSupport.a(OgreWin32Context.cpp.obj):OgreWin32Context.cpp:(.text+0x62): undefined reference to `_imp__wglMakeCurrent@8'
../../lib/OgreGLSupport.a(OgreWin32Context.cpp.obj):OgreWin32Context.cpp:(.text+0x82): undefined reference to `_imp__wglDeleteContext@4'
../../lib/OgreGLSupport.a(OgreWin32Context.cpp.obj):OgreWin32Context.cpp:(.text+0x131): undefined reference to `_imp__wglCreateContext@4'
../../lib/OgreGLSupport.a(OgreWin32Context.cpp.obj):OgreWin32Context.cpp:(.text+0x144): undefined reference to `_imp__wglGetCurrentContext@0'
../../lib/OgreGLSupport.a(OgreWin32Context.cpp.obj):OgreWin32Context.cpp:(.text+0x153): undefined reference to `_imp__wglMakeCurrent@8'
../../lib/OgreGLSupport.a(OgreWin32Context.cpp.obj):OgreWin32Context.cpp:(.text+0x178): undefined reference to `_imp__wglShareLists@8'
../../lib/OgreGLSupport.a(OgreWin32Context.cpp.obj):OgreWin32Context.cpp:(.text+0x288): undefined reference to `_imp__wglDeleteContext@4'
collect2.exe: error: ld returned 1 exit status
RenderSystems\GL\CMakeFiles\RenderSystem_GL.dir\build.make:1731: recipe for target 'bin/RenderSystem_GL.dll' failed
mingw32-make[2]: *** [bin/RenderSystem_GL.dll] Error 1
CMakeFiles\Makefile2:219: recipe for target 'RenderSystems/GL/CMakeFiles/RenderSystem_GL.dir/all' failed
mingw32-make[1]: *** [RenderSystems/GL/CMakeFiles/RenderSystem_GL.dir/all] Error 2
Makefile:148: recipe for target 'all' failed
mingw32-make: *** [all] Error 2
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Ogre 1.10 default branch fails to compile on MinGW-W64 3

Post by paroj »

seems it is missing the opengl32 library. try this patch: https://github.com/paroj/ogre/commit/03 ... 5d6a05a734

also what is the value of OPENGL_gl_LIBRARY in cmake?
libolt
Greenskin
Posts: 126
Joined: Wed Jan 19, 2005 4:48 am
x 9

Re: Ogre 1.10 default branch fails to compile on MinGW-W64 3

Post by libolt »

Thanks, that fixed the build of the GL RenderSystems. I ran into an issue where I had to remove _OgrePCZPluginExport from line 263 of PlugIns/PCZSceneManager/include/OgrePCZone.h. Which is similar to the _OgreExport issues and that allowed the rest of Ogre to build successfully.

Thanks for your help. Time to get MyGUI and a few other things updated so I can get back to testing my code :)

Mike
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Ogre 1.10 default branch fails to compile on MinGW-W64 3

Post by paroj »

could you still post a diff or make a PR with your _OgreExport fixes? except for that current default should now also build with OGRE_CONFIG_THREADS=1.
libolt
Greenskin
Posts: 126
Joined: Wed Jan 19, 2005 4:48 am
x 9

Re: Ogre 1.10 default branch fails to compile on MinGW-W64 3

Post by libolt »

I am not sure how to do a pull request. However, here is the output of hg diff:

Code: Select all

diff -r 28319bf4f2ed OgreMain/include/OgreAxisAlignedBox.h
--- a/OgreMain/include/OgreAxisAlignedBox.h     Mon Jan 16 02:14:11 2017 +0100
+++ b/OgreMain/include/OgreAxisAlignedBox.h     Mon Jan 16 14:31:41 2017 -0700
@@ -350,7 +350,7 @@
             }
         }

-        _OgreExport friend std::ostream& operator<<( std::ostream& o, const AxisAlignedBox &aab )
+        friend std::ostream& operator<<( std::ostream& o, const AxisAlignedBox &aab )
         {
             switch (aab.mExtent)
             {
diff -r 28319bf4f2ed OgreMain/include/OgreCompositorManager.h
--- a/OgreMain/include/OgreCompositorManager.h  Mon Jan 16 02:14:11 2017 +0100
+++ b/OgreMain/include/OgreCompositorManager.h  Mon Jan 16 14:31:41 2017 -0700
@@ -265,7 +265,7 @@
         };
         struct TextureDefLess
         {
-            bool _OgreExport operator()(const TextureDef& x, const TextureDef& y) const
+            bool operator()(const TextureDef& x, const TextureDef& y) const
             {
                 if (x.format < y.format)
                     return true;
diff -r 28319bf4f2ed OgreMain/include/OgreRenderQueueSortingGrouping.h
--- a/OgreMain/include/OgreRenderQueueSortingGrouping.h Mon Jan 16 02:14:11 2017 +0100
+++ b/OgreMain/include/OgreRenderQueueSortingGrouping.h Mon Jan 16 14:31:41 2017 -0700
@@ -134,7 +134,7 @@
         /// Comparator to order pass groups
         struct PassGroupLess
         {
-            bool _OgreExport operator()(const Pass* a, const Pass* b) const
+            bool operator()(const Pass* a, const Pass* b) const
             {
                 // Sort by passHash, which is pass, then texture unit changes
                 uint32 hasha = a->getHash();
@@ -160,7 +160,7 @@
             {
             }

-            bool _OgreExport operator()(const RenderablePass& a, const RenderablePass& b) const
+            bool operator()(const RenderablePass& a, const RenderablePass& b) const
             {
                 if (a.renderable == b.renderable)
                 {
diff -r 28319bf4f2ed OgreMain/include/OgreResourceBackgroundQueue.h
--- a/OgreMain/include/OgreResourceBackgroundQueue.h    Mon Jan 16 02:14:11 2017 +0100
+++ b/OgreMain/include/OgreResourceBackgroundQueue.h    Mon Jan 16 14:31:41 2017 -0700
@@ -134,7 +134,7 @@
             Listener* listener;
             BackgroundProcessResult result;

-            _OgreExport friend std::ostream& operator<<(std::ostream& o, const ResourceRequest& r)
+            friend std::ostream& operator<<(std::ostream& o, const ResourceRequest& r)
             { (void)r; return o; }
         };

@@ -151,7 +151,7 @@
             ResourcePtr resource;
             ResourceRequest request;

-            _OgreExport friend std::ostream& operator<<(std::ostream& o, const ResourceResponse& r)
+            friend std::ostream& operator<<(std::ostream& o, const ResourceResponse& r)
             { (void)r; return o; }
         };

diff -r 28319bf4f2ed OgreMain/include/OgreStaticFaceGroup.h
--- a/OgreMain/include/OgreStaticFaceGroup.h    Mon Jan 16 02:14:11 2017 +0100
+++ b/OgreMain/include/OgreStaticFaceGroup.h    Mon Jan 16 14:31:41 2017 -0700
@@ -110,8 +110,8 @@
         PatchSurface* patchSurf;


-        _OgreExport friend std::ostream& operator<<(std::ostream& o, const StaticFaceGroup& s)
-        {
+       friend std::ostream& operator<<(std::ostream& o, const StaticFaceGroup&
+                       s) {
             o << "StaticFaceGroup(";
             if (s.fType == FGT_FACE_LIST)
             {
diff -r 28319bf4f2ed OgreMain/src/OgreSIMDHelper.h
--- a/OgreMain/src/OgreSIMDHelper.h     Mon Jan 16 02:14:11 2017 +0100
+++ b/OgreMain/src/OgreSIMDHelper.h     Mon Jan 16 14:31:41 2017 -0700
@@ -79,7 +79,6 @@
 #endif // OGRE_DOUBLE_PRECISION == 0 && OGRE_CPU == OGRE_CPU_X86


-
 //---------------------------------------------------------------------
 // SIMD macros and helpers
 //---------------------------------------------------------------------
diff -r 28319bf4f2ed PlugIns/PCZSceneManager/include/OgrePCZone.h
--- a/PlugIns/PCZSceneManager/include/OgrePCZone.h      Mon Jan 16 02:14:11 2017 +0100
+++ b/PlugIns/PCZSceneManager/include/OgrePCZone.h      Mon Jan 16 14:31:41 2017 -0700
@@ -260,7 +260,7 @@
             PortalSortDistance(const Vector3& inCameraPosition) : cameraPosition(inCameraPosition)
             { }

-            bool _OgrePCZPluginExport operator()(const PortalBase* p1, const PortalBase* p2) const
+            bool operator()(const PortalBase* p1, const PortalBase* p2) const
             {
                 Real depth1 = p1->getDerivedCP().squaredDistance(cameraPosition);
                 Real depth2 = p2->getDerivedCP().squaredDistance(cameraPosition);
diff -r 28319bf4f2ed RenderSystems/GL/include/OgreGLPrerequisites.h
--- a/RenderSystems/GL/include/OgreGLPrerequisites.h    Mon Jan 16 02:14:11 2017 +0100
+++ b/RenderSystems/GL/include/OgreGLPrerequisites.h    Mon Jan 16 14:31:41 2017 -0700
@@ -48,6 +48,10 @@
     typedef SharedPtr<GLTexture> GLTexturePtr;
 }

+#if OGRE_THREAD_SUPPORT == 1
+#   define GLEW_MX
+#endif
+
 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
 #if !defined( __MINGW32__ )
 #   define WIN32_LEAN_AND_MEAN
@@ -69,6 +73,18 @@
 #   include <OpenGL/glu.h>
 #endif

+#if OGRE_THREAD_SUPPORT == 1
+#include "Threading/OgreThreadHeaders.h"
+    // implemented in OgreGLContext.cpp
+    GLEWContext * glewGetContext();
+
+#   if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
+    // implemented in OgreWin32Context.cpp
+    WGLEWContext * wglewGetContext();
+#   endif
+
+#endif
+
 /// Lots of generated code in here which triggers the new VC CRT security warnings
 #if !defined( _CRT_SECURE_NO_DEPRECATE )
 #define _CRT_SECURE_NO_DEPRECATE
paroj
OGRE Team Member
OGRE Team Member
Posts: 1994
Joined: Sun Mar 30, 2014 2:51 pm
x 1074
Contact:

Re: Ogre 1.10 default branch fails to compile on MinGW-W64 3

Post by paroj »

thanks, its in the import queue now:
https://github.com/OGRECave/ogre/pull/315

if you want to create a pull-request next time, see:
https://help.github.com/articles/working-with-forks/
Post Reply