Bug 240469 - Fails to build with glib >= 2.25
Summary: Fails to build with glib >= 2.25
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Compilation (show other bugs)
Version: 1.2.0
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-02 15:33 UTC by Felix Geyer
Modified: 2017-08-19 21:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 1.4.0


Attachments
Workaround: #undef signals (471 bytes, patch)
2010-06-02 15:33 UTC, Felix Geyer
Details
Set QT_NO_KEYWORDS for the ipodexport plugin (1.68 KB, patch)
2010-06-16 23:19 UTC, Felix Geyer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Felix Geyer 2010-06-02 15:33:47 UTC
Created attachment 47609 [details]
Workaround: #undef signals

Version:           1.2.0 (using KDE 4.4.3) 
OS:                Linux

Build log:

[ 13%] Building CXX object ipodexport/CMakeFiles/kipiplugin_ipodexport.dir/IpodExportDialog.o
In file included from /usr/include/glib-2.0/gio/gdbusproxy.h:28,
                 from /usr/include/glib-2.0/gio/gio.h:109,
                 from /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf-core.h:36,
                 from /usr/include/gtk-2.0/gdk-pixbuf/gdk-pixbuf.h:36,
                 from /tmp/buildd/kipi-plugins-1.2.0/ipodexport/IpodExportDialog.cpp:69:
/usr/include/glib-2.0/gio/gdbusintrospection.h:147: error: expected unqualified-id before 'protected'
/usr/include/glib-2.0/gio/gdbusintrospection.h:147: error: expected ';' before 'protected'
make[3]: *** [ipodexport/CMakeFiles/kipiplugin_ipodexport.dir/IpodExportDialog.o] Error 1

gdbusintrospection.h contains a variable called "signals".
This conflicts with Qt that #defines "signals" to "protected".


Reproducible: Always
Comment 1 caulier.gilles 2010-06-03 00:40:48 UTC
SVN commit 1133945 by cgilles:

try to fix compilation with conflictual declaratin of "signals" in Qt4 and Gtk
CCBUGS: 240469


 M  +8 -8      IpodExportDialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1133945
Comment 2 Felix Geyer 2010-06-07 10:43:20 UTC
The fix doesn't work as IpodExportDialog.moc includes Qt headers and thus signals is already defined to "protected".
Comment 3 caulier.gilles 2010-06-07 14:17:49 UTC
Felix,

The workaround given in point #3 from this page :

http://www.boost.org/doc/libs/1_43_0/doc/html/signals/s04.html

... fix the problem for you ?

Gilles Caulier
Comment 4 Felix Geyer 2010-06-07 21:17:54 UTC
Defining QT_NO_KEYWORDS would fix the bug, but "foreach" and "emit" would have to be replaced by Q_FOREACH and Q_EMIT in the ipodexport plugin.
Comment 5 caulier.gilles 2010-06-07 21:27:56 UTC
I don't have last glib there. Can you make a patch against svn trunk ?

Read this page for details :

#svn diff > diff.patch

Gilles Caulier
Comment 6 Felix Geyer 2010-06-16 23:19:26 UTC
Created attachment 48063 [details]
Set QT_NO_KEYWORDS for the ipodexport plugin
Comment 7 caulier.gilles 2010-06-16 23:56:34 UTC
SVN commit 1138838 by cgilles:

apply patch #48063
BUGS: 240469


 M  +1 -0      CMakeLists.txt  
 M  +2 -2      ImageList.cpp  
 U             ImageList.h  
 M  +3 -6      ImageListItem.h  
 M  +5 -3      IpodExportDialog.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1138838