Review Request 119583: Fix build failures occurring in GCC versions <4.8

Craig T. zarathustra.zoroaster at
Mon Aug 4 10:14:36 UTC 2014

This is an automatically generated e-mail. To reply, visit:

(Updated Aug. 4, 2014, 10:14 a.m.)


This change has been marked as submitted.

Review request for KDevelop.

Repository: kdevelop


Owing to a bug in GCC versions less than the 4.8, we encounter the following build failure when compiling kdevelop with GCC-4.7:

`KDevelop/languages/plugins/custom-definesandincludes/idefinesandincludesmanager.h:54: error: undefined reference to 'vtable for KDevelop::IDefinesAndIncludesManager'
KDevelop/languages/plugins/custom-definesandincludes/definesandincludesmanager.h:41: error: undefined reference to 'KDevelop::IDefinesAndIncludesManager::~IDefinesAndIncludesManager()'
KDevelop/languages/plugins/custom-definesandincludes/definesandincludesmanager.h:41: error: undefined reference to 'KDevelop::IDefinesAndIncludesManager::~IDefinesAndIncludesManager()'
CMakeFiles/kdevdefinesandincludesmanager.dir/definesandincludesmanager.cpp.o:definesandincludesmanager.cpp:function typeinfo for KDevelop::DefinesAndIncludesManager: error: undefined reference to 'typeinfo for KDevelop::IDefinesAndIncludesManager'`

The GCC bugzilla suggests two workarounds:
1. Defining this implicitly inlined, defaulted destructor outside the class
2. Adding a `noexcept` declaration to derived destructors.

The second is obviously the most appealing and least intrusive fix, unfortunately, I couldn't seem to get it to compile owing to the concrete DefinesAndIncludesManager class becoming an incomplete type, possibly because the virtual IDefinesAndIncludesManager destructor was being inline'd out of existence (despite being marked virtual?), so I have implemented the former of the two workarounds and tagged it with a HACK. This fix was prompted by several callers to #kdevelop whom all seemed to be running afoul of this issue. As the 4.7 branch is still in moderate use, it may be worth it to just bite the bullet and apply this for now.


  languages/plugins/custom-definesandincludes/definesandincludesmanager.h 6d0097d 
  languages/plugins/custom-definesandincludes/definesandincludesmanager.cpp 8d78531 



Compiled with GCC-4.7.3


Craig T.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the KDevelop-devel mailing list