what qt software do I need to compile MuseScore
I'm trying to compile MuseScore on my work computer (which is a macbook pro). I installed the dev environment long ago on my home computer, but I've forgotten the details.
What part of qt do I need to install?
I found this comment on https://musescore.org/en/developers-handbook/compilation/compile-instru…
Is it still up to date?
> Qt 5.6 is shipped as a online installer, suitable for 10.7+.
> Download, open the DMG and run the online installer. By default it
> will install Qt 5.6 in your home directory.
Comments
Yes. This is up to date. Qt 5.6 is required.
In reply to Yes. This is up to date. Qt by [DELETED] 5
I tried to compile with 5.7 and it failed. I'm not sure if it was qt related. But I'm going to take
your advise and install 5.6 and try again.
In reply to I tried to compile with 5.7 by jim.newton.562
hmmm. I seem to get the same error with Qt 5.6 as with 5.7, perhaps it is not related to Qt.
[johan:~/OpenSource/MuseScore] jnewton% make clean
rm -rf build.debug build.release
rm -rf win32build win32install
[johan:~/OpenSource/MuseScore] jnewton% make -f Makefile.osx release
mkdir build.release; \
cd build.release; \
cmake -DCMAKE_INSTALL_PREFIX="../applebuild" -DCMAKE_BUILD_TYPE=RELEASE \
.. -G Xcode; \
xcodebuild -project mscore.xcodeproj -target lrelease; \
xcodebuild -project mscore.xcodeproj -configuration Release -target ALL_BUILD ; \
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The CXX compiler identification is AppleClang 6.1.0.6020053
CMake Warning at /usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/Platform/Darwin.cmake:179 (message):
Ignoring CMAKE_OSX_SYSROOT value:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
because the directory does not exist.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
CMakeLists.txt:20 (project)
-- Check for working C compiler using: Xcode
-- Check for working C compiler using: Xcode -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Xcode
-- Check for working CXX compiler using: Xcode -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at /Users/jnewton/OpenSource/Qt/5.6/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
Failed to find "gl.h" in
"/System/Library/Frameworks/OpenGL.framework/Headers;/System/Library/Frameworks/AGL.framework/Headers".
Call Stack (most recent call first):
/Users/jnewton/OpenSource/Qt/5.6/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:144 (include)
build/FindQt5.cmake:30 (find_package)
CMakeLists.txt:54 (include)
-- Configuring incomplete, errors occurred!
See also "/Users/jnewton/OpenSource/MuseScore/build.release/CMakeFiles/CMakeOutput.log".
xcodebuild: error: 'mscore.xcodeproj' does not exist.
xcodebuild: error: 'mscore.xcodeproj' does not exist.
make: *** [release] Error 66
[johan:~/OpenSource/MuseScore] jnewton%
In reply to hmmm. I seem to get the same by jim.newton.562
There does not seem to be a file named Headers, neither in /System/Library/Frameworks/AGL.framework nor in /System/Library/Frameworks/OpenGL.framework
[johan:/System/Library/Frameworks] jnewton% pwd
pwd
/System/Library/Frameworks
[johan:/System/Library/Frameworks] jnewton% ls -l AGL.framework OpenGL.framework
ls -l AGL.framework OpenGL.framework
AGL.framework:
total 16
lrwxr-xr-x 1 root wheel 20 May 18 10:53 AGL -> Versions/Current/AGL
lrwxr-xr-x 1 root wheel 26 May 18 10:53 Resources -> Versions/Current/Resources
drwxr-xr-x 4 root wheel 136 May 18 10:56 Versions
OpenGL.framework:
total 24
lrwxr-xr-x 1 root wheel 26 May 18 10:53 Libraries -> Versions/Current/Libraries
lrwxr-xr-x 1 root wheel 23 May 18 10:53 OpenGL -> Versions/Current/OpenGL
lrwxr-xr-x 1 root wheel 26 May 18 10:53 Resources -> Versions/Current/Resources
drwxr-xr-x 4 root wheel 136 May 18 10:55 Versions
[johan:/System/Library/Frameworks] jnewton%
In reply to There does not seem to be a by jim.newton.562
Which version of Mac OSX are you using? The build process as documented is known to work on 10.10 and 10.11.
Do you have XCode installed?
In reply to Which version of Mac OSX are by [DELETED] 5
Yes Xcode is installed, but I haven't yet gotten to the point of being able to run it.
Which version of Mac OSX? It appears to be OS X El Capitan, Version 10.11.5
Is that a problem?
In reply to Yes Xcode is installed, but I by jim.newton.562
That should be fine. But do run XCode once if you never ran it on this computer..
In reply to I tried to compile with 5.7 by jim.newton.562
I don't know Mac compiling, but I use 5.7 at home for testing under Windows 10 and it compiles and works.
In reply to I don't know Mac compiling, by schepers
OK, I ran Xcode, and indeed it wanted to install a bunch of stuff, indicating to me that I had not yet run Xcode on this mac since I installed the OS some time ago. Cool.
Just to make sure I also did "git pull origin master" before recompiling.
Now when try to remake MuseScore, it claims "-- Check for working C compiler using: Xcode -- works", but the compilation still fails because of the missing gl.h file.
Here is the output:
[johan:~/OpenSource/MuseScore] jnewton% make clean
rm -rf build.debug build.release
rm -rf win32build win32install
[johan:~/OpenSource/MuseScore] jnewton% make -f Makefile.osx release
mkdir build.release; \
cd build.release; \
cmake -DCMAKE_INSTALL_PREFIX="../applebuild" -DCMAKE_BUILD_TYPE=RELEASE \
.. -G Xcode; \
xcodebuild -project mscore.xcodeproj -target lrelease; \
xcodebuild -project mscore.xcodeproj -configuration Release -target ALL_BUILD ; \
-- The C compiler identification is AppleClang 6.1.0.6020053
-- The CXX compiler identification is AppleClang 6.1.0.6020053
CMake Warning at /usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/Platform/Darwin.cmake:179 (message):
Ignoring CMAKE_OSX_SYSROOT value:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk
because the directory does not exist.
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.0.2/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
CMakeLists.txt:20 (project)
-- Check for working C compiler using: Xcode
-- Check for working C compiler using: Xcode -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler using: Xcode
-- Check for working CXX compiler using: Xcode -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
CMake Error at /Users/jnewton/OpenSource/Qt/5.6/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfigExtras.cmake:9 (message):
Failed to find "gl.h" in
"/System/Library/Frameworks/OpenGL.framework/Headers;/System/Library/Frameworks/AGL.framework/Headers".
Call Stack (most recent call first):
/Users/jnewton/OpenSource/Qt/5.6/clang_64/lib/cmake/Qt5Gui/Qt5GuiConfig.cmake:144 (include)
build/FindQt5.cmake:30 (find_package)
CMakeLists.txt:54 (include)
-- Configuring incomplete, errors occurred!
See also "/Users/jnewton/OpenSource/MuseScore/build.release/CMakeFiles/CMakeOutput.log".
xcodebuild: error: 'mscore.xcodeproj' does not exist.
xcodebuild: error: 'mscore.xcodeproj' does not exist.
make: *** [release] Error 66
[johan:~/OpenSource/MuseScore] jnewton%
In reply to OK, I ran Xcode, and indeed by jim.newton.562
Just to be 100% sure, did you install the command line tools, as quickly explained in step 3 of the developer handbook ( https://musescore.org/en/developers-handbook/compilation/compile-instru… )?
You can also try to follow this procedure to install them:
http://railsapps.github.io/xcode-command-line-tools.html
Ciao,
ABL
In reply to Just to be 100% sure, did you by ABL
It indeed appears that step had been omitted.
So I went back and did it. "xcode-select --install". This claimed to be installing several things.
However, when I try to make again, I seem to advance to the next error. Do I need to set CMAKE_OSX_SYSROOT or CMAKE_OSX_DEPLOYMENT_TARGET before running make, or is the makefile supposed do do this itself?
------------ here is the entire log----------------
In reply to It indeed appears that step by jim.newton.562
No it should work out of the box. I'm using Cmake 3.4.1 locally (with XCode 7.3 and Mac OS 10.11.5).
In reply to No it should work out of the by [DELETED] 5
I see the path /usr/local/Cellar/cmake/3.0.2, in the output. Does this mean I'm using Cmake 3.0.2? Do I need to upgrade Cmake?
In reply to I see the path by jim.newton.562
i tried "brew upgrade cmake" and it did update the version apparently to 3.6.0
In reply to i tried "brew upgrade cmake" by jim.newton.562
And now when I recompile MuseScore, I think it gets much further before failing to compile.
In reply to And now when I recompile by jim.newton.562
I also tried to brew upgrade all: "brew upgrade". It did indeed upgrade lots and lots of things. Then after running make again I still get compilation errors.
In reply to I also tried to brew upgrade by jim.newton.562
By any chance, is Qt 4 installed on your machine too? Maybe via brew? It could be that the Qt 4 headers are used for your compilation and you don't want that.
In reply to By any chance, is Qt 4 by [DELETED] 5
hmmm, good question. Do you see a clue of that in the output?
Looks like you may be right.
Looks like I can use brew install qt5, and it will hopefully un-install qt4. trying it out....
In reply to hmmm, good question. Do you by jim.newton.562
No, alas :-(
It still contains the curious DEPRECATED_SINCE errors in the compile output.
In my UNIX path I have /Users/jnewton/OpenSource/Qt/5.6/clang_64/bin.
Perhaps I should change this to /usr/local/opt/qt5/bin ???
In reply to No, alas :-( It still by jim.newton.562
Except if you use it somewhere else, I would remove qt from brew and use the one you installed only.
In reply to No, alas :-( It still by jim.newton.562
I took /Users/jnewton/OpenSource/Qt/5.6/clang_64/bin out of my UNIX path and added the newly "brew-installed" qt5, /usr/local/opt/qt5/bin.
Now make seems to be happy. My machine is getting hot and happily compiling lots and lots of stuff. This looks like it may take a while.
In reply to I took by jim.newton.562
OK, making real progress here.
"make -f Makefile.osx release" finished successfully;
"make -f Makefile.osx install" also finished successfully;
"make -f Makefile.osx Xcode" also finished successfully.
"open build.xcode/mscore.xcodeproj" opens Xcode and starts calculating and indexing.
Looks like I'm once again a happy MuseScore developer.
Thanks for all the help.