[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: Still problems with gcc 3.4 and visibility
From:       Richard =?utf-8?q?L=C3=A4rk=C3=A4ng?= <nouseforaname () home ! se>
Date:       2004-11-28 19:22:39
Message-ID: 200411282022.39829.nouseforaname () home ! se
[Download RAW message or body]

On Sunday 28 November 2004 13.04, Thiago Macieira wrote:
> Michael Pyne wrote:
> >$ nm -D ~/kde/lib/kde3/kded_kwalletd.so | grep KDEDModule
> >         U _ZN10KDEDModule11qt_propertyEiiP8QVariant
> >         U _ZN10KDEDModule16staticMetaObjectEv
> >         U _ZN10KDEDModule7qt_castEPKc
> >         U _ZN10KDEDModule7qt_emitEiP8QUObject
> >         U _ZN10KDEDModule9qt_invokeEiP8QUObject
> >         U _ZN10KDEDModuleC2ERK8QCString
> >         U _ZN10KDEDModuleD2Ev
> >         U _ZTI10KDEDModule
> >
> >The output was similar when -fvisibility=hidden was enabled, except that
> > the 'U's were all 'V' instead, indicating a weak symbol.
>
> U means undefined, V is virtual and W is weak.
>
> Since you're listing kded_walled.so, this are how they're supposed to; the
> symbols are imported. Please list libkdeinit_kded.so, which is where the
> symbol is supposed to be:
>
> $ readelf -a /usr/local/kde3/lib/libkdeinit_kded.so | grep TI10KDEDModule
> 00021b44  00021801 R_386_32          00021be0   _ZTI10KDEDModule
> 00021ba4  00021801 R_386_32          00021be0   _ZTI10KDEDModule
>    536: 00021be0    32 OBJECT  WEAK   DEFAULT   21 _ZTI10KDEDModule
>    641: 00021be0    32 OBJECT  WEAK   DEFAULT   21 _ZTI10KDEDModule
>
> The important thing isn't the object's weakness, but its visibility. In
> this case, it's exported ("default").
>
> It shouldn't be defined in kded_walletd.so.

There were some problems with things not exported in KWallet also, the 
attached patch makes KWallet work for me again, OK to commit?

Richard Lärkäng

["kwallet.patch" (text/x-diff)]

Index: kwallet/backend/kwalletbackend.h
===================================================================
RCS file: /home/kde/kdelibs/kwallet/backend/kwalletbackend.h,v
retrieving revision 1.21
diff -u -p -b -B -r1.21 kwalletbackend.h
--- kwallet/backend/kwalletbackend.h	5 Nov 2004 19:33:20 -0000	1.21
+++ kwallet/backend/kwalletbackend.h	28 Nov 2004 19:18:39 -0000
@@ -36,7 +36,7 @@ class MD5Digest;
 
 /* @internal
  */
-class Backend {
+class KDE_EXPORT Backend {
 	public:
 		Backend(const QString& name = "kdewallet", bool isPath = false);
 		~Backend();
Index: kwallet/backend/kwalletentry.h
===================================================================
RCS file: /home/kde/kdelibs/kwallet/backend/kwalletentry.h,v
retrieving revision 1.2
diff -u -p -b -B -r1.2 kwalletentry.h
--- kwallet/backend/kwalletentry.h	8 Aug 2003 07:32:21 -0000	1.2
+++ kwallet/backend/kwalletentry.h	28 Nov 2004 19:18:39 -0000
@@ -31,7 +31,7 @@ namespace KWallet {
 
 /* @internal
  */
-class Entry {
+class KDE_EXPORT Entry {
 	public:
 		Entry();
 		~Entry();
Index: kded/kdedmodule.h
===================================================================
RCS file: /home/kde/kdelibs/kded/kdedmodule.h,v
retrieving revision 1.13
diff -u -p -b -B -r1.13 kdedmodule.h
--- kded/kdedmodule.h	21 Nov 2004 22:51:57 -0000	1.13
+++ kded/kdedmodule.h	28 Nov 2004 19:18:39 -0000
@@ -52,7 +52,7 @@ class Kded;
  * @author Waldo Bastian <bastian@kde.org>
  */
 
-class KDEDModule : public QObject, public DCOPObject
+class KDE_EXPORT KDEDModule : public QObject, public DCOPObject
 {
   Q_OBJECT
 // For inclusion in KDE4 (since it's BIC) long-needed fix for allowing


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic