-fexceptions in kdelibs

Benjamin Reed ranger at befunk.com
Sat Nov 22 14:12:08 GMT 2003


In trying to package KDevelop, I ran into very strange linker errors 
with some of the bits that use exceptions:

---(snip!)---
ld: .libs/javasupportpart.o illegal reference for -dynamic code (section 
difference reference from section (__TEXT,__eh_frame) relocation entry 
(12) to symbol: QPtrList<KParts::Part>::deleteItem(void*) defined in 
dylib: /sw/lib/libkparts.dylib)
ld: .libs/javasupportpart.o illegal reference for -dynamic code (section 
difference reference from section (__TEXT,__eh_frame) relocation entry 
(16) to symbol: QPtrList<KParts::Part>::count() const defined in dylib: 
/sw/lib/libkparts.dylib)
ld: .libs/javasupportpart.o illegal reference for -dynamic code (section 
difference reference from section (__TEXT,__eh_frame) relocation entry 
(70) to symbol: QPtrList<KParts::Part>::~QPtrList [in-charge deleting]() 
defined in dylib: /sw/lib/libkparts.dylib)
ld: .libs/javasupportpart.o illegal reference for -dynamic code (section 
difference reference from section (__TEXT,__eh_frame) relocation entry 
(74) to symbol: QPtrList<KParts::Part>::clear() defined in dylib: 
/sw/lib/libkparts.dylib)
ld: .libs/javasupportpart.o illegal reference for -dynamic code (section 
difference reference from section (__TEXT,__eh_frame) relocation entry 
(80) to symbol: QPtrList<KParts::Part>::~QPtrList [in-charge]() defined 
in dylib: /sw/lib/libkparts.dylib)
ld: .libs/javasupportpart.o illegal reference for -dynamic code (section 
difference reference from section (__TEXT,__eh_frame) relocation entry 
(290) to symbol: QValueList<KSharedPtr<KMimeType> >::detachInternal() 
defined in dylib: /sw/lib/libkio.dylib)
make: *** [libkdevjavasupport.la] Error 1
---(snip!)---

Darwin's linker is very picky, and apparently won't let you link this 
unless all of the symbols match up exception-wise.

To fix this, I had to put "KDE_CXXFLAGS = $(USE_EXCEPTIONS)" into 
kdelibs/kparts/Makefile.am and kdelibs/kio/kio/Makefile.am.

I seem to recall some threads about enabling exception handling in 
kdelibs a while back, but I can't seem to find them at the moment.  Is 
this still an open issue?  Is it OK to commit those changes to kdelibs 
or should I just continue patching them in the MacOSX packages?

-- 
Benjamin Reed a.k.a. Ranger Rick -- http://ranger.befunk.com/
gpg: 6401 D02A A35F 55E9 D7DD  71C5 52EF A366 D3F6 65FE
<jbeimler> yeah, rpm is for people who can't keep track of hundreds
            of scraps of paper


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 253 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20031122/7ff2a82a/attachment.sig>


More information about the kde-core-devel mailing list