Compilation issue on Mageia Cauldron with gcc 7.3.0

Bug #1745854 reported by Stig-Ørjan Smelror
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Yarock
Fix Released
Undecided
SebastienAmar

Bug Description

Hi.

I am trying to make a new package for Mageia Cauldron, but am unable to compile YaRock.

Here is the relevant error:
yarock/BUILD/Yarock_1.3.0_Sources/src/debug.cpp: In function ‘QDebug Debug::debugStream(Debug::DebugLevel)’:
yarock/BUILD/Yarock_1.3.0_Sources/src/debug.cpp:73:20: error: ‘QtInfoMsg’ was not declared in this scope
     return QDebug( QtInfoMsg ) << qPrintable( text );
                    ^~~~~~~~~
yarock/BUILD/Yarock_1.3.0_Sources/src/debug.cpp:73:20: note: suggested alternative: ‘QtFatalMsg’
     return QDebug( QtInfoMsg ) << qPrintable( text );
                    ^~~~~~~~~
                    QtFatalMsg
make[2]: *** [CMakeFiles/yarock.dir/build.make:279: CMakeFiles/yarock.dir/src/debug.cpp.o] Error 1

Thanks for your time.

Cheers,
kekePower

Related branches

Revision history for this message
SebastienAmar (sebastien-amardeilh) wrote :

Hi,

Yes this part of code (QtInfoMsg) need at least QT 5.5. Which version of Qt do you use ? I will add a condition to build with other QT5 versions.

However you can still build with Qt4 if needed using -DENABLE_QT5=OFF in cmake command line.

Changed in yarock:
assignee: nobody → SebastienAmar (sebastien-amardeilh)
Revision history for this message
Stig-Ørjan Smelror (kekepower) wrote :

Hi.

I'm attaching the spec file I'm using for this try. Am using QT4, since our QT5 stack isn't complete as far as I can see.

Cheers,
kekePower

Revision history for this message
Stig-Ørjan Smelror (kekepower) wrote :

Hi.

I have figured out the Qt5 stack and have been able to build Yarock outside of rpm with all the audio back-ends.

However, this means that there is a bug somewhere that tries to set and use Qt5 options when it has been disabled with the cmake option you provided in comment #1.

I think the bug is in CMakeLists.txt on line 76:
else (ENABLE_QT5)

Without being an expert, I'd expect this to say
else (ENABLE_QT4)

Cheers,
kekePower

Revision history for this message
Stig-Ørjan Smelror (kekepower) wrote :

Hi.

This tar file contains my patches that enabled me to compile Yarock on Mageia.

As you can see, there are a few QT4 fixes and I don't know if there are others lying around.

I also guess the FALLTHRU patches can be done in a better way :-)

Cheers,
kekePower

Revision history for this message
SebastienAmar (sebastien-amardeilh) wrote :

Hi,

Yes you're right the Qt4 build was broken....my bad. I will try to clean and fix it as soon as I can.

For the cmake patch, you don't need to add ENABLE_QT4 option. ENABLE_QT5=OFF do the job.

However, I have found some code issue with Qt4 building. So I have to work on it before releasing a new patch version of Yarock.

Thanks for your feedback. Regards

Revision history for this message
Stig-Ørjan Smelror (kekepower) wrote :

Thanks.

You're right. When I think about it, I was very tired when I was doing these patches.

The most important one, though, is the PHONON4QT5 include variable.

There is also an under-linking issue when I build this package as RPM and we have a dirty hack for it.

$ rpm -E %dump 2>&1 | grep _disable_ld_no_undefined
  %{?!_disable_ld_no_undefined:/usr/lib/rpm/mageia/drop-ld-no-undefined-for-shared-lib-modules-in-libtool ;}
-13: ldflags %{?!_disable_ld_as_needed: -Wl,--as-needed}%{?!_disable_ld_no_undefined: -Wl,--no-undefined}%{?!_disable_ld_relro: -Wl,-z,relro}%{?!_disable_ld_O1: -Wl,-O1}%{?!_disable_ld_build_id: -Wl,--build-id}%{?!_disable_ld_enable_new_dtags: -Wl,--enable-new-dtags}
http://gitweb.mageia.org/software/rpm/rpm-setup/tree/drop-ld-no-undefined-for-shared-lib-modules-in-libtool

With this variable defined, Yarock builds fine. When disabled, there are errors like these:

CMakeFiles/yarock.dir/yarock_autogen/mocs_compilation.cpp.o: In function `Mpris2Player::metaObject() const':
mocs_compilation.cpp:(.text+0x10): multiple definition of `Mpris2Player::metaObject() const'
CMakeFiles/yarock.dir/mpris2Player.cpp.o:mpris2Player.cpp:(.text+0x40): first defined here
CMakeFiles/yarock.dir/yarock_autogen/mocs_compilation.cpp.o:(.data.rel.ro+0x1f00): multiple definition of `Mpris2Player::staticMetaObject'
CMakeFiles/yarock.dir/mpris2Player.cpp.o:(.data.rel.ro+0x0): first defined here
CMakeFiles/yarock.dir/yarock_autogen/mocs_compilation.cpp.o: In function `Mpris2Root::metaObject() const':
mocs_compilation.cpp:(.text+0x30): multiple definition of `Mpris2Root::metaObject() const'
CMakeFiles/yarock.dir/mpris2Root.cpp.o:mpris2Root.cpp:(.text+0x40): first defined here
CMakeFiles/yarock.dir/yarock_autogen/mocs_compilation.cpp.o:(.data.rel.ro+0x1ec0): multiple definition of `Mpris2Root::staticMetaObject'
CMakeFiles/yarock.dir/mpris2Root.cpp.o:(.data.rel.ro+0x0): first defined here
CMakeFiles/yarock.dir/yarock_autogen/mocs_compilation.cpp.o: In function `Mpris2Player::Seeked(long long)':
mocs_compilation.cpp:(.text+0xfb0): multiple definition of `Mpris2Player::Seeked(long long)'

Revision history for this message
Stig-Ørjan Smelror (kekepower) wrote :

Dear Sebastien.

You forgot the PHONON4QT5 patch with this release.
I had to create a patch to get it to compile on Mageia.

src/core/player/phonon/CMakeLists.txt

INCLUDE_DIRECTORIES( ${PHONON4QT5_INCLUDE_DIR}/phonon4qt5 )

Revision history for this message
SebastienAmar (sebastien-amardeilh) wrote :

Hi,

yes you're right it will be done for the next release. Thanks for the feedback.

Regards,
Sebastien

Changed in yarock:
milestone: none → 1.4.0
Changed in yarock:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.