Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 678234 - media-sound/musescore-3.0.1-r1 - .../work/MuseScore-3.0.1/mscore/musescore.cpp:6555:16: error: ‘name’ was not declared in this scope
Summary: media-sound/musescore-3.0.1-r1 - .../work/MuseScore-3.0.1/mscore/musescore.cp...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Sound Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-17 14:35 UTC by Michael Hofmann
Modified: 2019-04-29 00:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Hofmann 2019-02-17 14:35:36 UTC
When I run "emerge musescore", I get the error message below:

[ 67%] Building CXX object mscore/CMakeFiles/mscore.dir/musescore.cpp.o
cd /var/tmp/portage/media-sound/musescore-3.0.1-r1/work/musescore-3.0.1_build/mscore && /usr/bin/x86_64-pc-linux-gnu-g++ -DQT_CONCURRENT_LIB -DQT_CORE_LIB -DQT_GUI_LIB -DQT_HELP_LIB -DQT_NETWORK_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_PRINTSUPPORT_LIB -DQT_QML_LIB -DQT_QUICKWIDGETS_LIB -DQT_QUICK_LIB -DQT_SQL_LIB -DQT_SVG_LIB -DQT_TESTCASE_BUILDDIR=\"/var/tmp/portage/media-sound/musescore-3.0.1-r1/work/musescore-3.0.1_build\" -DQT_TESTLIB_LIB -DQT_WIDGETS_LIB -DQT_XMLPATTERNS_LIB -DQT_XML_LIB -I/var/tmp/portage/media-sound/musescore-3.0.1-r1/work/musescore-3.0.1_build/mscore -I/var/tmp/portage/media-sound/musescore-3.0.1-r1/work/MuseScore-3.0.1/mscore -I/var/tmp/portage/media-sound/musescore-3.0.1-r1/work/musescore-3.0.1_build/mscore/mscore_autogen/include -I/var/tmp/portage/media-sound/musescore-3.0.1-r1/work/MuseScore-3.0.1 -I/var/tmp/portage/media-sound/musescore-3.0.1-r1/work/musescore-3.0.1_build -I/usr/include/freetype2 -I/var/tmp/portage/media-sound/musescore-3.0.1-r1/work/MuseScore-3.0.1/thirdparty -I/usr/include/qt5/QtSolutions -isystem /usr/include/qt5 -isystem /usr/include/qt5/QtCore -isystem /usr/lib64/qt5/mkspecs/linux-g++ -isystem /usr/include/qt5/QtGui -isystem /usr/include/qt5/QtNetwork -isystem /usr/include/qt5/QtTest -isystem /usr/include/qt5/QtQml -isystem /usr/include/qt5/QtQuick -isystem /usr/include/qt5/QtQuickWidgets -isystem /usr/include/qt5/QtWidgets -isystem /usr/include/qt5/QtXml -isystem /usr/include/qt5/QtXmlPatterns -isystem /usr/include/qt5/QtSvg -isystem /usr/include/qt5/QtSql -isystem /usr/include/qt5/QtPrintSupport -isystem /usr/include/qt5/QtConcurrent -isystem /usr/include/qt5/QtOpenGL -isystem /usr/include/qt5/QtHelp   -DNDEBUG -march=native -O2 -pipe -std=gnu++11 -fPIC   -include /var/tmp/portage/media-sound/musescore-3.0.1-r1/work/musescore-3.0.1_build/all.h -g -Wall -Wno-overloaded-virtual -Winvalid-pch -fPIC -std=gnu++11 -o CMakeFiles/mscore.dir/musescore.cpp.o -c /var/tmp/portage/media-sound/musescore-3.0.1-r1/work/MuseScore-3.0.1/mscore/musescore.cpp
cc1plus: warning: /var/tmp/portage/media-sound/musescore-3.0.1-r1/work/musescore-3.0.1_build/all.h.gch: not used because `NDEBUG' is defined [-Winvalid-pch]
In file included from /usr/include/qt5/QtCore/QtCore:4:0,
                 from /usr/include/qt5/QtGui/QtGuiDepends:3,
                 from /usr/include/qt5/QtGui/QtGui:3,
                 from /var/tmp/portage/media-sound/musescore-3.0.1-r1/work/musescore-3.0.1_build/all.h:62,
                 from <command-line>:0:
/var/tmp/portage/media-sound/musescore-3.0.1-r1/work/MuseScore-3.0.1/mscore/musescore.cpp: In member function ‘bool Ms::MuseScore::saveMp3(Ms::Score*, QIODevice*, bool&)’:
/var/tmp/portage/media-sound/musescore-3.0.1-r1/work/MuseScore-3.0.1/mscore/musescore.cpp:6555:16: error: ‘name’ was not declared in this scope
       Q_UNUSED(name);
Comment 1 Michael Hofmann 2019-02-17 14:37:38 UTC
Output of emerge -pqv '=media-sound/musescore-3.0.1-r1::gentoo':

[ebuild  N    ] media-sound/musescore-3.0.1-r1  USE="alsa -debug -jack -mp3 -portaudio -portmidi -pulseaudio -vorbis -webengine"
Comment 2 Michael Hofmann 2019-02-17 15:37:27 UTC
The error message of GCC is the result of a bug in the source code:

mscore/musescore.cpp, line 6550 (differs a bit between 3.0.1, 3.0.2 and head)

  bool MuseScore::saveMp3(Score* score, QIODevice* device, bool& wasCanceled)
       {
  #ifndef USE_LAME
        Q_UNUSED(score);
        Q_UNUSED(name);
        return false;
  #else

Q_UNUSED(name) is wrong and the compiler is right to throw an error.

Let's try to find out why USE_LAME isn't defined on my machine.

  grep -i lame build.log

returns

cmake -C /var/tmp/portage/media-sound/musescore-3.0.2/work/musescore-3.0.2_build/gentoo_common_config.cmake -G Unix Makefiles -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_RPATH=ON -DDOWNLOAD_SOUNDFONT=OFF -DUSE_SYSTEM_QTSINGLEAPPLICATION=ON -DUSE_PATH_WITH_EXPLICIT_QT_VERSION=ON -DUSE_SYSTEM_FREETYPE=ON -DBUILD_ALSA=yes -DBUILD_JACK=no -DBUILD_LAME=no -DBUILD_PORTAUDIO=no -DBUILD_PORTMIDI=no -DBUILD_PULSEAUDIO=no -DSOUNDFONT3=no -DBUILD_WEBENGINE=no -DCMAKE_BUILD_TYPE=Gentoo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/media-sound/musescore-3.0.2/work/musescore-3.0.2_build/gentoo_toolchain.cmake  /var/tmp/portage/media-sound/musescore-3.0.2/work/MuseScore-3.0.2
-- LAME MP3 support disabled

On the other hand, media-sound/lame is installed on my machine. Maybe not with all required USE flags? I'll check that.
Comment 3 Michael Hofmann 2019-02-17 16:12:41 UTC
I think I know what happens:

1) There's a bug in musescore.cpp (see above). I already informed MuseScore developers.

2) The buggy line is surrounded by a "#ifndef USE_LAME" statement. For that reason, GCC compiles the buggy line only if musescore is emerged WITHOUT USE flag mp3.

3) If musescore is emerged WITH USE flag mp3, GCC will skip the buggy line and won't abort with an error message.

Recommended solution (so far): emerge musescore WITH use flag mp3.
Comment 4 Íñigo 2019-02-20 02:26:19 UTC
I have just opened this account only to report this same failure, with the only difference that to me the error occurs when I reach 70% of the construction, not 67, but otherwise it is the same.
So since I see that you have found the temporary solution and since I have already opened this account and logged in, I thank you enormously. Although I try to use FLAC, Opus and OGG as much as I can, emerging Musescore with mp3 is not so grave.
I had tried to use GGC 7, 8, with Qt 5.11, 5.12, even to remove and put some flags that I'm not sure if I need, like portmidi and portaudio, to see if the flute sounded, but it didn't occur to me to add "mp3".

I have used DeepL to translate this into English, so I guess there will be some mistakes that I hope won't impede the intelligibility of my comment.

Vielen dank, Michael!
Comment 5 Andreas Sturmlechner gentoo-dev 2019-04-28 23:08:56 UTC
(In reply to Michael Hofmann from comment #3)
> I think I know what happens:
> 
> 1) There's a bug in musescore.cpp (see above). I already informed MuseScore
> developers.

Thanks, but where is the link to the bug?
Comment 6 Michael Hofmann 2019-04-28 23:27:25 UTC
Sorry, there is no link, because I sent the bug report via email. They answered "thanks for the bug report" and didn't fix the bug.
Comment 7 Larry the Git Cow gentoo-dev 2019-04-28 23:45:40 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=05f19e6eabc1242972c91aac0ded12289fa87a8d

commit 05f19e6eabc1242972c91aac0ded12289fa87a8d
Author:     Andreas Sturmlechner <asturm@gentoo.org>
AuthorDate: 2019-04-28 23:37:18 +0000
Commit:     Andreas Sturmlechner <asturm@gentoo.org>
CommitDate: 2019-04-28 23:45:22 +0000

    media-sound/musescore: Drop USE mp3 to fix build failure w/ !mp3
    
    Reported-by: Michael Hofmann <bugs@ubhofmann.de>
    Closes: https://bugs.gentoo.org/678234
    Package-Manager: Portage-2.3.65, Repoman-2.3.12
    Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>

 media-sound/musescore/musescore-3.0.1-r1.ebuild | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
Comment 8 Michael Hofmann 2019-04-29 00:04:44 UTC
There's a bug fix now in MuseScore's repository, but it has not been merged to master:

https://github.com/musescore/MuseScore/pull/4841