Skip to content

Musescore doesn't compile with g++15 #18

@shnCanos

Description

@shnCanos

Attempting to compile musescore with g++15 results in the following errors

FAILED: [code=1] src/app/CMakeFiles/MuseScoreStudio.dir/appfactory.cpp.o
/nix/store/n7bkp0v941gcpjqm0vr43j8s3mwgx791-ccache-4.13.2/bin/ccache /nix/store/qd70v8g0561vm8m33kmnp79z00cgyi5n-gcc-wrapper-15.2.0/bin/g++ -DKORS_LOGGER_QT_SUPPORT -DKORS_PROFILER_ENABLED -DMUSE_MODULE_CLOUD_MUSESCORECOM -DMUSE_MODULE_DRAW_USE_QTTEXTDRAW -DQT_CONCURRENT_LIB -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORKAUTH_LIB -DQT_NETWORK_LIB -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_QMLINTEGRATION_LIB -DQT_QML_DEBUG -DQT_QML_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICKWIDGETS_LIB -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -IPath/To/MuseScore/build.debug/src/app -IPath/To/MuseScore/src/app -IPath/To/MuseScore/build.debug -IPath/To/MuseScore/src -IPath/To/MuseScore/muse -IPath/To/MuseScore/muse/framework -IPath/To/MuseScore/muse/framework/global -IPath/To/MuseScore/muse/src -IPath/To/MuseScore/muse/src/framework -IPath/To/MuseScore/muse/src/framework/global -isystem Path/To/MuseScore/build.debug/src/app/MuseScoreStudio_autogen/include -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtCore -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/mkspecs/linux-g++ -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtGui -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtWidgets -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtNetwork -isystem /nix/store/lwa1k7ni8d4ljj44mzzlagk4qnngrsr8-qtdeclarative-6.11.0/include/QtQml -isystem /nix/store/lwa1k7ni8d4ljj44mzzlagk4qnngrsr8-qtdeclarative-6.11.0/include/QtQmlIntegration -isystem /nix/store/lwa1k7ni8d4ljj44mzzlagk4qnngrsr8-qtdeclarative-6.11.0/include/QtQuick -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtOpenGL -isystem /nix/store/lwa1k7ni8d4ljj44mzzlagk4qnngrsr8-qtdeclarative-6.11.0/include/QtQuickControls2 -isystem /nix/store/lwa1k7ni8d4ljj44mzzlagk4qnngrsr8-qtdeclarative-6.11.0/include/QtQuickWidgets -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtXml -isystem /nix/store/anjilsbn2zq0i36z0m67w2djvsvc7lzg-qtsvg-6.11.0/include/QtSvg -isystem /nix/store/b542sz5kqs7kv3lqc8pl7id0rkk4ynmg-qt5compat-6.11.0/include/QtCore5Compat -isystem /nix/store/dq59493bc56qdsd0y6f1jx70sah1gisq-qtnetworkauth-6.11.0/include/QtNetworkAuth -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtPrintSupport -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtDBus -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtConcurrent -g -std=gnu++17 -Wall -Wextra -fPIC -MD -MT src/app/CMakeFiles/MuseScoreStudio.dir/appfactory.cpp.o -MF src/app/CMakeFiles/MuseScoreStudio.dir/appfactory.cpp.o.d -o src/app/CMakeFiles/MuseScoreStudio.dir/appfactory.cpp.o -c Path/To/MuseScore/src/app/appfactory.cpp
In file included from Path/To/MuseScore/muse/framework/global/modularity/../thirdparty/kors_modularity/modularity/imoduleinterface.h:30,
                 from Path/To/MuseScore/muse/framework/global/modularity/imoduleinterface.h:25,
                 from Path/To/MuseScore/muse/framework/global/iapplication.h:25,
                 from Path/To/MuseScore/src/app/appfactory.h:3,
                 from Path/To/MuseScore/src/app/appfactory.cpp:1:
Path/To/MuseScore/muse/framework/global/modularity/../thirdparty/kors_modularity/modularity/context.h:31:15: error: ‘uint16_t’ does not name a type
   31 | using IoCID = uint16_t;
      |               ^~~~~~~~
Path/To/MuseScore/muse/framework/global/modularity/../thirdparty/kors_modularity/modularity/context.h:29:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
   28 | #include <functional>
  +++ |+#include <cstdint>
   29 |
Path/To/MuseScore/muse/framework/global/modularity/../thirdparty/kors_modularity/modularity/context.h:34:5: error: ‘IoCID’ does not name a type
   34 |     IoCID id = static_cast<IoCID>(-1);
      |     ^~~~~
Path/To/MuseScore/muse/framework/global/modularity/../thirdparty/kors_modularity/modularity/context.h:36:18: error: expected ‘)’ before ‘id’
   36 |     Context(IoCID id = static_cast<IoCID>(-1))
      |            ~     ^~~
      |                  )
Path/To/MuseScore/muse/framework/global/modularity/../thirdparty/kors_modularity/modularity/context.h:42:14: error: ‘IoCID’ does not name a type
   42 | static const IoCID globalId = 0;
      |              ^~~~~
In file included from Path/To/MuseScore/muse/framework/global/iapplication.h:29:
Path/To/MuseScore/muse/framework/global/modularity/ioc.h:40:25: error: ‘IoCID’ has not been declared in ‘kors::modularity’
   40 | using kors::modularity::IoCID;
      |                         ^~~~~
In file included from Path/To/MuseScore/src/app/internal/guiapp.h:6,
                 from Path/To/MuseScore/src/app/appfactory.cpp:3:
Path/To/MuseScore/muse/framework/ui/internal/guiapplication.h:57:32: error: ‘IoCID’ is not a member of ‘muse::modularity’
   57 |     std::map<muse::modularity::IoCID, QQuickWindow*> m_windows;
      |                                ^~~~~
Path/To/MuseScore/muse/framework/ui/internal/guiapplication.h:57:52: error: template argument 1 is invalid
   57 |     std::map<muse::modularity::IoCID, QQuickWindow*> m_windows;
      |                                                    ^
Path/To/MuseScore/muse/framework/ui/internal/guiapplication.h:57:52: error: template argument 3 is invalid
Path/To/MuseScore/muse/framework/ui/internal/guiapplication.h:57:52: error: template argument 4 is invalid
[1231/1232] Building CXX object src/app/CMakeFiles/MuseScoreStudio.dir/internal/consoleapp.cpp.o
FAILED: [code=1] src/app/CMakeFiles/MuseScoreStudio.dir/internal/consoleapp.cpp.o
/nix/store/n7bkp0v941gcpjqm0vr43j8s3mwgx791-ccache-4.13.2/bin/ccache /nix/store/qd70v8g0561vm8m33kmnp79z00cgyi5n-gcc-wrapper-15.2.0/bin/g++ -DKORS_LOGGER_QT_SUPPORT -DKORS_PROFILER_ENABLED -DMUSE_MODULE_CLOUD_MUSESCORECOM -DMUSE_MODULE_DRAW_USE_QTTEXTDRAW -DQT_CONCURRENT_LIB -DQT_CORE5COMPAT_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_NETWORKAUTH_LIB -DQT_NETWORK_LIB -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_QMLINTEGRATION_LIB -DQT_QML_DEBUG -DQT_QML_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICKWIDGETS_LIB -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_XML_LIB -IPath/To/MuseScore/build.debug/src/app -IPath/To/MuseScore/src/app -IPath/To/MuseScore/build.debug -IPath/To/MuseScore/src -IPath/To/MuseScore/muse -IPath/To/MuseScore/muse/framework -IPath/To/MuseScore/muse/framework/global -IPath/To/MuseScore/muse/src -IPath/To/MuseScore/muse/src/framework -IPath/To/MuseScore/muse/src/framework/global -isystem Path/To/MuseScore/build.debug/src/app/MuseScoreStudio_autogen/include -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtCore -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/mkspecs/linux-g++ -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtGui -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtWidgets -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtNetwork -isystem /nix/store/lwa1k7ni8d4ljj44mzzlagk4qnngrsr8-qtdeclarative-6.11.0/include/QtQml -isystem /nix/store/lwa1k7ni8d4ljj44mzzlagk4qnngrsr8-qtdeclarative-6.11.0/include/QtQmlIntegration -isystem /nix/store/lwa1k7ni8d4ljj44mzzlagk4qnngrsr8-qtdeclarative-6.11.0/include/QtQuick -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtOpenGL -isystem /nix/store/lwa1k7ni8d4ljj44mzzlagk4qnngrsr8-qtdeclarative-6.11.0/include/QtQuickControls2 -isystem /nix/store/lwa1k7ni8d4ljj44mzzlagk4qnngrsr8-qtdeclarative-6.11.0/include/QtQuickWidgets -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtXml -isystem /nix/store/anjilsbn2zq0i36z0m67w2djvsvc7lzg-qtsvg-6.11.0/include/QtSvg -isystem /nix/store/b542sz5kqs7kv3lqc8pl7id0rkk4ynmg-qt5compat-6.11.0/include/QtCore5Compat -isystem /nix/store/dq59493bc56qdsd0y6f1jx70sah1gisq-qtnetworkauth-6.11.0/include/QtNetworkAuth -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtPrintSupport -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtDBus -isystem /nix/store/1q8sx67miwfn3ws5k7mkmkcjbym4akkp-qtbase-6.11.0/include/QtConcurrent -g -std=gnu++17 -Wall -Wextra -fPIC -MD -MT src/app/CMakeFiles/MuseScoreStudio.dir/internal/consoleapp.cpp.o -MF src/app/CMakeFiles/MuseScoreStudio.dir/internal/consoleapp.cpp.o.d -o src/app/CMakeFiles/MuseScoreStudio.dir/internal/consoleapp.cpp.o -c Path/To/MuseScore/src/app/internal/consoleapp.cpp
In file included from Path/To/MuseScore/muse/framework/global/internal/../modularity/../thirdparty/kors_modularity/modularity/imoduleinterface.h:30,
                 from Path/To/MuseScore/muse/framework/global/internal/../modularity/imoduleinterface.h:25,
                 from Path/To/MuseScore/muse/framework/global/internal/../iapplication.h:25,
                 from Path/To/MuseScore/muse/framework/global/internal/baseapplication.h:27,
                 from Path/To/MuseScore/muse/framework/global/internal/consoleapplication.h:24,
                 from Path/To/MuseScore/src/app/internal/consoleapp.h:30,
                 from Path/To/MuseScore/src/app/internal/consoleapp.cpp:23:
Path/To/MuseScore/muse/framework/global/internal/../modularity/../thirdparty/kors_modularity/modularity/context.h:31:15: error: ‘uint16_t’does not name a type
   31 | using IoCID = uint16_t;
      |               ^~~~~~~~
Path/To/MuseScore/muse/framework/global/internal/../modularity/../thirdparty/kors_modularity/modularity/context.h:29:1: note: ‘uint16_t’ is defined in header ‘<cstdint>’; this is probably fixable by adding ‘#include <cstdint>’
   28 | #include <functional>
  +++ |+#include <cstdint>
   29 |
Path/To/MuseScore/muse/framework/global/internal/../modularity/../thirdparty/kors_modularity/modularity/context.h:34:5: error: ‘IoCID’ does not name a type
   34 |     IoCID id = static_cast<IoCID>(-1);
      |     ^~~~~
Path/To/MuseScore/muse/framework/global/internal/../modularity/../thirdparty/kors_modularity/modularity/context.h:36:18: error: expected ‘)’ before ‘id’
   36 |     Context(IoCID id = static_cast<IoCID>(-1))
      |            ~     ^~~
      |                  )
Path/To/MuseScore/muse/framework/global/internal/../modularity/../thirdparty/kors_modularity/modularity/context.h:42:14: error: ‘IoCID’ does not name a type
   42 | static const IoCID globalId = 0;
      |              ^~~~~
In file included from Path/To/MuseScore/muse/framework/global/internal/../iapplication.h:29:
Path/To/MuseScore/muse/framework/global/internal/../modularity/ioc.h:40:25: error: ‘IoCID’ has not been declared in ‘kors::modularity’
   40 | using kors::modularity::IoCID;
      |                         ^~~~~

Adding:

#include <cstdint>

to:

https://github.com/musescore/muse_framework/blob/main/framework/global/thirdparty/kors_modularity/modularity/context.h

Fixes the issue.

I assume it relates to this: https://www.gnu.org/software/gcc/gcc-15/porting_to.html#header-dep-changes

It happens on both the latest commit at the time of writing and the commit that's currently being used by Musescore.

Notes:

  • I'm not opening a pr yet since I only reproduced this issue on my machine. I'll promptly open one if asked or if someone else reproduces this issue.
  • I did not try to compile musescore with an earlier version of g++

Environment:

  • g++ version: g++ (GCC) 15.2.0
  • OS: Nixos

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions