Compilation fails at gobjectnamespace.cpp

Bug #919786 reported by Florian Boucault
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I am using Ubuntu Precise and the latest version of lp:smoke-gobject. cmake succeeds.

kaleo@tequila:~/dev/smoke-gobject$ make
[ 2%] Building CXX object src/CMakeFiles/gsmoke.dir/gobjectnamespace.cpp.o
/home/kaleo/dev/smoke-gobject/src/gobjectnamespace.cpp: In constructor ‘Smoke::GObjectNamespace::GObjectNamespace(const QByteArray&, Smoke::NamespaceInitializer)’:
/home/kaleo/dev/smoke-gobject/src/gobjectnamespace.cpp:145:134: error: invalid conversion from ‘Smoke::StaticMetacallHandler {aka int (*)(QMetaObject::Call, int, void**)}’ to ‘QMetaObjectExtraData::StaticMetacallFunction {aka void (*)(QObject*, QMetaObject::Call, int, void**)}’ [-fpermissive]
/usr/include/qt4/QtCore/qobject.h: In member function ‘int (* Smoke::GObjectNamespace::createStaticMetacall(int))(QMetaObject::Call, int, void**)’:
/usr/include/qt4/QtCore/qobject.h:113:933: error: ‘static void QObject::qt_static_metacall(QObject*, QMetaObject::Call, int, void**)’ is private
/home/kaleo/dev/smoke-gobject/src/gobjectnamespace.cpp:399:45: error: within this context
/home/kaleo/dev/smoke-gobject/src/gobjectnamespace.cpp:399:74: error: invalid conversion from ‘void (*)(QObject*, QMetaObject::Call, int, void**)’ to ‘void (*)(ffi_cif*, void*, void**, void*)’ [-fpermissive]
/usr/include/x86_64-linux-gnu/ffi.h:303:1: error: initializing argument 3 of ‘ffi_status ffi_prep_closure(ffi_closure*, ffi_cif*, void (*)(ffi_cif*, void*, void**, void*), void*)’ [-fpermissive]
make[2]: *** [src/CMakeFiles/gsmoke.dir/gobjectnamespace.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/gsmoke.dir/all] Error 2
make: *** [all] Error 2

description: updated
Revision history for this message
Jon Nordby (jonnor) wrote :

Reproduced on Arch Linux current. It seems to stem from a change in private/undocumented parts of Qt with version 4.8

Changed in smoke-gobject:
status: New → Confirmed
importance: Undecided → High
Revision history for this message
Richard Dale (rdale) wrote :

I should have fixed this in the trunk. This is the comment I added to the ChangeLog:

* The type signature of the qt_static_metacall function changed in
Qt 4.8.

In Qt 4.7 it looked like this:
  int qt_static_metacall(QMetaObject::Call, int, void **_a)

And in Qt 4.8 it looks like this:
void qt_static_metacall(QObject *, QMetaObject::Call, int, void **_a)

So build QMetaObjects with the appropriate version of the function on
Qt 4.7 and Qt 4.8 onwards

I haven't tested the fix yet, and I'll try and do that tomorrow

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.