2.3rc (2.2.10) does not compile on many platforms (assumes signed char)
In file included from /<>/musescore-2.3~pre20180620+dfsg1/libmscore/drumset.h:17:0,
from /<>/musescore-2.3~pre20180620+dfsg1/midi/midifile.cpp:17:
/<>/musescore-2.3~pre20180620+dfsg1/libmscore/tremolo.h:26:26: error: enumerator value -1 is outside the range of underlying type 'char'
INVALID_TREMOLO = -1,
^
Basically, the only valid portable “char” values are in the range 0‥127 because the platform can either have signed chars (-128‥127, like i386) or unsigned chars (0‥255, like arm64). Or specify “signed char” as data type. It’s 02:15 in the night, so I’m not trying to produce a patch here right now, especially as there are multiple ways to solve this, but see https://buildd.debian.org/status/package.php?p=musescore&suite=experime… and mind it fails on, at the very least, all kinds of ARM and PowerPC systems, (64-bit, not 31-bit) S/390 and RISC-Ⅴ right now.
Comments
Adding the GCC option -funsigned-char to CXXFLAGS during a build might just be enough to trigger this on x86 as well (especially to see whether this file is the only occurrence of this bug).
I'm sure this enumeration can be replaced with into values. It is definitely not the performance bottleneck.
you mean change the
class enum:char
intoclass enum
(so int), right? Butclass enum: signed char
should work tooIn reply to you mean change the class… by Jojo-Schmitz
Yep. You are right.
And as per the logs in Travis for arm this is the only occurence that needs mending
See e.g. https://travis-ci.org/musescore/MuseScore/jobs/394716941
There's another bad issue for arm though:
error: 'class QVector<Ms::Spanner*>' has no member named 'removeOne'
Is that due to a wrong Qt version being used or from a missing #include?
removeOne()
seems to come from include/QtCore/qlist.h. Or some difference between a QVector and a QList (which both should provide aremoveOne()
, the former since Qt 5.4, the latter since Qt 4.4)?Ignoring the removeOne issue for now (it exists since sometime between MuseScore 2.0.3.1 and 2.1, so since quite long, probably the Qt it uses is too old, introduces with the fix for #151156: Cross-staff glissando missing when creating piano part)... see https://github.com/musescore/MuseScore/pull/3744
Patch looks good to me, I’ll test it once I get to it ($dayjob calls).
removeOne() is in qlist and qvector, but in 5.3 it’s missing in qvector and only exists in qlist; in my MuseScore backport to Debian jessie, I just patch Qt’s header adding it.
removeOne got added to QVector in Qt 5.4. Which is strange, as in CMakeLists.txt we require Qt 5.4 minimum, so the build shouldn't even start
Mind to provide a patch for that so we can can get the arm AppImage to build again?
“Build dist: trusty”
The fix is easy, you need at least xenial (16.04 LTS) for that, the Qt in trusty is too old. You probably should use bionic as base distro (18.04 LTS) nowadays though.
this is Greek to me ;-)
Fixed in branch 2.3, commit 4de4b35c21
Fix #273538: 2.3beta does not compile on some platforms (assumes signed char)
Fixed in branch 2.3, commit 6cfa473847
Merge pull request #3744 from Jojo-Schmitz/signed_char
Fix #273538: 2.3beta does not compile on some platforms (assumes signed char)
Automatically closed -- issue fixed for 2 weeks with no activity.