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

Craig T. zarathustra.zoroaster at
Sun Aug 3 23:35:22 UTC 2014

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

(Updated Aug. 3, 2014, 7:35 p.m.)

Review request for KDevelop.


This patch more in line with Milian's suggestion, added a NOTE above the related items to make sure they don't get removed by accident. I had erroneously thought this also failed to build, but when I looked back over my build logs, I realized that this had actually worked and I missed it.

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.

Diffs (updated)

  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