Compiling MuseScore

Do you typeset your scores on Linux? Share your thoughts, tips, and tricks here.

Moderators: MattKingUSA, khz

Aleks
Established Member
Posts: 295
Joined: Wed Nov 09, 2011 5:36 pm
Been thanked: 1 time

Compiling MuseScore

Post by Aleks »

Hello! I'm trying to compile MuseScore using these instructions http://musescore.org/en/developers-hand ... -14.10-git. I have installed Qt5.4, but when "make" I get this error:

Code: Select all

[  0%] Generating all.h.gch
Building CXX object manual/CMakeFiles/genManual.dir/genManual.cpp.o
all.h:159:24: fatal error: QQuickWidget: No such file or directory
 #include <QQuickWidget>
                        ^
compilation terminated.
In file included from <command-line>:0:0:
/home/sash/MuseScore/build.release/all.h:159:24: fatal error: QQuickWidget: No such file or directory
 #include <QQuickWidget>
                        ^
compilation terminated.
make[3]: *** [all.h.gch] Error 1
make[3]: Leaving directory `/home/sash/MuseScore/build.release'
make[2]: *** [CMakeFiles/mops2.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
make[3]: *** [manual/CMakeFiles/genManual.dir/genManual.cpp.o] Error 1
make[3]: Leaving directory `/home/sash/MuseScore/build.release'
make[2]: *** [manual/CMakeFiles/genManual.dir/all] Error 2
make[2]: Leaving directory `/home/sash/MuseScore/build.release'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/sash/MuseScore/build.release'
make: *** [release] Error 2
Joermungand
Established Member
Posts: 276
Joined: Wed Oct 24, 2012 5:19 pm

Re: Compiling MuseScore

Post by Joermungand »

On my current distribution of Qt5 on Arch, the include line should read

Code: Select all

#include <QtQuickWidgets/QQuickWidget>
Try that, it might just work.
Aleks
Established Member
Posts: 295
Joined: Wed Nov 09, 2011 5:36 pm
Been thanked: 1 time

Re: Compiling MuseScore

Post by Aleks »

Could you tell me what exactly should I do, I mean, where exactly should I put that line?
Joermungand
Established Member
Posts: 276
Joined: Wed Oct 24, 2012 5:19 pm

Re: Compiling MuseScore

Post by Joermungand »

As per your error report, it should be line 159 of file /home/sash/MuseScore/build.release/all.h.
Aleks
Established Member
Posts: 295
Joined: Wed Nov 09, 2011 5:36 pm
Been thanked: 1 time

Re: Compiling MuseScore

Post by Aleks »

Same thing:

Code: Select all

all.h:159:39: fatal error: QtQuickWidgets/QQuickWidget: No such file or directory
 #include <QtQuickWidgets/QQuickWidget>
Aleks
Established Member
Posts: 295
Joined: Wed Nov 09, 2011 5:36 pm
Been thanked: 1 time

Re: Compiling MuseScore

Post by Aleks »

Joermungand wrote:As per your error report, it should be line 159 of file /home/sash/MuseScore/build.release/all.h.
Yeah, there was a letter missing in that line. Thank you!
Joermungand
Established Member
Posts: 276
Joined: Wed Oct 24, 2012 5:19 pm

Re: Compiling MuseScore

Post by Joermungand »

I’ve just compiled MuseScore on my system without any change to any file (not even the include line), and it worked all the way through. I’m honestly in the dark as to how I could have helped, but I’m glad it worked out in the end :) .
Aleks
Established Member
Posts: 295
Joined: Wed Nov 09, 2011 5:36 pm
Been thanked: 1 time

Re: Compiling MuseScore

Post by Aleks »

Oh well, in my country there is a saying "first jump, and then say hop". That's what I didn't do this time. In a hurry I thought I figured it out, without trying, but that's not the case.

Now here's what I got;

In the path MuseScore/all.h, line 159 says

Code: Select all

#include <QQuickWidget>
. While "make" it says "no such file or directory". I searched the Qt folder, and actually there is QQuickWidget in the path Qt5.4.0/5.4/gcc/include/QtQuickWidgets/QQuickWidget. The line 158 of all.h says

Code: Select all

#include <QQuickView>
, the QQuickView file is in the path "Qt5.4.0/5.4/gcc/include/QtQuick/QQuickView" and it doesn't find error there. I removed the line

Code: Select all

#include <QQuickWidget>
and it started compiling, but I interrupted the process, thinking that I might get an invalid app in some way.

So the error still remains.
Joermungand
Established Member
Posts: 276
Joined: Wed Oct 24, 2012 5:19 pm

Re: Compiling MuseScore

Post by Joermungand »

Funnily enough, they have the same saying in mine. I take it MuseScore will still not compile?
Aleks
Established Member
Posts: 295
Joined: Wed Nov 09, 2011 5:36 pm
Been thanked: 1 time

Re: Compiling MuseScore

Post by Aleks »

With the line 159 it won't. Do you have the same line in your MuseScore directory all.h file?
Joermungand
Established Member
Posts: 276
Joined: Wed Oct 24, 2012 5:19 pm

Re: Compiling MuseScore

Post by Joermungand »

Yeah, very same line, didn’t change a thing in the source. Now, what’s puzzling me is the Qt include path. What’s the exact full path of ‘Qt5.4.0/5.4/gcc/include/QtQuickWidgets/QQuickWidget’?
Aleks
Established Member
Posts: 295
Joined: Wed Nov 09, 2011 5:36 pm
Been thanked: 1 time

Re: Compiling MuseScore

Post by Aleks »

It's /home/sash/Qt5.4.0/5.4/gcc/include/QtQuickWidgets/QQuickWidget

Maybe it's a broken file or something? In it there's only this

Code: Select all

#include "qquickwidget.h"
Joermungand
Established Member
Posts: 276
Joined: Wed Oct 24, 2012 5:19 pm

Re: Compiling MuseScore

Post by Joermungand »

Just what I thought. That directory is not in the PATH variable, that’s why it can’t find the header. It can find the one in line 158 because you probably have it already, installed by some repo package. How did you install Qt 5.4 (info on your distribution (I’m guessing Ubuntu) and version would help)?
Aleks
Established Member
Posts: 295
Joined: Wed Nov 09, 2011 5:36 pm
Been thanked: 1 time

Re: Compiling MuseScore

Post by Aleks »

I downloaded it from the Qt site. It's Ubuntu 14.04 32bit
Joermungand
Established Member
Posts: 276
Joined: Wed Oct 24, 2012 5:19 pm

Re: Compiling MuseScore

Post by Joermungand »

This is going to be problematic. My advice is that you should install Qt 5.4 from thhis ppa: https://launchpad.net/~beineri/+archive ... t54-trusty. Make sure you install the qt54declarative module. Then try recompiling, typing these commands in order, in the same terminal:

Code: Select all

make clean
source  /opt/qt54/bin/qt54-env.sh
make release
make
Let’s hope it works. I’m not so sure any more, my Ubuntu days are long past and it was for a reason.
Post Reply