Arch linux package?

bunjee

- Initially I thought about publishing a tar archive for MotionBox. But VLC plugins do not like it very much. Could you run a "ldd" on MotionBox and let me know which libraries I should package aside from libaudio.so.2 ?

The latest tagged 1.1.2 release was made prior to Linux support. So it does not work.

The latest pull from master should run fine though, are you having issues with it ?

Here is the full output of ldd for you, it ran fine for me after installing the nas package that provided libaudio.so.2:
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
./MotionBox: /usr/lib/libcrypto.so.1.0.0: no version information available (required by /home/mio/Downloads/MotionBox-1.1.2/libtorrent-rasterbar.so.9)
./MotionBox: /usr/lib/libssl.so.1.0.0: no version information available (required by /home/mio/Downloads/MotionBox-1.1.2/libtorrent-rasterbar.so.9)
./MotionBox: /usr/lib/libssl.so.1.0.0: no version information available (required by /home/mio/Downloads/MotionBox-1.1.2/libtorrent-rasterbar.so.9)
	linux-vdso.so.1 (0x00007fff8b1fd000)
	libSkCore.so => /home/mio/Downloads/MotionBox-1.1.2/libSkCore.so (0x00007f3b7071b000)
	libSkGui.so => /home/mio/Downloads/MotionBox-1.1.2/libSkGui.so (0x00007f3b7034e000)
	libSkMedia.so => /home/mio/Downloads/MotionBox-1.1.2/libSkMedia.so (0x00007f3b7012d000)
	libSkWeb.so => /home/mio/Downloads/MotionBox-1.1.2/libSkWeb.so (0x00007f3b6ff26000)
	libSkTorrent.so => /home/mio/Downloads/MotionBox-1.1.2/libSkTorrent.so (0x00007f3b6fd13000)
	libSkBackend.so => /home/mio/Downloads/MotionBox-1.1.2/libSkBackend.so (0x00007f3b6fae0000)
	libQtDeclarative.so.4 => /home/mio/Downloads/MotionBox-1.1.2/libQtDeclarative.so.4 (0x00007f3b6f51e000)
	libQtGui.so.4 => /home/mio/Downloads/MotionBox-1.1.2/libQtGui.so.4 (0x00007f3b6e829000)
	libQtNetwork.so.4 => /home/mio/Downloads/MotionBox-1.1.2/libQtNetwork.so.4 (0x00007f3b6e4d4000)
	libQtCore.so.4 => /home/mio/Downloads/MotionBox-1.1.2/libQtCore.so.4 (0x00007f3b6dfe2000)
	libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f3b6dc5a000)
	libgcc_s.so.1 => /usr/lib/libgcc_s.so.1 (0x00007f3b6da43000)
	libc.so.6 => /usr/lib/libc.so.6 (0x00007f3b6d6a5000)
	libQtScript.so.4 => /home/mio/Downloads/MotionBox-1.1.2/libQtScript.so.4 (0x00007f3b6d1e2000)
	libQtXmlPatterns.so.4 => /home/mio/Downloads/MotionBox-1.1.2/libQtXmlPatterns.so.4 (0x00007f3b6cb5c000)
	libQtXml.so.4 => /home/mio/Downloads/MotionBox-1.1.2/libQtXml.so.4 (0x00007f3b6c916000)
	libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007f3b6c6f9000)
	libQtSvg.so.4 => /home/mio/Downloads/MotionBox-1.1.2/libQtSvg.so.4 (0x00007f3b6c4a0000)
	libQtOpenGL.so.4 => /home/mio/Downloads/MotionBox-1.1.2/libQtOpenGL.so.4 (0x00007f3b6c19e000)
	libvlc.so.5 => /usr/lib/libvlc.so.5 (0x00007f3b6bf7d000)
	libGL.so.1 => /usr/lib/libGL.so.1 (0x00007f3b6bd0b000)
	libQtWebKit.so.4 => /home/mio/Downloads/MotionBox-1.1.2/libQtWebKit.so.4 (0x00007f3b6981d000)
	libtorrent-rasterbar.so.9 => /home/mio/Downloads/MotionBox-1.1.2/libtorrent-rasterbar.so.9 (0x00007f3b69241000)
	libboost_system.so.1.61.0 => /home/mio/Downloads/MotionBox-1.1.2/libboost_system.so.1.61.0 (0x00007f3b6903d000)
	libQtSql.so.4 => /home/mio/Downloads/MotionBox-1.1.2/libQtSql.so.4 (0x00007f3b68dfc000)
	libm.so.6 => /usr/lib/libm.so.6 (0x00007f3b68af8000)
	libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x00007f3b688b4000)
	libaudio.so.2 => /usr/lib/libaudio.so.2 (0x00007f3b6869b000)
	libglib-2.0.so.0 => /usr/lib/libglib-2.0.so.0 (0x00007f3b68388000)
	libpng16.so.16 => /home/mio/Downloads/MotionBox-1.1.2/libpng16.so.16 (0x00007f3b68156000)
	libz.so.1 => /usr/lib/libz.so.1 (0x00007f3b67f40000)
	libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x00007f3b67c83000)
	libgobject-2.0.so.0 => /usr/lib/libgobject-2.0.so.0 (0x00007f3b67a31000)
	libSM.so.6 => /usr/lib/libSM.so.6 (0x00007f3b67829000)
	libICE.so.6 => /usr/lib/libICE.so.6 (0x00007f3b6760c000)
	libXi.so.6 => /usr/lib/libXi.so.6 (0x00007f3b673fb000)
	libXrender.so.1 => /usr/lib/libXrender.so.1 (0x00007f3b671f0000)
	libXext.so.6 => /usr/lib/libXext.so.6 (0x00007f3b66fde000)
	libX11.so.6 => /usr/lib/libX11.so.6 (0x00007f3b66c9f000)
	libdl.so.2 => /usr/lib/libdl.so.2 (0x00007f3b66a9b000)
	librt.so.1 => /usr/lib/librt.so.1 (0x00007f3b66893000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f3b709bb000)
	libvlccore.so.8 => /usr/lib/libvlccore.so.8 (0x00007f3b6658f000)
	libexpat.so.1 => /usr/lib/libexpat.so.1 (0x00007f3b66365000)
	libxcb-dri3.so.0 => /usr/lib/libxcb-dri3.so.0 (0x00007f3b66162000)
	libxcb-present.so.0 => /usr/lib/libxcb-present.so.0 (0x00007f3b65f5f000)
	libxcb-sync.so.1 => /usr/lib/libxcb-sync.so.1 (0x00007f3b65d58000)
	libxshmfence.so.1 => /usr/lib/libxshmfence.so.1 (0x00007f3b65b55000)
	libglapi.so.0 => /usr/lib/libglapi.so.0 (0x00007f3b65926000)
	libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00007f3b65723000)
	libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x00007f3b6551d000)
	libX11-xcb.so.1 => /usr/lib/libX11-xcb.so.1 (0x00007f3b6531b000)
	libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007f3b650f2000)
	libxcb-glx.so.0 => /usr/lib/libxcb-glx.so.0 (0x00007f3b64ed6000)
	libxcb-dri2.so.0 => /usr/lib/libxcb-dri2.so.0 (0x00007f3b64cd1000)
	libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00007f3b64acb000)
	libdrm.so.2 => /usr/lib/libdrm.so.2 (0x00007f3b648bb000)
	libjpeg.so.8 => /usr/lib/libjpeg.so.8 (0x00007f3b64651000)
	libxslt.so.1 => /usr/lib/libxslt.so.1 (0x00007f3b64410000)
	libxml2.so.2 => /usr/lib/libxml2.so.2 (0x00007f3b640a8000)
	libgstapp-1.0.so.0 => /usr/lib/libgstapp-1.0.so.0 (0x00007f3b63e9a000)
	libgstpbutils-1.0.so.0 => /usr/lib/libgstpbutils-1.0.so.0 (0x00007f3b63c65000)
	libgstvideo-1.0.so.0 => /usr/lib/libgstvideo-1.0.so.0 (0x00007f3b639da000)
	libgstaudio-1.0.so.0 => /usr/lib/libgstaudio-1.0.so.0 (0x00007f3b6376f000)
	libgstbase-1.0.so.0 => /usr/lib/libgstbase-1.0.so.0 (0x00007f3b6350b000)
	libgstreamer-1.0.so.0 => /usr/lib/libgstreamer-1.0.so.0 (0x00007f3b631d9000)
	libsqlite3.so.0 => /usr/lib/libsqlite3.so.0 (0x00007f3b62ec7000)
	libssl.so.1.0.0 => /usr/lib/libssl.so.1.0.0 (0x00007f3b62c56000)
	libcrypto.so.1.0.0 => /usr/lib/libcrypto.so.1.0.0 (0x00007f3b627de000)
	libboost_random.so.1.61.0 => /home/mio/Downloads/MotionBox-1.1.2/libboost_random.so.1.61.0 (0x00007f3b625d8000)
	libXt.so.6 => /usr/lib/libXt.so.6 (0x00007f3b6236f000)
	libXau.so.6 => /usr/lib/libXau.so.6 (0x00007f3b6216b000)
	libpcre.so.1 => /usr/lib/libpcre.so.1 (0x00007f3b61ef8000)
	libbz2.so.1.0 => /usr/lib/libbz2.so.1.0 (0x00007f3b61ce8000)
	libharfbuzz.so.0 => /usr/lib/libharfbuzz.so.0 (0x00007f3b61a87000)
	libffi.so.6 => /usr/lib/libffi.so.6 (0x00007f3b6187e000)
	libuuid.so.1 => /usr/lib/libuuid.so.1 (0x00007f3b61679000)
	libidn.so.11 => /usr/lib/libidn.so.11 (0x00007f3b61445000)
	libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0x00007f3b611f5000)
	libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007f3b60fef000)
	liblzma.so.5 => /usr/lib/liblzma.so.5 (0x00007f3b60dc9000)
	libgsttag-1.0.so.0 => /usr/lib/libgsttag-1.0.so.0 (0x00007f3b60b8f000)
	liborc-0.4.so.0 => /usr/lib/liborc-0.4.so.0 (0x00007f3b60911000)
	libgmodule-2.0.so.0 => /usr/lib/libgmodule-2.0.so.0 (0x00007f3b6070d000)
	libgraphite2.so.3 => /usr/lib/libgraphite2.so.3 (0x00007f3b604e1000)
	libsystemd.so.0 => /usr/lib/libsystemd.so.0 (0x00007f3b70b06000)
	libresolv.so.2 => /usr/lib/libresolv.so.2 (0x00007f3b602ca000)
	libcap.so.2 => /usr/lib/libcap.so.2 (0x00007f3b600c6000)
	liblz4.so.1 => /usr/lib/liblz4.so.1 (0x00007f3b5feb4000)
	libgcrypt.so.20 => /usr/lib/libgcrypt.so.20 (0x00007f3b5fba5000)
	libgpg-error.so.0 => /usr/lib/libgpg-error.so.0 (0x00007f3b5f991000)


Usually on Arch Linux there are two variants of packages provided on the AUR:
One builds from the latest source (HEAD of master branch)
and the other checks out the latest stable release and builds from that

If source isn't available, packages pull in the binary files from an official source and install it appropriately on the system.
For example, this is what is done with dwarffortress, as it is not open-source.

If packages are popular enough, they get promoted to the official repositories and maintained by a trusted user.
The official repos provide binary packages, but these are built by the trusted user just like AUR packages.

Ideally, I want to provide motionbox-git and motionbox packages on the AUR.
I currently would only be able to provide a motionbox-git package, because the latest tagged release (1.1.2) is prior to the Linux support. A new release would need to be tagged for me to provide a motionbox package on the AUR.

Alternatively, I could provide a single motionbox package that downloads MotionBox-1.1.2-linux64.tar.gz for x86_64 and installs that in /opt/.

HEAD of master for Sky builds fine. HEAD of master for MotionBox does not compile without editing MotionBox.pro to link with: "-lvlc -lboost_system -ltorrent-rasterbar"
With that change it builds, but if I cd to the bin directory and run ./MotionBox, it segfaults on start-up.

1
2
3
4
5
WPixmapCache readPixmap: Failed to open file file:///home/mio/Programming/MotionBox/Sky/src/SkyComponents/pictures/shadow.png.
WPixmapCachePrivate::readData: Failed to read file file:///home/mio/Programming/MotionBox/Sky/src/SkyComponents/pictures/shadow.png.
vlc: unknown option or missing mandatory argument `--dummy-quiet'
Try `vlc --help' for more information.
zsh: segmentation fault (core dumped)  ./MotionBox


I can get you a backtrace if you need it. Odd that it segfaults, as the binary release you've provided runs great, I'm using it as my primary method of watching videos now :)

Also I'm not sure how to build a version of MotionBox that is release-ready. It seems that just doing qmake-qt4 -r and make produces a binary that looks for the Sky libraries in the development folder, and seems to be referencing external png files from Sky. I assume you have a different procedure to build a release version, because the binary package you provided has the libraries in the same directory as MotionBox and presumably has those PNG files baked in - they aren't in the MotionBox-1.1.2 folder
miotatsu

Here is the full output of ldd for you, it ran fine for me after installing the nas package that provided libaudio.so.2:

Thank you for that. I've added libssl, libcrypto and libaudio to the deploy.sh script.

miotatsu

A new release would need to be tagged for me to provide a motionbox package on the AUR.

That would be 1.1.3 which is coming in just a few weeks.

miotatsu

HEAD of master for MotionBox does not compile without editing MotionBox.pro to link with: "-lvlc -lboost_system -ltorrent-rasterbar"

That's weird, I don't have any linking issue with ubuntu 16.10.

miotatsu

if I cd to the bin directory and run ./MotionBox, it segfaults on start-up.

Hmm, that log looks suspicious. Are you sure you are linking against the latest Sky kit ?

1
vlc: unknown option or missing mandatory argument `--dummy-quiet'

That message happens when VLC does not find its "plugins" folder.

On the latest version you should also hit the following:
1
qFatal("WVlcEngine::event: Cannot create VLC instance. Is VLC installed ?");

Check the code and maybe try to add a qDebug somewhere... Also, QPixmapCache paths should be fixed !

miotatsu

I assume you have a different procedure to build a release version

Yes I do and I just updated the MotionBox readme to reflect on this. Simply take a look at the Deploy section.

Edited by Benjamin Arnaud on
bunjee

On the latest version you should also hit the following:
1
qFatal("WVlcEngine::event: Cannot create VLC instance. Is VLC installed ?");

Check the code and maybe try to add a qDebug somewhere... Also, QPixmapCache paths should be fixed !

miotatsu

I assume you have a different procedure to build a release version

Yes I do and I just updated the MotionBox readme to reflect on this. Simply take a look at the Deploy section.


I looked into building the latest Motionbox in more detail today on my stream:


Current issues:
  • Does not appear to play videos
  • Process does not exit after closing window

I'd also like information about how to change the place Motionbox looks for the shared libraries when deploying it.
Currently when Motionbox is deployed it copies all the .so files into the deploy directory and Motionbox seems to be configured to look for the shared libraries in whatever folder the Motionbox binary is in. I want Motionbox to link with the shared libraries installed in /usr/lib and the qsvg and qjpeg ones in /usr/lib/qt/plugins/imageformats.

Any information that would help point me in the right direction to achieve that would be great :)
miotatsu
I looked into building the latest Motionbox in more detail today on my stream:

Looking good, thank you for that !

miotatsu
Current issues:
  • Does not appear to play videos
  • Process does not exit after closing window

Ok, I had the same problem when I was using the wrong VLC or an older one. Can you check that your current VLC version is 2.2.4 ?

miotatsu
Currently when Motionbox is deployed it copies all the .so files into the deploy directory and Motionbox seems to be configured to look for the shared libraries in whatever folder the Motionbox binary is in.

Yes that's the deploy.sh behavior. That being said if the library are not present in the folder it should go look in your "usr/lib" directory. That should also be the case for Qt imageformats. Make sure you remove all the Qt libraries in the "deploy" folder and run it again.

If that's not the case you could try commenting the following in MotionBox.pro:
1
unix:QMAKE_LFLAGS += "-Wl,-rpath,\'\$$ORIGIN\'"


Voilà, take care !

Edited by Benjamin Arnaud on
Awesome, I'll give this another try sometime after handmade con :)
bunjee

Ok, I had the same problem when I was using the wrong VLC or an older one. Can you check that your current VLC version is 2.2.4 ?

That being said if the library are not present in the folder it should go look in your "usr/lib" directory. That should also be the case for Qt imageformats. Make sure you remove all the Qt libraries in the "deploy" folder and run it again.


I am on VLC 2.2.4 but still have that problem of it not playing video/not exiting on window close when building from source.

I tried removing the Qt dependencies (including imageformats) from the deploy folder and you are correct that it picks up the system ones! :)

So I think the only mystery left is to figure out why it doesn't like my system VLC...
miotatsu
So I think the only mystery left is to figure out why it doesn't like my system VLC...


Yeah this is weird, didn't the archive I provided you worked earlier ?

I'm currently testing on ubuntu 32 / 64 bit and it seems to work. Let me know if I can help.

Edited by Benjamin Arnaud on
bunjee
Yeah this is weird, didn't the archive I provided you worked earlier ?


Yeah, and I use it to watch videos nearly every day on my laptop!
I'll try downloading it onto the machine I stream from. I'm curious if I copy the dependencies from the archive into the deploy folder and build the project if it will work with them. I should have time to test this over the weekend.
The mystery deepens - I just tried the archive that you provided on my work machine (the one I stream from), and I have the same exact problem as when I build it myself from source on that machine. The archive works on my laptop fine, so I'm guessing compiling from source will work on it as well (haven't tried yet), but this leaves me wondering what the problem is on my work machine...
Greetings miotatsu,

Thank you for investigating ! Are you running on the same Arch with the same CPU architecture and VLC version ?

Building Sky / MotionBox on your laptop could be interesting indeed.

I would like to pack VLC with the MotionBox Linux archive but currently found no way to do so.
bunjee
Greetings miotatsu,

Thank you for investigating ! Are you running on the same Arch with the same CPU architecture and VLC version ?

Building Sky / MotionBox on your laptop could be interesting indeed.

I would like to pack VLC with the MotionBox Linux archive but currently found no way to do so.


same VLC version, both are x86_64 machines (laptop has an i7 and desktop a phenom ii).

I just tried building the latest Sky on my laptop but there seems to be a missing header:

1
2
3
src/graphicsview/WResizer.cpp:34:30: fatal error: private/qt_x11_p.h: No such file or directory
 #include <private/qt_x11_p.h>
                              ^
Private Qt headers are not available from system packages. They are present only when Qt is build from source (and you point compiler/build-system to source location of Qt).

You'll probably need to remove this include statement and change code so it works without. Currently it looks relatively simple change - just get display/screen handle of X11 yourself.
mmozeiko
Private Qt headers are not available from system packages. They are present only when Qt is build from source (and you point compiler/build-system to source location of Qt).

You'll probably need to remove this include statement and change code so it works without. Currently it looks relatively simple change - just get display/screen handle of X11 yourself.


Ah so this is one of those private Qt headers. I have qt source in a 3rdparty folder for Motionbox and Sky, I think I just need to re-run a script or update one to pull that header into wherever it is that it is looking for it
miotatsu
I think I just need to re-run a script or update one to pull that header into wherever it is that it is looking for it

Yeah, running configure.sh should do the trick.