[Kde-bindings] smoke and gcc 4.9

Richard Dale richard.dale at telefonica.net
Thu Oct 9 21:00:13 UTC 2014


On 10/09/2014 06:05 PM, Chris Burel wrote:
>
> 2014-10-06 23:06 GMT-07:00 Richard Dale <richard.j.dale at telefonica.net
> <mailto:richard.j.dale at telefonica.net>>:
>
>     At the Akademy in Brno I managed to get it to generate smoke
>     libraries for all the Qt5 modules (in the smokeqt 'Qt5' branch).
>
>
>
> This is great news!  However, do you have build instructions?  I just
> tried checking out the Qt5 branch of smokegen and smokeqt, and while
> smokegen builds fine, smokeqt has errors while building smokeqtcore.  I get:
>
> cd /home/me/src/smokeqt/build/qtcore && /home/me/apps/smoke/bin/smokegen
> -config /home/me/src/smokeqt/build/qtcore/config.xml -smokeconfig
> /home/me/src/smokeqt/qtcore/smokeconfig.xml -dm Q_STATIC_ASSERT --
> /home/me/src/smokeqt/qtcore/qtcore_includes.h
> using generator "/home/me/apps/smoke/bin/../lib/smokegen/generator_smoke.so"
> parsing "/home/me/src/smokeqt/qtcore/qtcore_includes.h"
> Generating SMOKE sources...
> preparing SMOKE data [qtcore]
> writing out smokedata.cpp [qtcore]
> missing type:  in method  QLatin1Char::ch(c) (while writing out methods
> table)
> /bin/sh: line 1: 30747 Aborted                 (core dumped)
> /home/me/apps/smoke/bin/smokegen -config
> /home/me/src/smokeqt/build/qtcore/config.xml -smokeconfig
> /home/me/src/smokeqt/qtcore/smokeconfig.xml -dm Q_STATIC_ASSERT --
> /home/me/src/smokeqt/qtcore/qtcore_includes.h
> make[2]: *** [qtcore/smokedata.cpp] Error 134
>

I used the master branch of smokegen - I didn't notice a Qt5 branch. The 
main problem I'm having with the Qt5 branch of smokeqt is this in the 
CMakeLists.txt at the top level:

find_package(Qt5Core)
list(GET Qt5Core_INCLUDE_DIRS 1 Qt5Core_INCLUDE_DIR)
list(GET Qt5Core_INCLUDE_DIRS 0 Qt5_INCLUDE_DIR)

I needed to set up a $Qt5Core_INCLUDE_DIR variable for the 
qtcore/QtGuess.txt file to use:

file(STRINGS "${Qt5Core_INCLUDE_DIR}/qglobal.h" qglobal_h NEWLINE_CONSUME)
file(STRINGS "${Qt5Core_INCLUDE_DIR}/qconfig.h" qconfig_h NEWLINE_CONSUME)
file(STRINGS "${Qt5Core_INCLUDE_DIR}/qfeatures.h" qfeatures_h 
NEWLINE_CONSUME)
set(qtheaders "${qglobal_h}\n${qconfig_h}\n${qfeatures}")
string(REGEX REPLACE "\n" ";" qtheaders "${qtheaders}")

However, the order of the entries in Qt5Core_INCLUDE_DIRS was different 
when I built it on an Intel laptop with Kubuntu 13.10 compared with an 
ARM laptop with Trusty Ubuntu KDE. I think the best solution is to get 
QtGuess.txt to expect a list of include files, rather than try and 
extract specific ones in the top level CMakeLists.txt.

The other difference I found was that I needed smokegen to skip 
qPopulationCount:

         <signature>.*qPopulationCount.*</signature>

I think this will need to be added to all the smokeconfig.xml files in 
each module.

I had problems with Q_STATIC_ASSERT and needed to skip that.

I'm not sure what is causing your error:

 > missing type:  in method  QLatin1Char::ch(c) (while writing out methods
 > table)

That doesn't look a very exotic function, and I'm not sure why it isn't 
building.

-- Richard



More information about the Kde-bindings mailing list