Fixes this error: In file included from /builddir/build/BUILD/MuseScore-4.2.1/redhat-linux-build/src/framework/ui/CMakeFiles/ui.dir/Unity/unity_0_cxx.cxx:7: /builddir/build/BUILD/MuseScore-4.2.1/src/framework/ui/uimodule.cpp: In member function ‘virtual void mu::ui::UiModule::registerExports()’: /builddir/build/BUILD/MuseScore-4.2.1/src/framework/ui/uimodule.cpp:93:60: error: no match for ‘operator=’ (operand types are ‘std::shared_ptr’ and ‘std::shared_ptr’) 93 | m_platformTheme = std::make_shared(); | ^ In file included from /usr/include/c++/13/memory:80, from /builddir/build/BUILD/MuseScore-4.2.1/src/framework/global/modularity/../modularity/imoduleinterface.h:26, from /builddir/build/BUILD/MuseScore-4.2.1/src/framework/global/modularity/../iapplication.h:25, from /builddir/build/BUILD/MuseScore-4.2.1/src/framework/global/modularity/imodulesetup.h:28, from /builddir/build/BUILD/MuseScore-4.2.1/src/framework/ui/uimodule.h:26, from /builddir/build/BUILD/MuseScore-4.2.1/src/framework/ui/uimodule.cpp:22: /usr/include/c++/13/bits/shared_ptr.h:418:9: note: candidate: ‘template std::shared_ptr<_Tp>::_Assignable&> std::shared_ptr<_Tp>::operator=(const std::shared_ptr<_Yp>&) [with _Tp = mu::ui::StubPlatformTheme]’ 418 | operator=(const shared_ptr<_Yp>& __r) noexcept | ^~~~~~~~ /usr/include/c++/13/bits/shared_ptr.h:418:9: note: template argument deduction/substitution failed: /usr/include/c++/13/bits/shared_ptr.h: In substitution of ‘template template using std::shared_ptr<_Tp>::_Assignable = typename std::enable_if&, _Arg>::value, std::shared_ptr<_Tp>&>::type [with _Arg = const std::shared_ptr&; _Tp = mu::ui::StubPlatformTheme]’: /usr/include/c++/13/bits/shared_ptr.h:418:2: required by substitution of ‘template std::shared_ptr::_Assignable&> std::shared_ptr::operator=(const std::shared_ptr<_Tp>&) [with _Yp = mu::ui::LinuxPlatformTheme]’ /builddir/build/BUILD/MuseScore-4.2.1/src/framework/ui/uimodule.cpp:93:60: required from here /usr/include/c++/13/bits/shared_ptr.h:183:15: error: no type named ‘type’ in ‘struct std::enable_if&>’ 183 | using _Assignable = typename enable_if< | ^~~~~~~~~~~ /usr/include/c++/13/bits/shared_ptr.h:429:9: note: candidate: ‘template std::shared_ptr<_Tp>::_Assignable > std::shared_ptr<_Tp>::operator=(std::auto_ptr<_Up>&&) [with _Tp = mu::ui::StubPlatformTheme]’ 429 | operator=(auto_ptr<_Yp>&& __r) | ^~~~~~~~ /usr/include/c++/13/bits/shared_ptr.h:429:9: note: template argument deduction/substitution failed: /builddir/build/BUILD/MuseScore-4.2.1/src/framework/ui/uimodule.cpp:93:60: note: ‘std::shared_ptr’ is not derived from ‘std::auto_ptr<_Up>’ 93 | m_platformTheme = std::make_shared(); | ^ /usr/include/c++/13/bits/shared_ptr.h:446:9: note: candidate: ‘template std::shared_ptr<_Tp>::_Assignable > std::shared_ptr<_Tp>::operator=(std::shared_ptr<_Yp>&&) [with _Tp = mu::ui::StubPlatformTheme]’ 446 | operator=(shared_ptr<_Yp>&& __r) noexcept | ^~~~~~~~ /usr/include/c++/13/bits/shared_ptr.h:446:9: note: template argument deduction/substitution failed: /usr/include/c++/13/bits/shared_ptr.h: In substitution of ‘template template using std::shared_ptr<_Tp>::_Assignable = typename std::enable_if&, _Arg>::value, std::shared_ptr<_Tp>&>::type [with _Arg = std::shared_ptr; _Tp = mu::ui::StubPlatformTheme]’: /usr/include/c++/13/bits/shared_ptr.h:446:2: required by substitution of ‘template std::shared_ptr::_Assignable > std::shared_ptr::operator=(std::shared_ptr<_Tp>&&) [with _Yp = mu::ui::LinuxPlatformTheme]’ /builddir/build/BUILD/MuseScore-4.2.1/src/framework/ui/uimodule.cpp:93:60: required from here /usr/include/c++/13/bits/shared_ptr.h:183:15: error: no type named ‘type’ in ‘struct std::enable_if&>’ 183 | using _Assignable = typename enable_if< | ^~~~~~~~~~~ /usr/include/c++/13/bits/shared_ptr.h:454:9: note: candidate: ‘template std::shared_ptr<_Tp>::_Assignable > std::shared_ptr<_Tp>::operator=(std::unique_ptr<_Up, _Ep>&&) [with _Del = _Yp; _Tp = mu::ui::StubPlatformTheme]’ 454 | operator=(unique_ptr<_Yp, _Del>&& __r) | ^~~~~~~~ /usr/include/c++/13/bits/shared_ptr.h:454:9: note: template argument deduction/substitution failed: /builddir/build/BUILD/MuseScore-4.2.1/src/framework/ui/uimodule.cpp:93:60: note: ‘std::shared_ptr’ is not derived from ‘std::unique_ptr<_Tp, _Dp>’ 93 | m_platformTheme = std::make_shared(); | ^ /usr/include/c++/13/bits/shared_ptr.h:414:19: note: candidate: ‘std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(const std::shared_ptr<_Tp>&) [with _Tp = mu::ui::StubPlatformTheme]’ 414 | shared_ptr& operator=(const shared_ptr&) noexcept = default; | ^~~~~~~~ /usr/include/c++/13/bits/shared_ptr.h:414:29: note: no known conversion for argument 1 from ‘std::shared_ptr’ to ‘const std::shared_ptr&’ 414 | shared_ptr& operator=(const shared_ptr&) noexcept = default; | ^~~~~~~~~~~~~~~~~ /usr/include/c++/13/bits/shared_ptr.h:438:7: note: candidate: ‘std::shared_ptr<_Tp>& std::shared_ptr<_Tp>::operator=(std::shared_ptr<_Tp>&&) [with _Tp = mu::ui::StubPlatformTheme]’ 438 | operator=(shared_ptr&& __r) noexcept | ^~~~~~~~ /usr/include/c++/13/bits/shared_ptr.h:438:30: note: no known conversion for argument 1 from ‘std::shared_ptr’ to ‘std::shared_ptr&&’ 438 | operator=(shared_ptr&& __r) noexcept | ~~~~~~~~~~~~~^~~ /builddir/build/BUILD/MuseScore-4.2.1/src/framework/ui/uimodule.cpp:103:42: error: no matching function for call to ‘mu::modularity::ModulesIoC::registerExport(std::string, std::shared_ptr&)’ 103 | ioc()->registerExport(moduleName(), m_platformTheme); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In file included from /builddir/build/BUILD/MuseScore-4.2.1/src/framework/global/modularity/ioc.h:28, from /builddir/build/BUILD/MuseScore-4.2.1/src/framework/ui/uimodule.cpp:27: /builddir/build/BUILD/MuseScore-4.2.1/src/framework/global/modularity/modulesioc.h:53:10: note: candidate: ‘void mu::modularity::ModulesIoC::registerExport(const std::string&, I*) [with I = mu::ui::IPlatformTheme; std::string = std::__cxx11::basic_string]’ 53 | void registerExport(const std::string& module, I* p) | ^~~~~~~~~~~~~~ /builddir/build/BUILD/MuseScore-4.2.1/src/framework/global/modularity/modulesioc.h:53:55: note: no known conversion for argument 2 from ‘std::shared_ptr’ to ‘mu::ui::IPlatformTheme*’ 53 | void registerExport(const std::string& module, I* p) | ~~~^ /builddir/build/BUILD/MuseScore-4.2.1/src/framework/global/modularity/modulesioc.h:73:10: note: candidate: ‘void mu::modularity::ModulesIoC::registerExport(const std::string&, std::shared_ptr<_Tp>) [with I = mu::ui::IPlatformTheme; std::string = std::__cxx11::basic_string]’ 73 | void registerExport(const std::string& module, std::shared_ptr p) | ^~~~~~~~~~~~~~ /builddir/build/BUILD/MuseScore-4.2.1/src/framework/global/modularity/modulesioc.h:73:71: note: no known conversion for argument 2 from ‘shared_ptr’ to ‘shared_ptr’ 73 | void registerExport(const std::string& module, std::shared_ptr p) | ~~~~~~~~~~~~~~~~~~~^ --- MuseScore-4.2.1/src/framework/ui/uimodule.h.orig 2024-01-23 02:35:14.000000000 -0700 +++ MuseScore-4.2.1/src/framework/ui/uimodule.h 2024-02-05 07:00:16.251060724 -0700 @@ -23,6 +23,7 @@ #ifndef MU_UI_UIMODULE_H #define MU_UI_UIMODULE_H +#include #include "modularity/imodulesetup.h" namespace mu::ui {