[GCompris-devel] Trying to build 0.50 with external qml-box2d

Holger Kaelberer hk at elberer.de
Mon Dec 28 14:47:01 UTC 2015


Hi

On 27.12.2015 16:40, Bruno Friedmann wrote:
 > Hey, I'm trying to build gcompris-qt 0.50 with the external qml-box2d
 >
 > Here the situation :
 > I have libBox2D-devel available (last 2.3.2 version)
 > which allow me to build qml-box2d
 > qml-box2d rpm contains only a .so file placed in
 > /usr/lib64/qt5/qml/Box2D.2.0/libBox2D.so

No qmldir-file?

What's the qml base-dir on your distro? I guess /usr/lib64/qml/?

Where are the qt-libs installed? /usr/lib64/?

 >
 > Now when I try to build gcompris-qt it failed with the following error
 >
 > [   51s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/gcompris-qt-0.50/build'
 > [   51s] [  7%] Built target rcc_activities
 > [   51s] make -f src/core/CMakeFiles/gcompris-qt.dir/build.make 
src/core/CMakeFiles/gcompris-qt.dir/build
 > [   51s] make -f src/activities/algebra_minus/CMakeFiles/rcc_algebra_minus.dir/build.make 
src/activities/algebra_minus/CMakeFiles/rcc_algebra_minus.dir/depend
 > [   51s] Cannot find file: /home/abuild/rpmbuild/BUILD/gcompris-qt-0.50/external/qml-box2d/box2d.pro.
 > [   51s] CMakeFiles/qml_box2d.dir/build.make:108: recipe for target 
'qml_box2d-prefix/src/qml_box2d-stamp/qml_box2d-configure' failed
 > [   51s] make[2]: *** [qml_box2d-prefix/src/qml_box2d-stamp/qml_box2d-configure] Error 2
 > [   51s] make[2]: Leaving directory '/home/abuild/rpmbuild/BUILD/gcompris-qt-0.50/build'
 > [   51s] CMakeFiles/Makefile2:235: recipe for target 'CMakeFiles/qml_box2d.dir/all' failed
 > [   51s] make[1]: *** [CMakeFiles/qml_box2d.dir/all] Error 2
 >
 > gcompris is looking for qml-box2d sources, but why ?

I guess this is due to the qt_helper cmake stuff we use. I can reproduce this behaviour with OS 
installed qt-libs on Ubuntu. The qt_helpers seem to detect the Qt5 plugin- and qml-dirs reliably 
only for directory layouts that are provided by Qt's installers (on linux), e.g.:

/mnt/ltmp/Qt5.5.1-android/5.5/gcc/lib/libQt5Qml.so.5.5.1
/mnt/ltmp/Qt5.5.1-android/5.5/gcc/plugins/
/mnt/ltmp/Qt5.5.1-android/5.5/gcc/qml/

Debian/Ubuntu uses a different layout which is not handled correctly:

/usr/lib/i386-linux-gnu/libQt5Qml.so.5.4.1
/usr/lib/i386-linux-gnu/qt5/plugins/
/usr/lib/i386-linux-gnu/qt5/qml/

This might also be the case on your distro (OpenSuse, right?) due to the lib64/ part.

The qt_helpers try to derive the qml-base dir in hackish way from the LOCATION of the qt-libs. 
That's obviously too simple for all installations. Will fix that soon ...

 > Can't it be build with just qml-box2d system wide installed .so
 >
 > Now if I analyze the call
 > qml-box2d/box2d.pro is not from qml-box2d but from libox2d-devel package.
 > Perhaps we can give to cmake an option to tell it where Box2D is ?
 > debugging lead me to the following add
 >
 > -DQML_BOX2D_LIBRARY=%{_libdir}/qt5/qml/Box2D.2.0 \

Yeah, something like that should work. For me

-DQML_BOX2D_LIBRARY=/usr/lib/i386-linux-gnu/qt5/qml/Box2D.2.0/libBox2D.so

helps

 >
 > Then the build is successful Yepea Yeah ...
 >
 > Did I do the right things ?
 > If not what has to be done ?

Go with the above workaround until we fixed the qml base-dir detection.

For OS-installed qml-box2d libs you should -DQML_BOX2D_MODULE=system (given that qml base-path 
detection works reliably), which errors out if does not find a Box2d lib provided by the distrib.

Holger


More information about the GCompris-devel mailing list