MuseScore 2.1 fails to build with BUILD_LAME=FALSE
If BUILD_LAME is set to FALSE in the Makefile, MuseScore fails to build. This is because canSaveMp3 and saveMp3 are defined in mscore/exportmp3.cpp, which is not included. This did not occur with MuseScore 2.0.3.
CMakeFiles/mscore.dir/loginmanager.cpp.o: In function `Ms::LoginManager::onGetMediaUrlRequestReady(QByteArray)':
/home/abuild/rpmbuild/BUILD/MuseScore-2.1.0/mscore/loginmanager.cpp:406: undefined reference to `Ms::MuseScore::saveMp3(Ms::Score*, QString const&)'
CMakeFiles/mscore.dir/uploadscoredialog.cpp.o: In function `Ms::UploadScoreDialog::showOrHideUploadAudio()':
/home/abuild/rpmbuild/BUILD/MuseScore-2.1.0/mscore/uploadscoredialog.cpp:196: undefined reference to `Ms::MuseScore::canSaveMp3()'
collect2: error: ld returned 1 exit status
Comments
sounds straightforward to fix by #ifdef'ing out those calls (and automatically saying NO for canSaveMp3).
I can confirm the error in linker stage on my Arch Linux x86-64 machine.
or maybe I'll move the definitions for canSaveMp3 and saveMp3 from exportmp3.cpp into something that is always available, like mscore.cpp, and then if the flag is false, then have those functions return error code.
did that...and now I have the "Upload score audio" checkbox disabled when build with BUILD_LAME=FALSE.
I've did a simple fix: https://github.com/musescore/MuseScore/pull/3172
Fixed in branch 2.2, commit 0b82c14e8c
fix #201146 allow BUILD_LAME=FALSE
Fixed in branch 2.2, commit 3bfcab89ed
Merge pull request #3172 from ericfont/201146-Build_Lame_False
fix #201146 allow BUILD_LAME=FALSE
Fixed in branch master, commit a32642f963
fix #201146 allow BUILD_LAME=FALSE
Automatically closed -- issue fixed for 2 weeks with no activity.
As per https://github.com/musescore/MuseScore/pull/3172#issuecomment-308027546 this is not fixed, not in master at least
My mistake indeed while merging in master.
Fixed in branch master, commit 3798cffcc6
fix #201146: MuseScore fails to build with BUILD_LAME=FALSE
Automatically closed -- issue fixed for 2 weeks with no activity.