Can't build for Windows/MinGW
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 Is there a reason you are… by Marc Sabatella
I'm just following the instructions on the page which say to create a release build. I'm building at the command line using Windows 10's powershell.
I tried again with the below command and got a similar result:
mingw32-make -f Makefile.mingw debug
Not sure what you mean by the 'compile' output - I can't find a compile target.
In reply to I'm just following the… 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 Well, the instructions don't… by Marc Sabatella
I've double checked my system path and have all the bin and lib folders I believe I need. I have:
C:\Qt\5.9.6\mingw53_32\bin
C:\Qt\Tools\mingw530_32\lib
C:\Qt\Tools\mingw530_32\bin
C:\Qt\Tools\QtCreator\bin
In reply to I'm just following the… 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 Try commenting out the… 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:
In reply to I commented out the lines… 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 Hi,… 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.
In reply to I'm running into the same… 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?
In reply to Hi @blakbears,… 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.
In reply to Looks like I made a bit of a… by blackears
I can't figure out where those errors in buildInstallLog.txt come from, frankly. Maybe one of the developers (I'm not from the developer team) could gave a hint..
Anyway, I'm glad you finally got built the executable and the required Qt dependents dlls.
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
In reply to I wonder about the CMake… by Jojo-Schmitz
Yes, I'm using Cmake version 3.11.3. I've not tried building with QtCreator yet. I've used it a few times in the past, but am not really familiar with it. I'll read through the rest of the build doc and see if I can get it working.