Can't build for Windows/MinGW

• Jun 13, 2018 - 21:42

Tried building using the instructions on https://musescore.org/en/handbook/developers-handbook/compilation/compi…. Failed during the compile step with the below error message. I'll also attach the complete log. I'm pretty sure I followed all the given instructions before the compile step. I'm compiling on a fresh clone of the MuseScore repo. Any idea how to get this working on Windows 10?

[ 20%] Linking CXX static library libpoppler.a
mingw32-make[3]: Leaving directory 'D:/dev/github.com/MuseScoreMinGW/build.release'
[ 20%] Built target poppler
mingw32-make[2]: Leaving directory 'D:/dev/github.com/MuseScoreMinGW/build.release'
Makefile:150: recipe for target 'all' failed
mingw32-make[1]: *** [all] Error 2
mingw32-make[1]: Leaving directory 'D:/dev/github.com/MuseScoreMinGW/build.release'
Makefile.mingw:30: recipe for target 'release' failed
mingw32-make: *** [release] Error 2
Attachment Size
musescoreBuildLog.txt 33.6 KB

Comments

Is there a reason you are trying to do a "release" build? I've never attempted that, not sure what issues you'd run into. Normally we stick to "debug". Anyhow, it seems like this is the "buikd" output as opposed to the full "compile" output? There is hopefully more info to be found elsewhere. Is that from the command line, QtCreator, or...?

In reply to by blackears

Well, the instructions don't say to build release instead of debug - they just tell how to do both. If you plan to do development, you'll; surely want to use the debug build.

By "compile ouput", I mean all the stuff you cut out of the first post :-). The actual error was much earlier in the process, it just kep going because it does things in parallel when it can so it stopped only when it needed the result of the failed build. The relevant passage was:

manual\CMakeFiles\pluginDocumentation.dir\build.make:59: recipe for target 'pluginDocumentation' failed
mingw32-make[3]: *** [pluginDocumentation] Error -1073741511
mingw32-make[3]: Leaving directory 'D:/dev/github.com/MuseScoreMinGW/build.debug'
CMakeFiles\Makefile2:7686: recipe for target 'manual/CMakeFiles/pluginDocumentation.dir/all' failed
mingw32-make[2]: *** [manual/CMakeFiles/pluginDocumentation.dir/all] Error 2
mingw32-make[2]: *** Waiting for unfinished jobs....

I get that error if I have my PATH wrong - specifically, I think, if I fail to get the mingw bin & lib folders in there.

In reply to by blackears

Try commenting out the pluginDocumentation compile section, as pointed in https://musescore.org/en/node/270806

That's the section failing in your compile as I can see:

canning dependencies of target pluginDocumentation
mingw32-make[3]: Leaving directory 'D:/dev/github.com/MuseScoreMinGW/build.debug'
mingw32-make[3]: Entering directory 'D:/dev/github.com/MuseScoreMinGW/build.debug'
manual\CMakeFiles\pluginDocumentation.dir\build.make:59: recipe for target 'pluginDocumentation' failed
mingw32-make[3]: *** [pluginDocumentation] Error -1073741511
mingw32-make[3]: Leaving directory 'D:/dev/github.com/MuseScoreMinGW/build.debug'
CMakeFiles\Makefile2:7686: recipe for target 'manual/CMakeFiles/pluginDocumentation.dir/all' failed
mingw32-make[2]: *** [manual/CMakeFiles/pluginDocumentation.dir/all] Error 2
mingw32-make[2]: *** Waiting for unfinished jobs....

Uh-oh....wait, wait. @Marc pointed the root cause of this is a wrong PATH setting? . Then disregard my comment!

Better check the thread: https://musescore.org/en/node/271774

In reply to by mdi1972

I commented out the lines the other post describes. I can now complete the build and produce the .exe. However, the program crashes when I run it from the build.debug directory (build.debug\mscore\MuseScore.exe). I can also not run the installdebug step because that causes an error that the manual cannot be found:

mingw32-make -f Makefile.mingw installdebug
...
-- Up-to-date: D:/dev/github.com/MuseScoreMinGW/win32install/./manual/plugins
-- Up-to-date: D:/dev/github.com/MuseScoreMinGW/win32install/./manual/plugins/manual.css
CMake Error at share/manual/cmake_install.cmake:40 (file):
  file INSTALL cannot find
  "D:/dev/github.com/MuseScoreMinGW/build.debug/share/manual/plugins".
Call Stack (most recent call first):
  share/cmake_install.cmake:46 (include)
  cmake_install.cmake:41 (include)


Makefile:126: recipe for target 'install' failed
mingw32-make[1]: *** [install] Error 1
mingw32-make[1]: Leaving directory 'D:/dev/github.com/MuseScoreMinGW/build.debug'
Makefile.mingw:47: recipe for target 'installdebug' failed
mingw32-make: *** [installdebug] Error 2

In reply to by blackears

Hi,

Try to make a 'release' build, instead of a debug build, and then do a mingw32-make install:

I.e.:

1º.- mingw32-make -f Makefile.mingw release

then,

2º.- mingw32-make -f Makefile.mingw install

then, look into the created win32install\bin folder the MuseScore.exe executable. Run it from that folder.

In reply to by mdi1972

I'm running into the same issue with the release build. The install task ends in an error, and when I try to run MuseScore.exe in the win32install/bin folder, I get a lot of errors about not being able to find Qt5 DLLs.

-- Up-to-date: D:/dev/github.com/MuseScoreMinGW/win32install/./manual/plugins
-- Up-to-date: D:/dev/github.com/MuseScoreMinGW/win32install/./manual/plugins/manual.css
CMake Error at share/manual/cmake_install.cmake:40 (file):
  file INSTALL cannot find
  "D:/dev/github.com/MuseScoreMinGW/build.release/share/manual/plugins".
Call Stack (most recent call first):
  share/cmake_install.cmake:46 (include)
  cmake_install.cmake:41 (include)


Makefile:126: recipe for target 'install' failed
mingw32-make[1]: *** [install] Error 1
mingw32-make[1]: Leaving directory 'D:/dev/github.com/MuseScoreMinGW/build.release'
Makefile.mingw:44: recipe for target 'install' failed
mingw32-make: *** [install] Error 2

In reply to by blackears

Hi @blackears,

-Can you give details of which Qt5 dlls are missing?

-Can you attach the complete logs of the "mingw32-make -f Makefile.mingw release" and "mingw32-make -f Makefile.mingw install?

-Additionaly, can you provide a print screen of your win32install\bin folder (like the one I'm attaching?

Attachment Size
dlls.PNG 73.32 KB

In reply to by mdi1972

Looks like I made a bit of a mistake. I was trying to run from the build.release/mscore folder instead of the win32install\bin folder. When I looked in the latter folder, I found an executable that did launch MuseScore when I clicked on it.

I'm still attaching my build logs in case you want to review them, as I am still getting errors during the build.

Attachment Size
buildReleaseLog.txt 216.89 KB
buildInstallLog.txt 328.28 KB

I wonder about the CMake warnings you're getting, what version of CMake are you using?

Also are you by change trying to build a 2.x branch rather than the master branch? If so: you'd need Qt 5.4 for that, while master needs 5.9 (or later).

I get no CMake warning when building from master and just one when building 2.3, I'm using CMake 3.10.1

Edit: Ah, I see, I'm getting those warnings too now, after having upgraded CMake to 3.11.3
MuseScore builds cleanly though, in QtCreator, and starts too. See https://github.com/musescore/MuseScore/pull/3720 for a PR fixing those warnings

Do you still have an unanswered question? Please log in first to post your question.