Could not read serialized diagnostics file:
I'm trying to compile musescore. And I don't understand what to do about a compile error.
I'm following the instructions I find here. https://musescore.org/en/handbook/developers-handbook/compilation/compi…
When I get down to the step described here,
I'm trying to install the master branch. Is that the right one to compile?
I get an error in building the "ALL_BUILD" scheme.
error: Build input file cannot be found: '/Users/jimka/Repos/MuseScore/build.xcode/mtest/testutils_automoc.cpp' (in target 'testutils' from project 'mscore')
warning: Could not read serialized diagnostics file: Cannot Load File: Failed to open diagnostics file (in target 'testutils' from project 'mscore')
I'm including the build log file below.
Attachment | Size |
---|---|
Screenshot 2020-03-29 at 18.05.13.png | 48.24 KB |
Build target testutils_2020-03-29T17-59-54.txt | 5.8 KB |
Screenshot 2020-03-29 at 18.08.22.png | 345.42 KB |
Comments
I tried also to make the 'mscore' scheme. I get another error.
I can't help with the specific error, but it is not actually necessary to build the XCode project in order to compile, run, and edit MuseScore's code on macOS.
Simply run the
revision
,release
andinstall
targets from Makefile.osx and don't bother with thepackage
orxcode
targets. You should end up with anmscore
binary in a subdirectory of the "applebuild" directory. You can run this binary from the command line, edit some code in your favourite text editor or IDE, then run the compilation again and try the new binary.If that fails, you can try to bypass Makefile.osx and call CMake directly:
This builds MuseScore in the folder "my_build_dir" and installs it to "my_build_dir/my_install_dir". You can call the folders anything you want, including "build.release" and "../applebuild" if you want to match the values given in Makefile.osx.
P.S. The above commands will build any CMake project (not just MuseScore) on any platform (not just MacOS). I don't know why MuseScore supplies platform-dependent Makefiles when the above code is simpler and platform-independent, but there you go!
P.P.S. I do the coding in Qt Creator rather than XCode. If you compile on the command line then it doesn't actually matter which IDE you use, but Qt Creator has various advantages.
In reply to I can't help with the… by shoogle
HI shoogle, my goal is to run musescore from within xcode. I'd like to get more information about the error which I'm having with save-as .mscx ... it has been reported here https://musescore.org/en/node/296121
In reply to I can't help with the… by shoogle
trying to take the advise of shoogle,
cmake .. -DCMAKE_INSTALL_PREFIX=my_install_dir
produces the following error messages.-- Precompiled header generation
Configuring telemetry
CMake Error at telemetry/CMakeLists.txt:22 (find_package):
Could not find a package configuration file provided by "Qt5" with any of
the following names:
Add the installation prefix of "Qt5" to CMAKE_PREFIX_PATH or set "Qt5_DIR"
to a directory containing one of the above files. If "Qt5" provides a
separate development package or SDK, be sure it has been installed.
-- Configuring incomplete, errors occurred!
See also "/Users/jimka/Repos/MuseScore/my_build_dir/CMakeFiles/CMakeOutput.log".
In reply to trying to take the advise of… by jim.newton.562
updated my environment variable Qt5_DIR to ~/Qt/5.9.9/clang_64/lib/cmake/Qt5/
and retry: cmake .. -DCMAKE_INSTALL_PREFIX=my_install_dir
I get the following error:
Telemetry feature is disabled
Build is unstable = TRUE
Telemetry track id is empty
MuseScore SoundFont is up to date.
-- ALSA support disabled
-- PulseAudio support disabled
-- Found lame: /usr/local/Cellar/lame/3.99.5/lib/libmp3lame.dylib
-- JACK (Jack Audio Connection Kit) >= 0.98.0 found. jack support enabled.
PortAudio found. PortAudio support enabled. INCDIR /usr/local/Cellar/portaudio/19.20140130/include, LIBDIR /usr/local/Cellar/portaudio/19.20140130/lib, LIB -L/usr/local/Cellar/portaudio/19.20140130/lib -lportaudio -framework CoreAudio -framework AudioToolbox -framework AudioUnit -framework Carbon
libvorbis detected /usr/local/Cellar/libvorbis/1.3.5/include /usr/local/Cellar/libvorbis/1.3.5/lib -L/usr/local/Cellar/libvorbis/1.3.5/lib -lvorbis
libogg detected /usr/local/Cellar/libogg/1.3.2/include /usr/local/Cellar/libogg/1.3.2/lib -L/usr/local/Cellar/libogg/1.3.2/lib -logg
libsndfile detected /usr/local/Cellar/libsndfile/1.0.26/include /usr/local/Cellar/libsndfile/1.0.26/lib -L/usr/local/Cellar/libsndfile/1.0.26/lib -lsndfile
-- Precompiled header generation
Configuring telemetry
Configuring google_analytics
Configuring global
CMake Error at mscore/CMakeLists.txt:89 (QT5_WRAP_UI):
Unknown CMake command "QT5_WRAP_UI".
BTW, I installed QT as explained here: Is something missing from these instructions?
https://musescore.org/en/handbook/developers-handbook/compilation/compi…
In reply to updated my environment… by jim.newton.562
Perhaps the instructions to add the environment variable Qt5_DIR is missing from https://musescore.org/en/handbook/developers-handbook/compilation/compi… ?
I've added the env var to my environment, and restarted xcode via: open build.xcode/mscore.xcodeproj
Then I tried to run the "mscore" scheme. Alas that fails for new reasons.
In reply to Perhaps the instructions to… by jim.newton.562
I've reverted your changes to https://musescore.org/en/handbook/developers-handbook/compilation/compi… because of:
Use these instructions to compile MuseScore master branch with Xcode and Qt 5.12 on macOS 10.12+. See the Versions Reference page for which macOS versions are supported by Qt 5.12.
In reply to I've reverded your changes… by Jojo-Schmitz
Hi Jojo, I'm confused. Which Qt should I be using? What is the Versions Reference page? Is this something in Qt or in Musescore? The page https://musescore.org/en/handbook/developers-handbook/compilation/compi…
is pretty confusing about which versions of Qt should be used.
In reply to Hi Jojo, I'm confused. … by jim.newton.562
You can use Qt 5.9.x (and the official builds do that) but that handbook page describes how to use Qt 5,12,x (which you could use too). So we should not mix things, like installing 5.12, but pointing at 5.9
The versions reverence pages is at https://musescore.org/en/handbook/developers-handbook/references/versio…
In reply to updated my environment… by jim.newton.562
Don't bother with the Qt5_DIR variable. Instead, run this to make sure that Qt is found in your PATH:
qmake --version
If it's not found, do:
and then run the commands I gave above.
If that works then add the export line to ~/.bash_profile to make it permanent. (If you've already written it in ~/.bash_profile then make sure the version matches the one you have installed.)
In reply to Don't bother with the Qt5… by shoogle
Great!. Thanks for the clue. I had added /Qt/5.9.9/clang_64/bin to my PATH rather than ${HOME}/Qt/5.9.9/clang_64/bin
It was my copy/paste error.
Now I can run cmake .. -DCMAKE_INSTALL_PREFIX=my_install_dir
as you suggested.
However, cmake --build . fails.
The log includes lots and lots of warnings and a few errors which look quite similar.
Here are a few, and the log file is attached.
In reply to Great!. Thanks for the clue… by jim.newton.562
I'm on Windows right now so can't test, but you can experiment adding these option to the configure line:
So that would make it:
cmake .. -G Xcode -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=my_install_dir
In reply to You can experiment adding… by shoogle
ok, that cmake succeeded, thanks.
Now when I try to run
cmake --build .
I get the following error.In reply to ok, that cmake succeeded,… by jim.newton.562
Try deleting the build directory and then start again.
Use the new configure command I gave you last time:
cmake .. -G Xcode -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=my_install_dir
Once you have a successful build you only need to run the compile and install steps to update it in future, but its best to run all steps if you have problems.
In reply to Try deleting the build… by shoogle
OK, I did as you suggested.
Seems to work great to this point, but then
gives the following error