Build problems with akonadi-ports/kdepim on windows

View: New views
3 Messages — Rating Filter:   Alert me  

Build problems with akonadi-ports/kdepim on windows

by Bernhard Herzog-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

we've got problems building akonadi-ports/kdepim on windows.  AFAICT the code
in question is not quite correct on linux either, hence the cross post to
both kde-windows and kde-pim.

The immediate problem is that when building rev. 1042282 of
akonadi-ports/kdepim on windows with mingw, the build fails with

E:\e5\07\svn\branches\work\akonadi-ports\kdepim\kmail\globalsettings.cpp:28:
error: definition of static data member 'GlobalSettings::mSelf' of
dllimport'd class
In file included from E:
\e5\07\svn\branches\work\akonadi-ports\kdepim\kmail\globalsettings.cpp:62:
E:/e5/07/build/akonadi-porting-branch/kdepim-20091026/work/mingw-RelWithDebInfo-svn/kmail/globalsettings.moc:43:
error: definition of static data member 'GlobalSettings::staticMetaObject' of
dllimport'd class
E:/e5/07/build/akonadi-porting-branch/kdepim-20091026/work/mingw-RelWithDebInfo-svn/kmail/globalsettings.moc:43:
warning: 'GlobalSettings::staticMetaObject' defined locally after being
referenced with dllimport linkage
E:\e5\07\svn\branches\work\akonadi-ports\kdepim\kmail\globalsettings.cpp: In
member function `virtual int GlobalSettings::qt_metacall(QMetaObject::Call,
int, void**)':
E:\e5\07\svn\branches\work\akonadi-ports\kdepim\kmail\globalsettings.cpp:54:
warning: non-inline function 'void GlobalSettings::slotSyncNow()' is defined
after prior declaration as dllimport: attribute ignored

kmail\globalsettings.h contains this:

  #include "messageviewer_export.h"
  class QTimer;

  class MESSAGEVIEWER_EXPORT GlobalSettings : public GlobalSettingsBase

That doesn't seem right.  This globalsettings is linked to kmailprivate, not
messageviewer, so MESSAGEVIEWER_EXPORT will not have the correct value when
actually compiling a component of kmailprivate.  Changing this to
kmail_export.h and KMAIL_EXPORT or removing the *_EXPORT altogether doesn't
help because now the linker complains about duplicate symbols in
globalsettings.obj and libmessageviewer.dll.a (Symbols GlobalSettings::self()
and GlobalSettings::requestSync()).

AFAICT the reason for all of this is that r1037942 tried to revert r1031636
but did so incompletely and incorrectly.  I've removed the
MESSAGEVIEWER_EXPORT from both libmessageviewer/globalsettings.h and
kmail/globalsettings.h.  This seems to work.  At least kmail builds now.

   Bernhard


_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

signature.asc (205 bytes) Download Attachment

Re: Build problems with akonadi-ports/kdepim on windows

by Bugzilla from vkrause@kde.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 29 October 2009 20:09:19 Bernhard Herzog wrote:

> Hi,
>
> we've got problems building akonadi-ports/kdepim on windows.  AFAICT the
> code in question is not quite correct on linux either, hence the cross post
> to both kde-windows and kde-pim.
>
> The immediate problem is that when building rev. 1042282 of
> akonadi-ports/kdepim on windows with mingw, the build fails with
>
> E:\e5\07\svn\branches\work\akonadi-ports\kdepim\kmail\globalsettings.cpp:28
>: error: definition of static data member 'GlobalSettings::mSelf' of
> dllimport'd class
> In file included from E:
> \e5\07\svn\branches\work\akonadi-ports\kdepim\kmail\globalsettings.cpp:62:
> E:/e5/07/build/akonadi-porting-branch/kdepim-20091026/work/mingw-RelWithDeb
>Info-svn/kmail/globalsettings.moc:43: error: definition of static data
> member 'GlobalSettings::staticMetaObject' of dllimport'd class
> E:/e5/07/build/akonadi-porting-branch/kdepim-20091026/work/mingw-RelWithDeb
>Info-svn/kmail/globalsettings.moc:43: warning:
> 'GlobalSettings::staticMetaObject' defined locally after being referenced
> with dllimport linkage
> E:\e5\07\svn\branches\work\akonadi-ports\kdepim\kmail\globalsettings.cpp:
> In member function `virtual int
> GlobalSettings::qt_metacall(QMetaObject::Call, int, void**)':
> E:\e5\07\svn\branches\work\akonadi-ports\kdepim\kmail\globalsettings.cpp:54
>: warning: non-inline function 'void GlobalSettings::slotSyncNow()' is
> defined after prior declaration as dllimport: attribute ignored
>
> kmail\globalsettings.h contains this:
>
>   #include "messageviewer_export.h"
>   class QTimer;
>
>   class MESSAGEVIEWER_EXPORT GlobalSettings : public GlobalSettingsBase
>
> That doesn't seem right.  This globalsettings is linked to kmailprivate,
> not messageviewer, so MESSAGEVIEWER_EXPORT will not have the correct value
> when actually compiling a component of kmailprivate.  Changing this to
> kmail_export.h and KMAIL_EXPORT or removing the *_EXPORT altogether doesn't
> help because now the linker complains about duplicate symbols in
> globalsettings.obj and libmessageviewer.dll.a (Symbols
> GlobalSettings::self() and GlobalSettings::requestSync()).
>
> AFAICT the reason for all of this is that r1037942 tried to revert r1031636
> but did so incompletely and incorrectly.  I've removed the
> MESSAGEVIEWER_EXPORT from both libmessageviewer/globalsettings.h and
> kmail/globalsettings.h.  This seems to work.  At least kmail builds now.
the one in kmail is wrong for sure, can you please commit that?

regards
Volker




_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

signature.asc (196 bytes) Download Attachment

Re: Build problems with akonadi-ports/kdepim on windows

by Bernhard Herzog-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 30.10.2009, Volker Krause wrote:
> On Thursday 29 October 2009 20:09:19 Bernhard Herzog wrote:
> > AFAICT the reason for all of this is that r1037942 tried to revert
> > r1031636 but did so incompletely and incorrectly.  I've removed the
> > MESSAGEVIEWER_EXPORT from both libmessageviewer/globalsettings.h and
> > kmail/globalsettings.h.  This seems to work.  At least kmail builds now.
>
> the one in kmail is wrong for sure, can you please commit that?

Committed in r1042641.

Regards

  Bernhard


--
Bernhard Herzog  |  ++49-541-335 08 30  |  http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner


_______________________________________________
KDE PIM mailing list kde-pim@...
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/

signature.asc (205 bytes) Download Attachment