MyGUI / mygui

Fast, flexible and simple GUI.
http://mygui.info/
Other
713 stars 205 forks source link

Build Errors Under Linux #258

Closed FuzzyWuggzy closed 1 year ago

FuzzyWuggzy commented 1 year ago

Hi, I am unable to build the latest master commit under Fedora 37.

Here's the output of CMake with default flags:

-- The C compiler identification is GNU 12.3.1
-- The CXX compiler identification is GNU 12.3.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring MYGUI 3.4.3
-- Performing Test MYGUI_GCC_VISIBILITY
-- Performing Test MYGUI_GCC_VISIBILITY - Success
-- Detected g++ 12

-- Enabling GCC visibility flags
-- Found Freetype: /usr/lib64/libfreetype.so (found version "2.12.1") 
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.12")  
-- Found SDL2: /usr/include/SDL2 (found version "2.26.0") 
-- Looking for OGRE...
-- OGRE_PREFIX_WATCH changed.
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.8.0") 
-- Checking for module 'OGRE'
--   Found OGRE, version 1.9.0
-- Found Ogre Ghadamon (1.9.0)
-- Found OGRE: optimized;/usr/lib64/libOgreMain.so;debug;/usr/lib64/libOgreMain.so
-- Looking for OGRE_Paging...
-- Found OGRE_Paging: optimized;/usr/lib64/libOgrePaging.so;debug;/usr/lib64/libOgrePaging.so
-- Looking for OGRE_Terrain...
-- Found OGRE_Terrain: optimized;/usr/lib64/libOgreTerrain.so;debug;/usr/lib64/libOgreTerrain.so
-- Looking for OGRE_Property...
-- Found OGRE_Property: optimized;/usr/lib64/libOgreProperty.so;debug;/usr/lib64/libOgreProperty.so
-- Looking for OGRE_RTShaderSystem...
-- Found OGRE_RTShaderSystem: optimized;/usr/lib64/libOgreRTShaderSystem.so;debug;/usr/lib64/libOgreRTShaderSystem.so
-- Looking for OGRE_Volume...
-- Found OGRE_Volume: optimized;/usr/lib64/libOgreVolume.so;debug;/usr/lib64/libOgreVolume.so
-- Looking for OGRE_Overlay...
-- Found OGRE_Overlay: optimized;/usr/lib64/libOgreOverlay.so;debug;/usr/lib64/libOgreOverlay.so
-- Ogre was found with it's own CMake script
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found version "1.78.0")  
-- Found Doxygen: /usr/bin/doxygen (found version "1.9.5") found components: doxygen dot 
-- 
-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ freetype
+ ogre
+ Doxygen
Congratulations! All external packages have been found.
-----------------------------------------------------------------------------

-- Configuring done (1.8s)
-- Generating done (0.1s)
-- Build files have been written to: /home/fuzzywuggzy/mygui/build

And Make:

[  1%] Building CXX object MyGUIEngine/CMakeFiles/MyGUIEngine.dir/cmake_pch.hxx.gch
In file included from /home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Common.h:22,
                 from /home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Precompiled.h:11,
                 from /home/fuzzywuggzy/mygui/build/MyGUIEngine/CMakeFiles/MyGUIEngine.dir/cmake_pch.hxx:5,
                 from <command-line>:
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Diagnostic.h:57:61: error: expected identifier before ‘[’ token
   57 | #       define MYGUI_OBSOLETE(text) /*! \deprecated text */ [[deprecated(text)]]
      |                                                             ^
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h:20:28: note: in expansion of macro ‘MYGUI_OBSOLETE’
   20 |         class MYGUI_EXPORT MYGUI_OBSOLETE("Singleton class is deprecated. Do not use singletons.") Singleton
      |                            ^~~~~~~~~~~~~~
In file included from /home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Common.h:24:
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h:23:9: error: expected primary-expression before ‘public’
   23 |         public:
      |         ^~~~~~
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h:23:9: error: expected ‘}’ before ‘public’
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h:22:9: note: to match this ‘{’
   22 |         {
      |         ^
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h:22:10: error: expected ‘;’ before ‘public’
   22 |         {
      |          ^
      |          ;
   23 |         public:
      |         ~~~~~~
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h:36:35: error: expected class-name before ‘(’ token
   36 |                 virtual ~Singleton()
      |                                   ^
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h:43:24: error: ‘T’ does not name a type
   43 |                 static T& getInstance()
      |                        ^
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h:49:24: error: ‘T’ does not name a type
   49 |                 static T* getInstancePtr()
      |                        ^
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h: In function ‘std::string_view MyGUI::getClassTypeName()’:
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h:56:32: error: ‘mClassTypeName’ was not declared in this scope; did you mean ‘getClassTypeName’?
   56 |                         return mClassTypeName;
      |                                ^~~~~~~~~~~~~~
      |                                getClassTypeName
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h: At global scope:
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h:59:9: error: expected unqualified-id before ‘private’
   59 |         private:
      |         ^~~~~~~
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Singleton.h:157:1: error: expected declaration before ‘}’ token
  157 | } // namespace MyGUI
      | ^
In file included from /home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_ControllerItem.h:14,
                 from /home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_ControllerFadeAlpha.h:12,
                 from /home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_Precompiled.h:24:
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_EventPair.h:36:27: error: explicit specialization in non-namespace scope ‘class MyGUI::CompositeEvent<EventObsolete, Event>’
   36 |                 template <>
      |                           ^
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_EventPair.h:49:26: error: explicit specialization in non-namespace scope ‘class MyGUI::CompositeEvent<EventObsolete, Event>’
   49 |                 template<>
      |                          ^
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_EventPair.h:57:26: error: explicit specialization in non-namespace scope ‘class MyGUI::CompositeEvent<EventObsolete, Event>’
   57 |                 template<>
      |                          ^
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_EventPair.h:64:26: error: explicit specialization in non-namespace scope ‘class MyGUI::CompositeEvent<EventObsolete, Event>’
   64 |                 template<>
      |                          ^
/home/fuzzywuggzy/mygui/MyGUIEngine/include/MyGUI_EventPair.h:72:26: error: explicit specialization in non-namespace scope ‘class MyGUI::CompositeEvent<EventObsolete, Event>’
   72 |                 template<>
      |                          ^
make[2]: *** [MyGUIEngine/CMakeFiles/MyGUIEngine.dir/build.make:77: MyGUIEngine/CMakeFiles/MyGUIEngine.dir/cmake_pch.hxx.gch] Error 1
make[1]: *** [CMakeFiles/Makefile2:572: MyGUIEngine/CMakeFiles/MyGUIEngine.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
Altren commented 1 year ago

For a test try to comment out whole Singleton class (lines 15 to 62). It is deprecated and not used in MyGUI code. It was left there for backward compatibility with users code if they used this class externally.

Altren commented 1 year ago

But I'm surprised that your compiler doesn't support [[deprecated]] classes

FuzzyWuggzy commented 1 year ago

For a test try to comment out whole Singleton class (lines 15 to 62). It is deprecated and not used in MyGUI code. It was left there for backward compatibility with users code if they used this class externally.

Okay, so commenting out the class and using the MYGUI_DONT_USE_OBSOLETE flag got it further, but it still didn't complete successfully:

[ 30%] Building CXX object Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreVertexBuffer.cpp.o
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp: In destructor ‘virtual MyGUI::OgreDataStream::~OgreDataStream()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:19:25: error: ‘Ogre::DataStreamPtr’ {aka ‘class Ogre::SharedPtr<Ogre::DataStream>’} has no member named ‘reset’
   19 |                 mStream.reset();
      |                         ^~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp: In member function ‘virtual bool MyGUI::OgreDataStream::eof()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:24:24: error: no match for ‘operator!’ (operand type is ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’})
   24 |                 return !mStream ? true : mStream->eof();
      |                        ^~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:24:24: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:24:24: note:   no known conversion for argument 1 from ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’} to ‘bool’
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp: In member function ‘virtual size_t MyGUI::OgreDataStream::size()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:29:24: error: no match for ‘operator!’ (operand type is ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’})
   29 |                 return !mStream ? 0 : mStream->size();
      |                        ^~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:29:24: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:29:24: note:   no known conversion for argument 1 from ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’} to ‘bool’
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp: In member function ‘virtual void MyGUI::OgreDataStream::readline(std::string&, MyGUI::Char)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:34:21: error: no match for ‘operator!’ (operand type is ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’})
   34 |                 if (!mStream)
      |                     ^~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:34:21: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:34:21: note:   no known conversion for argument 1 from ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’} to ‘bool’
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp: In member function ‘virtual size_t MyGUI::OgreDataStream::read(void*, size_t)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:44:21: error: no match for ‘operator!’ (operand type is ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’})
   44 |                 if (!mStream) return 0;
      |                     ^~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:44:21: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataStream.cpp:44:21: note:   no known conversion for argument 1 from ‘Ogre::DataStreamPtr’ {aka ‘Ogre::SharedPtr<Ogre::DataStream>’} to ‘bool’
make[2]: *** [Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/build.make:90: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreDataStream.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 30%] Linking CXX shared library ../../bin/Plugin_StrangeButton.so
[ 30%] Built target Plugin_StrangeButton
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreVertexBuffer.cpp: In member function ‘void MyGUI::OgreVertexBuffer::destroy()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreVertexBuffer.cpp:52:31: error: ‘class Ogre::HardwareVertexBufferSharedPtr’ has no member named ‘reset’
   52 |                 mVertexBuffer.reset();
      |                               ^~~~~
make[2]: *** [Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/build.make:146: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreVertexBuffer.cpp.o] Error 1
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataManager.cpp: In member function ‘const MyGUI::VectorString& MyGUI::OgreDataManager::getDataListNames(const std::string&, bool) const’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataManager.cpp:102:43: error: ‘Ogre::FileInfoListPtr’ {aka ‘class Ogre::SharedPtr<std::vector<Ogre::FileInfo, Ogre::STLAllocator<Ogre::FileInfo, Ogre::CategorisedAllocPolicy<Ogre::MEMCATEGORY_GENERAL> > > >’} has no member named ‘reset’
  102 |                                 pFileInfo.reset();
      |                                           ^~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreDataManager.cpp:129:35: error: ‘class Ogre::SharedPtr<std::vector<Ogre::FileInfo, Ogre::STLAllocator<Ogre::FileInfo, Ogre::CategorisedAllocPolicy<Ogre::MEMCATEGORY_GENERAL> > > >’ has no member named ‘reset’
  129 |                         pFileInfo.reset();
      |                                   ^~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp: In member function ‘virtual void MyGUI::OgreTexture::destroy()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:65:21: error: could not convert ‘((MyGUI::OgreTexture*)this)->MyGUI::OgreTexture::mTexture’ from ‘Ogre::TexturePtr’ {aka ‘Ogre::SharedPtr<Ogre::Texture>’} to ‘bool’
   65 |                 if (mTexture)
      |                     ^~~~~~~~
      |                     |
      |                     Ogre::TexturePtr {aka Ogre::SharedPtr<Ogre::Texture>}
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:68:34: error: ‘Ogre::TexturePtr’ {aka ‘class Ogre::SharedPtr<Ogre::Texture>’} has no member named ‘reset’
   68 |                         mTexture.reset();
      |                                  ^~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp: In member function ‘virtual void MyGUI::OgreTexture::loadFromFile(const std::string&)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:232:75: error: no matching function for call to ‘static_pointer_cast<Ogre::Texture>(Ogre::SharedPtr<Ogre::Resource>&)’
  232 |                         mTexture = std::static_pointer_cast<Ogre::Texture>(createResult.first);
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/12/bits/shared_ptr.h:53,
                 from /usr/include/c++/12/memory:76,
                 from /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:35,
                 from /usr/include/boost/smart_ptr/detail/shared_count.hpp:27,
                 from /usr/include/boost/smart_ptr/shared_ptr.hpp:17,
                 from /usr/include/boost/shared_ptr.hpp:17,
                 from /usr/include/boost/date_time/time_clock.hpp:17,
                 from /usr/include/boost/thread/thread_time.hpp:9,
                 from /usr/include/boost/thread/lock_types.hpp:18,
                 from /usr/include/boost/thread/pthread/recursive_mutex.hpp:13,
                 from /usr/include/boost/thread/recursive_mutex.hpp:16,
                 from /usr/include/OGRE/Threading/OgreThreadHeadersBoost.h:47,
                 from /usr/include/OGRE/Threading/OgreThreadHeaders.h:34,
                 from /usr/include/OGRE/OgreStringInterface.h:35,
                 from /usr/include/OGRE/OgreResource.h:34,
                 from /home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/include/MyGUI_OgreTexture.h:14,
                 from /home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:8:
/usr/include/c++/12/bits/shared_ptr_base.h:1929:5: note: candidate: ‘template<class _Tp, class _Tp1, __gnu_cxx::_Lock_policy _Lp> std::__shared_ptr<_Tp1, _Lp> std::static_pointer_cast(const __shared_ptr<_Tp2, _Lp>&)’
 1929 |     static_pointer_cast(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/shared_ptr_base.h:1929:5: note:   template argument deduction/substitution failed:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:232:75: note:   ‘Ogre::SharedPtr<Ogre::Resource>’ is not derived from ‘const std::__shared_ptr<_Tp2, _Lp>’
  232 |                         mTexture = std::static_pointer_cast<Ogre::Texture>(createResult.first);
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/shared_ptr.h:700:5: note: candidate: ‘template<class _Tp, class _Up> std::shared_ptr<_Tp> std::static_pointer_cast(const shared_ptr<_Tp>&)’
  700 |     static_pointer_cast(const shared_ptr<_Up>& __r) noexcept
      |     ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/12/bits/shared_ptr.h:700:5: note:   template argument deduction/substitution failed:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:232:75: note:   ‘Ogre::SharedPtr<Ogre::Resource>’ is not derived from ‘const std::shared_ptr<_Tp>’
  232 |                         mTexture = std::static_pointer_cast<Ogre::Texture>(createResult.first);
      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp: In member function ‘void MyGUI::OgreTexture::setFormatByOgreTexture()’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreTexture.cpp:246:21: error: could not convert ‘((MyGUI::OgreTexture*)this)->MyGUI::OgreTexture::mTexture’ from ‘Ogre::TexturePtr’ {aka ‘Ogre::SharedPtr<Ogre::Texture>’} to ‘bool’
  246 |                 if (mTexture)
      |                     ^~~~~~~~
      |                     |
      |                     Ogre::TexturePtr {aka Ogre::SharedPtr<Ogre::Texture>}
make[2]: *** [Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/build.make:76: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreDataManager.cpp.o] Error 1
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp: In member function ‘void MyGUI::OgreRenderManager::initialise(Ogre::RenderWindow*, Ogre::SceneManager*)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:56:52: error: ‘TAM_CLAMP’ is not a member of ‘Ogre’
   56 |                 tu->setTextureAddressingMode(Ogre::TAM_CLAMP);
      |                                                    ^~~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp: In member function ‘virtual MyGUI::ITexture* MyGUI::OgreRenderManager::getTexture(const std::string&)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:348:29: error: could not convert ‘texture’ from ‘Ogre::TexturePtr’ {aka ‘Ogre::SharedPtr<Ogre::Texture>’} to ‘bool’
  348 |                         if (texture)
      |                             ^~~~~~~
      |                             |
      |                             Ogre::TexturePtr {aka Ogre::SharedPtr<Ogre::Texture>}
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp: In member function ‘MyGUI::OgreShaderInfo* MyGUI::OgreRenderManager::createShader(const std::string&, const std::string&, const std::string&)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:514:21: error: no match for ‘operator!’ (operand type is ‘Ogre::HighLevelGpuProgramPtr’ {aka ‘Ogre::SharedPtr<Ogre::HighLevelGpuProgram>’})
  514 |                 if (!shaderInfo->vertexProgram)
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:514:21: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:514:21: note:   no known conversion for argument 1 from ‘Ogre::HighLevelGpuProgramPtr’ {aka ‘Ogre::SharedPtr<Ogre::HighLevelGpuProgram>’} to ‘bool’
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:535:21: error: no match for ‘operator!’ (operand type is ‘Ogre::HighLevelGpuProgramPtr’ {aka ‘Ogre::SharedPtr<Ogre::HighLevelGpuProgram>’})
  535 |                 if (!shaderInfo->fragmentProgram)
      |                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:535:21: note: candidate: ‘operator!(bool)’ (built-in)
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:535:21: note:   no known conversion for argument 1 from ‘Ogre::HighLevelGpuProgramPtr’ {aka ‘Ogre::SharedPtr<Ogre::HighLevelGpuProgram>’} to ‘bool’
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp: In member function ‘void MyGUI::OgreRenderManager::setShaderProjectionMatrix(bool)’:
/home/fuzzywuggzy/mygui/Platforms/Ogre/OgrePlatform/src/MyGUI_OgreRenderManager.cpp:570:84: error: ‘Ogre::Affine3’ has not been declared
  570 |                 params->setNamedConstant("worldViewProj", projectionMatrix * Ogre::Affine3::IDENTITY);
      |                                                                                    ^~~~~~~
make[2]: *** [Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/build.make:132: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreTexture.cpp.o] Error 1
make[2]: *** [Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/build.make:118: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/src/MyGUI_OgreRenderManager.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:598: Platforms/Ogre/OgrePlatform/CMakeFiles/MyGUI.OgrePlatform.dir/all] Error 2
make: *** [Makefile:136: all] Error 2

But I'm surprised that your compiler doesn't support [[deprecated]] classes

I've never understood why this is the case, I've found that many projects fail to compile under my Fedora setup when they do under other Linux distros like Arch and Debian, I'm using the stock GCC compiler from the official Fedora repo.

Thank you for responding

FuzzyWuggzy commented 1 year ago

By commenting out all instances of template <> in MyGUI_EventPair.h managed to get building to the point above without needing the MYGUI_DONT_USE_OBSOLETE flag, but but no progress beyond that.

I also tried commenting out line 191 of CMakeLists.txt (add_compile_options(-Werror)) thinking that it'd stop GCC treating warnings as errors, that didn't work either.

Altren commented 1 year ago

I reproduced most issues you've encountered in Ubuntu with GCC 9, so I'll try to spend some time figuring out what's wrong

Altren commented 1 year ago

@FuzzyWuggzy I fixed all issues with my GCC-9 buid. Please check that master builds for you now