Still problems with gcc 3.4 and visibility

Michael Pyne pynm0001 at comcast.net
Sun Nov 28 07:42:14 GMT 2004


On Saturday 27 November 2004 08:23 pm, Thiago Macieira wrote:
> Michael Pyne wrote:
> >I have it working now that I've removed -fvisibility=hidden from my
> > kdelibs Makefile (shouldn't that be a configure option?), but even
> > adding the KDE_EXPORT macros to the KDEDModule class definition didn't
> > help, so now I'm stumped as to how to fix it when -fvisibility=hidden
> > is enabled.
>
> That is odd. Are you sure the object was rebuilt? And the library
> relinked?
>
> Can you see the symbol in the object, with readelf?

Well, I don't have the old .so anymore, but I am positive it was rebuilt.  I 
even had gone so far as to do:

rm -rf ~/kdecvs/build
rm -rf ~/kde
kdecvs-build kdelibs

to make sure everything was rebuilt.  On second thought, I didn't disable 
ccache, but AFAIK it rebuilds if the command line was different (which it 
was, with the different CXXFLAGS I used).

Later I'll try building kdelibs in a spare build directory with 
-fvisibility=hidden and the export declaration in KDEModule and see what 
happens with kded_kwallet.so.

Right now, running nm -D on kded_kwallet.so reveals that the symbol is 
defined:

$ 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.

I'll report back when kdelibs is done building.

Regards,
 - Michael Pyne




More information about the kde-core-devel mailing list