Compilation error help...?

[details=Summary]This text will be hidden[/details]I’m trying to compile a new release of Qmplay2, and i get the following error:

In file included from /boot/system/develop/headers/QtGui/qvalidator.h:41:0,
from /boot/system/develop/headers/QtWidgets/qabstractspinbox.h:38, from /boot/system/develop/headers/QtWidgets/qspinbox.h:37,
from /boot/system/develop/headers/QtWidgets/QDoubleSpinBox:1,
from /sources/qmplay2-17.04.21/src/modules/MediaKit/MediaKit.cpp:36:
/boot/system/develop/headers/QtCore/qregularexpression.h:49:1: error: expected constructor, destructor, or type conversion before 'class'
class QRegularExpressionMatch;
     ^

Now looking at the header file it’s a Qt .h file so i doubt that the problem is in that file, so what can trigger such an error? it seems a fairly common error i found alots of them on the net but none of the solutions adresses my prolem .

If building with Qt 5.7 or newer, be sure to build with -std=c++11 at least.

Yeah, i just realised that the authors recommend at least Qt-5.6, and i’m trying to build it with the old Qt-5.5.1 on a pure x86 build,that’s the only version available for this arch , and i don’t a powerfull machine to build a newer version locally.
But the weird thing is that i get a very similair error when building with Qt4 just a different header file name in this case.

In file included from /boot/system/develop/headers/QtCore/qalgorithms.h:45:0,
                 from /boot/system/develop/headers/QtCore/qstringlist.h:45,
                 from /boot/system/develop/headers/QtCore/QStringList:1,
                 from /sources/qmplay2-17.04.21/src/modules/MediaKit/../../qmplay2/headers/Module.hpp:21,
                 from /sources/qmplay2-17.04.21/src/modules/MediaKit/MediaKit.hpp:1,
                 from /sources/qmplay2-17.04.21/src/modules/MediaKit/MediaKit.cpp:1:
/boot/system/develop/headers/QtCore/qlocale.h:53:1: error: expected constructor, destructor, or type conversion before 'typedef'
 QT_MODULE(Core)
 ^

So i’m gonna submit the patch & recipe here in this forum for others to test and see whether it can build on other machines.

Here is the recipe

And here is the patch

Open the links in different tabs click on download buuton and then just rename the files

from qmplay2-17.04.21.recipe.sh
 to qmplay2-17.04.21.recipe
And from q9gF35sT.txt 
To qmplay2_x86-17.04.21.patchset
1 Like

Well, there is already for recipe for a bit dated version of qmplay2:

https://github.com/haikuports/haikuports/blob/master/media-video/qmplay2/qmplay2-15.10.03.recipe
https://github.com/haikuports/haikuports/blob/master/media-video/qmplay2/patches/qmplay2_x86-15.10.03.patchset

I tried and it doesn’t apply cleanly on the version 17.04.21.

I tried and it doesn’t apply cleanly on the version 17.04.21.

Yes, alot of things have changed since that release, i wanted to update the package and submit it as a pull request to haikuports.
Did you try to build it with the recipe+patchset i provided links for in my previous comment?

No, I tried some weeks ago.

I added an updated recipe at Haikuports. Works a bit, crashes​, and only got audio played.

Unfortunately it doesn’t build, i get the following:

Project ERROR: libass development package not found

And I have such error:
– Package ‘glib-2.0’, required by ‘harfbuzz’, not found
http://sprunge.us/MBLW

I finaly got it to compile after i repatched the src with Pe, i think (and this is just a guess) that the editor i used “KODER” was adding invivsible chars and made a mess, now i know for a fact that an editor can do that to you, because i’ve seen this once with “ECLIPS” on another platform.
But now i have a diffrent problem where i need one of the devs’s help.
I have no sound with Qmplay2 because of a missing symbol in the libmediakit.so plugin, here is the output from the terminal.

    resolve symbol "_ZN12BSoundPlayerC1EPK22media_raw_audio_formatPKcPFvPvS5_mRS1_EPFvS5_NS_25sound_player_notificationEzES5_" returned: -2147478780
    [13 juin 2017 01:10:31] 
Impossible de charger la bibliothèque /boot/system/apps/QMPlay2/modules/libMediaKit.so : (Symbol not found)

These symbols are part of the <Soundplayer.h> and also in the soundplayer.cpp file in the mediakit module.
So why is it not in the plugin binary? and how can i fix this?

Oh! before anyone says it has to be linked against libmedia, see the Cmakelists.txt file below.

https://pastebin.com/ZMvdXBPw

Clearly i’m missing someting but i can’t put my finger on it.
Below are the recipe & patch i used.

https://pastebin.com/HMttpQYw "recipe"
https://pastebin.com/9F5qVhmF “patchset”

Dear khallebal, whether you could solve a problem of the missing symbol in the libmediakit.so?