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);
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"
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.
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.
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!
(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?
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.
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(-)
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