ARM AppImage needs to work with non-pulse systems (ALSA-only or Jack)

• Apr 12, 2016 - 23:00
Reported version
2.2
Type
Functional
Severity
S4 - Minor
Status
active
Project
Tags

I had never finished getting ARM AppImages working on non-pulse systems before 2.0.3 was released. I'm just noting that I need to get that working. Also I making a note that the same system running 2.0.3 from the Arch Linux ARM repository will be albe to work with ALSA and jack....so this is just something that needs to be fixed for AppImages


Comments

just making a note to myself that audio isn't working when running the 2.0.3 AppImage in an ChromeOS xiwi crouton chroot which only has ALSA. Other ALSA apps like Audacity work out of box. Anyway, as I remember, I will need to modify the recipe to include some alsa lib which I was not able to include correctly previously... I guess I should fix this for 2.0.4

In reply to by ericfontainejazz

I think the main problem is the Qt version of the Docker image.
I believe it is Qt5.3.2, while master branch needs 5.9.x (but I think also 5.8 should work).
Also 2.x branch is affected by a Qt version problem when compiling the ARM AppImage since commit 851710ce9d8 (i.e. before even MuseScore 2.1): "removeOne" became a member of class QVector only in 5.4.
I don't think Qt 5.4.2 can be found in Jessie repository.
I found this: https://github.com/kolosov/qt5BuildRaspbian but I didn't try it.

In reply to by ABL

good point, ABL. I couldn't find pre-built jessie qt 5.9 packages either.

I did search the debian repos before...and I was even thinking about maybe updating the build to debian stretch and then using the buster backport. But I'm going to try doing the buster double-backport to jessie first as described in the link you posted...I didn't know that was actually permitted either...I'll see if it works.

In reply to by Jojo-Schmitz

Jojo, I realize that. But the thing is arch linux will eventually have a package for musescore 3.0, so I think that means that musescore 3.0 should actually work on whatever newer version of Qt 5.X > 5.9 that arch linux eventually uses. So I think this QPrinter problem needs to be fixed, either in musescore or by Qt. And before I can send a bug report to Qt I first want to isolate the problem.

my bad, ABL...I confused those two dockerfiles.

I'm trying again and I'll check in a few hours...I don't have easy access to internet now, so I'm not able to work quite as easily! I've probably screwed up again...but eventually I'll get this right...(I'm not sure about debian's syntax for "force-install" whether I am allowed to append "-t buster", but I don't have a debian machine now to test on):

crosscompile: https://hub.docker.com/r/ericfont/musescore/builds/bzbynbv7u7wq5vqbh9yy…
packaging: https://hub.docker.com/r/ericfont/musescore/builds/bjfk8xbyvti7gngmkkdm…

just a quick status update, I managed to build Qt 5.9.0 statically on my armhf labtop, by running these docker commands: https://github.com/fffaraz/docker-qt/blob/master/static/Dockerfile

Here is tar.gz of the build: https://drive.google.com/file/d/1zN2pE24_oCiw8-I9W4kQYsTGIZcZeDnq/

Now I will try using that Qt build to update the arm app image. (Note I might need to rebuild in debian jessie instead of ubuntu latest, for better compatibility with the jessie app image script...)

In reply to by ericfontainejazz

I managed to create a docker image with packages from the newer Debian version, and in the end it can compile MuseScore.
However, I don't know if the libraries bundled in the package are the correct one to run ARM AppImage MuseScore (or even if some of the "correct" libraries actually exists for this "mixed" libraries executables).
@ericfontainejazz : if you want, you can try this binary:
https://bintray.com/antoniobl/musescore-custom-nightlies/download_file?…
I fear it will most probably crash at startup...
Do you know how can I test the build, since I do not own an arm device?

You could try to run it in the docker container where it has been created with mscore test.mscz -o test.pdf and check for the presence of the pdf. I agree it's a minimal test but better than nothing :)

AppImage seems to be missing libportmidi.so.0

./MuseScoreDev-201802051557-armhf-d28d605-armhf.AppImage
Jack appears to be installed on this system, so we'll use it.
/tmp/.mount_Z2dWhd/bin/mscore-portable-dev: error while loading shared libraries: libportmidi.so.0: cannot open shared object file: No such file or directory

At least it seems to start... :-)
I tried to create an arm virtual machine with qemu under Windows, but, after some (actually a lot of) work only to make the virtual machine work (even if without sound), when launching the AppImage I was obtaining only an "Illegal instruction" error. But I was obtaining the same error also with MuseScore 2.0.3 official arm AppImage, so I suspect it must be a problem of the VM I set up.
@ericfontainejazz : Could you please run
./MuseScoreDev-201802051557-armhf-d28d605-armhf.AppImage check-depends
and post the result, so that I can check if other libraries are missing?
Thank you for your help.

In reply to by ABL

Thanks for all your help on this...I presume https://github.com/AntonioBL/MuseScore/tree/armhf is the branch you are working on...I was trying to get this working myself but your approach might be better.

Here is output of ./MuseScoreDev-201802051557-armhf-d28d605-armhf.AppImage check-depends

Package:

MuseScore 3 Unofficial Developer Build (3.0.0 unstable)
/tmp/.mount_UyKu59/bin/mscore-portable-dev: error while loading shared libraries: libportmidi.so.0: cannot open shared object file: No such file or directory

System:

Linux 4.15.1-1-ARCH armv7l GNU/Linux
NAME="Arch Linux ARM"
ID=archarm
ID_LIKE=arch
PRETTY_NAME="Arch Linux ARM"
ANSI_COLOR="0;36"
HOME_URL="http://archlinuxarm.org/"
SUPPORT_URL="https://archlinuxarm.org/forum"
BUG_REPORT_URL="https://github.com/archlinuxarm/PKGBUILDs/issues"

In package only: 5

libjbig.so.0
libjpeg.so.62
libmng.so.1
libpcre.so.3
libxcb-util.so.0

System only: 46

/usr/lib/ld-linux-armhf.so.3
/usr/lib/libbsd.so.0
/usr/lib/libbz2.so.1.0
/usr/lib/libc.so.6
/usr/lib/libcap.so.2
/usr/lib/libcelt0.so.2
/usr/lib/libcom_err.so.2
/usr/lib/libcrypt.so.1
/usr/lib/libcrypto.so.1.1
/usr/lib/libdl.so.2
/usr/lib/libdouble-conversion.so.1
/usr/lib/libgcc_s.so.1
/usr/lib/libgcrypt.so.20
/usr/lib/libGL.so.1
/usr/lib/libGLdispatch.so.0
/usr/lib/libGLX.so.0
/usr/lib/libgnutls.so.30
/usr/lib/libgpg-error.so.0
/usr/lib/libhogweed.so.4
/usr/lib/libicudata.so.60
/usr/lib/libicui18n.so.60
/usr/lib/libicuuc.so.60
/usr/lib/libjpeg.so.8
/usr/lib/liblz4.so.1
/usr/lib/liblzma.so.5
/usr/lib/libm.so.6
/usr/lib/libnettle.so.6
/usr/lib/libnsl.so.1
/usr/lib/libopus.so.0
/usr/lib/libpcre.so.1
/usr/lib/libpcre2-16.so.0
/usr/lib/libpng16.so.16
/usr/lib/libpthread.so.0
/usr/lib/libQt5XcbQpa.so.5
/usr/lib/libresolv.so.2
/usr/lib/librt.so.1
/usr/lib/libssl.so.1.1
/usr/lib/libstdc++.so.6
/usr/lib/libsystemd.so.0
/usr/lib/libunistring.so.2
/usr/lib/libuuid.so.1
/usr/lib/libxcb-util.so.1
/usr/lib/libxcb-xinerama.so.0
/usr/lib/libXrender.so.1
/usr/lib/libz.so.1
linux-vdso.so.1

Provided by both: 77

/usr/lib/libasound.so.2
/usr/lib/libasyncns.so.0
/usr/lib/libavahi-client.so.3
/usr/lib/libavahi-common.so.3
/usr/lib/libcups.so.2
/usr/lib/libdbus-1.so.3
/usr/lib/libdrm.so.2
/usr/lib/libexpat.so.1
/usr/lib/libffi.so.6
/usr/lib/libFLAC.so.8
/usr/lib/libfontconfig.so.1
/usr/lib/libfreetype.so.6
/usr/lib/libGLESv2.so.2
/usr/lib/libglib-2.0.so.0
/usr/lib/libgmp.so.10
/usr/lib/libgraphite2.so.3
/usr/lib/libgssapi_krb5.so.2
/usr/lib/libharfbuzz.so.0
/usr/lib/libICE.so.6
/usr/lib/libjack.so.0
/usr/lib/libk5crypto.so.3
/usr/lib/libkeyutils.so.1
/usr/lib/libkrb5.so.3
/usr/lib/libkrb5support.so.0
/usr/lib/liblcms2.so.2
/usr/lib/libogg.so.0
/usr/lib/libp11-kit.so.0
/usr/lib/libportaudio.so.2
/usr/lib/libpulse.so.0
/usr/lib/libQt5Concurrent.so.5
/usr/lib/libQt5Core.so.5
/usr/lib/libQt5DBus.so.5
/usr/lib/libQt5Gui.so.5
/usr/lib/libQt5Help.so.5
/usr/lib/libQt5Multimedia.so.5
/usr/lib/libQt5Network.so.5
/usr/lib/libQt5OpenGL.so.5
/usr/lib/libQt5PrintSupport.so.5
/usr/lib/libQt5Qml.so.5
/usr/lib/libQt5Quick.so.5
/usr/lib/libQt5QuickWidgets.so.5
/usr/lib/libQt5Sql.so.5
/usr/lib/libQt5Svg.so.5
/usr/lib/libQt5Test.so.5
/usr/lib/libQt5Widgets.so.5
/usr/lib/libQt5Xml.so.5
/usr/lib/libQt5XmlPatterns.so.5
/usr/lib/libSM.so.6
/usr/lib/libsndfile.so.1
/usr/lib/libsqlite3.so.0
/usr/lib/libtasn1.so.6
/usr/lib/libtiff.so.5
/usr/lib/libvorbis.so.0
/usr/lib/libvorbisenc.so.2
/usr/lib/libvorbisfile.so.3
/usr/lib/libwayland-server.so.0
/usr/lib/libX11-xcb.so.1
/usr/lib/libX11.so.6
/usr/lib/libXau.so.6
/usr/lib/libxcb-icccm.so.4
/usr/lib/libxcb-image.so.0
/usr/lib/libxcb-keysyms.so.1
/usr/lib/libxcb-randr.so.0
/usr/lib/libxcb-render-util.so.0
/usr/lib/libxcb-render.so.0
/usr/lib/libxcb-shape.so.0
/usr/lib/libxcb-shm.so.0
/usr/lib/libxcb-sync.so.1
/usr/lib/libxcb-xfixes.so.0
/usr/lib/libxcb-xkb.so.1
/usr/lib/libxcb.so.1
/usr/lib/libXdmcp.so.6
/usr/lib/libXext.so.6
/usr/lib/libXi.so.6
/usr/lib/libxkbcommon-x11.so.0
/usr/lib/libxkbcommon.so.0
/usr/lib/libxml2.so.2

Provided by neither: 6

libicudata.so.57
libicui18n.so.57
libicuuc.so.57
libportmidi.so.0
libporttime.so.0
libpulsecommon-11.1.so

Extra: (in package but unlinked. Possibly needed by plugins) 37

libcupsprintersupport.so
libdialogplugin.so
libdialogsprivateplugin.so
libEGL.so.1
libgbm.so.1
libglapi.so.0
libgmodule-2.0.so.0
libgnutls-deb0.so.28
libgobject-2.0.so.0
libgthread-2.0.so.0
libhogweed.so.2
libjson-c.so.2
libmodelsplugin.so
libnettle.so.4
liborc-0.4.so.0
libpng12.so.0
libqjpeg.so
libqmng.so
libqquicklayoutsplugin.so
libqsqlite.so
libqsvg.so
libqsvgicon.so
libQt5Designer.so.5
libQt5MultimediaWidgets.so.5
libQt5Positioning.so.5
libQt5Sensors.so.5
libQt5WebChannel.so.5
libqtiff.so
libqtquick2plugin.so
libqtquickcontrolsplugin.so
libqtquickextrasflatplugin.so
libqxcb.so
libwayland-client.so.0
libwrap.so.0
libxcb-dri2.so.0
libxslt.so.1
libXtst.so.6

the important info is that there are 6 libs that need to be provided:

libicudata.so.57
libicui18n.so.57
libicuuc.so.57
libportmidi.so.0
libporttime.so.0
libpulsecommon-11.1.so

I should note that I'm on latest up-to-date as of today arch linux armv7.

Also for reference, the first line of the output is "AppImage contains 697 executables and 119 libraries."

I think it depends on the fact that in the packaging script "copy-libs" all these libraries either have a different version (e.g. libpulsecommon-5.0.so) , or they do not have the trailing ".0".
I will try to patch the file (and verify that it does not interfere with the other AppImage builds) and relaunch the build this evening.
Finger crossed :-)

@ABL, still have a different problem:

./MuseScoreDev-201802072155-armhf-dcccbd2-armhf.AppImage
Jack appears to be installed on this system, so we'll use it.
/tmp/.mount_zUM09S/bin/mscore-portable-dev: symbol lookup error: /tmp/.mount_zUM09S/lib/libGLESv2.so.2: undefined symbol: _glapi_tls_Current

In reply to by ABL

not quite...

./'MuseScoreDev-201802081405-armhf-99f3a55-armhf (1).AppImage'
Jack appears to be installed on this system, so we'll use it.
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: xcb.

Reinstalling the application may fix this problem.
/tmp/.mount_iqPb0c/AppRun: line 28: 1727 Aborted (core dumped) "${APPDIR}/bin/mscore-portable-dev" "$@"

xcb depends on libQt5DBus.so.5 in addition to libQt5Core.so.5 and libQt5Gui.so.5. Looking at your branch, I don't see Qt5DBus included.

BTW, this part of the app image is not architectural-specific...so if you build an x86-64 appimage with this same script, then I'd expect it to produce the same exact error messages.

The nice thing about using debian packages is that in future is that the instructions should automatically translate into producing powerpc-64, arm64, risc-V, and whatever new ISAs appear in the future.

In reply to by ericfontainejazz

I strongly fear that the bundled qt plugin is not working in the armhf operating system.
Can you please try to run the AppImage after exporting the following system variable?
export QT_DEBUG_PLUGINS=1
It should print in the console the specific error which is preventing the loading of Qt xcb plugin.

Sorry to continuously bother you. I am still in the process of creating an armhf virtual machine for the test (it is taking really a lot of time...)

[e@alarm Downloads]$ export QT_DEBUG_PLUGINS=1
[e@alarm Downloads]$ mv 'MuseScoreDev-201802081405-armhf-99f3a55-armhf (1).AppImage' MuseScoreDev-201802081405-armhf-99f3a55-armhf.AppImage
[e@alarm Downloads]$ ./MuseScoreDev-201802081405-armhf-99f3a55-armhf.AppImage
Jack appears to be installed on this system, so we'll use it.
QFactoryLoader::QFactoryLoader() checking directory path "/tmp/.mount_yog1Tr/lib/qt5/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/tmp/.mount_yog1Tr/lib/qt5/plugins/platforms/libqxcb.so"
Found metadata in lib /tmp/.mount_yog1Tr/lib/qt5/plugins/platforms/libqxcb.so, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"xcb"
]
},
"className": "QXcbIntegrationPlugin",
"debug": false,
"version": 329986
}

Got keys from plugin meta data ("xcb")
QFactoryLoader::QFactoryLoader() checking directory path "/tmp/.mount_yog1Tr/bin/platforms" ...
Cannot load library /tmp/.mount_yog1Tr/lib/qt5/plugins/platforms/libqxcb.so: (/usr/lib/libQt5XcbQpa.so.5: symbol _ZN15QPlatformWindow10initializeEv, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)
QLibraryPrivate::loadPlugin failed on "/tmp/.mount_yog1Tr/lib/qt5/plugins/platforms/libqxcb.so" : "Cannot load library /tmp/.mount_yog1Tr/lib/qt5/plugins/platforms/libqxcb.so: (/usr/lib/libQt5XcbQpa.so.5: symbol _ZN15QPlatformWindow10initializeEv, version Qt_5_PRIVATE_API not defined in file libQt5Gui.so.5 with link time reference)"
This application failed to start because it could not find or load the Qt platform plugin "xcb"
in "".

Available platform plugins are: xcb.

Reinstalling the application may fix this problem.
/tmp/.mount_yog1Tr/AppRun: line 28: 3437 Aborted (core dumped) "${APPDIR}/bin/mscore-portable-dev" "$@"

@ABL, I have tested your last file, and it works fine with JACK (and also with external ALSA) on my armv7 labtop. I'd really like for you to get this code merged upstream. I just ordered the Raspberry Pi 3.0 B+ latest revision, and I'm eager to test musescore master and 2.2 nightlies on it, so it would be great it nightlies were ready for when it arrives in a few days.

BTW, I'm noticing now that PortAudio doesn't display anything in drop down menus... But that problem happens with my self-compiled musescore, not just your AppImage, so I will need to fix that myself...

In reply to by ericfontainejazz

@ericfontainejazz : I tried with a vanilla installation of Debian Wheezy on QEmu emulating armhf, and found that a lot of other librarie were missing. Moreover, the libc, libm and libstdc++ in the system were missing some required symbols. Therefore, I tried a workaround to load a bundled library only if newer than the one in the system; I did this for libc.so.6, libm.so.6, libstdc++.so.6.
In the end, however, I could not run the AppImage because it was complaining about the libc, libm, libstdc++ libraries, I don't remember the exact error, even if in its PATH the ones from the compile evironment were in front. I thus tries to run the official armhf AppImage in order to see if at least that could run in my emulator, but it was complaining about missing libraries.
I then gave up, a little discouraged, and decided to come back after the release of MuseScore 2.2.
Indeed, MuseScore 2.2 does not need Qt 5.9 in order to be compiled, so in principle it should compile as 2.0.3 by simply linking (and bundling) Qt 5.4 libraries. To be honest, I didn't yet try to build with the arm Qt 5.4 I pasted the link in one of my previous comment.

If you want to check, this is the state my branch is at the moment:
https://github.com/AntonioBL/MuseScore/commits/armhf
and here is the latest built from that branch:
https://bintray.com/antoniobl/musescore-custom-nightlies/download_file?…

well your lastest built file MuseScoreDev-201802121027-armhf-d65d858-armhf.AppImage still works on my armv7 computer.

Note, the AppImage is being built on Debian Jessie. That means that it won't work on a system earlier than Debian Jessie, so that is why it won't run on Wheezy, and that is to be expected. It is compiled with a newer version of stdlib. But I don't think you should try bothering to try to do a workaround to work on systems earlier than Jessie. Unless we wanted to go the route of compiling Qt on Wheezy (which is something I can do but just takes over a day to complete). I'm perfectly happy with having the AppImage be built on Debian Jessie, since people running the newer Raspberry Pi's or installing a custom linux on their Android or Chromebooks are going to be the type of people who have an OS at least as new as Jessie.

In reply to by ABL

@ABL, I just got the newest Raspberry Pi 3 Model B+, put Raspbian Stetch on it, and tried running your appimage, but I got some error:

./MuseScoreDev-201802121027-armhf-d65d858-armhf.AppImage
Jack appears to be installed on this system, so we'll use it.
/tmp/.mount_9hRF3C/bin/mscore-portable-dev: relocation error: /lib/arm-linux-gnueabihf/libpthread.so.0: symbol __libc_dl_error_tsd, version GLIBC_PRIVATE not defined in file libc.so.6 with link time reference

and fails when I try to run check-depends:

./MuseScoreDev-201802121027-armhf-d65d858-armhf.AppImage check-depends
Jack appears to be installed on this system, so we'll use it.
mktemp: relocation error: /tmp/.mount_sbaFWc/optional/libc/libc.so.6: symbol __tunable_get_val, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference
/tmp/.mount_sbaFWc/bin/portable-utils: line 230: /exes.txt: Permission denied
/tmp/.mount_sbaFWc/bin/portable-utils: line 231: /libs.txt: Permission denied
/tmp/.mount_sbaFWc/bin/portable-utils: line 233: /exes.txt: No such file or directory
teewc: : relocation errorrelocation error: : /tmp/.mount_sbaFWc/optional/libc/libc.so.6/tmp/.mount_sbaFWc/optional/libc/libc.so.6: : symbol __tunable_get_val, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time referencesymbol __tunable_get_val, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference

/tmp/.mount_sbaFWc/bin/portable-utils: line 234: /libs.txt: No such file or directory
teewc: : relocation errorrelocation error: : /tmp/.mount_sbaFWc/optional/libc/libc.so.6/tmp/.mount_sbaFWc/optional/libc/libc.so.6: : symbol __tunable_get_val, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time referencesymbol __tunable_get_val, version GLIBC_PRIVATE not defined in file ld-linux-armhf.so.3 with link time reference

AppImage contains executables and libraries.
Checking dependencies for executables and libraries...
/tmp/.mount_sbaFWc/bin/portable-utils: line 245: +: syntax error: operand expected (error token is "+")

In reply to by ericfontainejazz

@ericfontainejazz : I am trying to install Debian Jessie in qemu for tests, but at the moment I have not yet succeded. Maybe I can try directly with Stretch...

By the way, have you tried the previous version of the build? I think I may have messed up things a little when trying to include and special-casing the libc, lisdtc++, libm libraries.
I mean the version in the link in this comment: https://musescore.org/en/node/105901#comment-819471

no, still the 2018-02-09 build has a problem:

pi@raspberrypi:~/Downloads $ ./MuseScoreDev-201802091602-armhf-e8a2d43-armhf.AppImage
Jack appears to be installed on this system, so we'll use it.
/tmp/.mount_i7xx3m/bin/mscore-portable-dev: /lib/arm-linux-gnueabihf/libc.so.6: version `GLIBC_2.25' not found (required by /tmp/.mount_i7xx3m/lib/libsystemd.so.0)

In reply to by ericfontainejazz

Well, after some work I finally managed to have a vanilla Debian 8.10 running in a qemu emulated armhf architecture.
I found that it is no more possible to use the crosscompiler from http://www.emdebian.org/ after the recent update against Spectre, since that toolbox is not updated (and according to their site, it will not be updated any more).
I thus installed a linaro cross-compile toolchain, and I cross-compiled qt 5.9.4 in a virtual machine at home (it still does not compile QtWebEngine, but I think I only need to explicitly tell it to compile that module).
I modified the script and I think that the following armhf AppImage should now work:
https://bintray.com/antoniobl/musescore-custom-nightlies/download_file?…
at least, it works in my emulated armhf Debian 8.10 (while the previous one was not working).

@ericfontainejazz : could you please test it?

The reference branch is this: https://github.com/AntonioBL/MuseScore/tree/armhf