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

Craig T. zarathustra.zoroaster at gmail.com
Mon Aug 4 09:26:18 UTC 2014



> On Aug. 4, 2014, 5:23 a.m., Kevin Funk wrote:
> > What's the link to the GCC bugzilla entry?

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53613


- Craig


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119583/#review63741
-----------------------------------------------------------


On Aug. 3, 2014, 7:35 p.m., Craig T. wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/119583/
> -----------------------------------------------------------
> 
> (Updated Aug. 3, 2014, 7:35 p.m.)
> 
> 
> Review request for KDevelop.
> 
> 
> Repository: kdevelop
> 
> 
> Description
> -------
> 
> 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
> -----
> 
>   languages/plugins/custom-definesandincludes/definesandincludesmanager.h 6d0097d 
>   languages/plugins/custom-definesandincludes/definesandincludesmanager.cpp 8d78531 
> 
> Diff: https://git.reviewboard.kde.org/r/119583/diff/
> 
> 
> Testing
> -------
> 
> Compiled with GCC-4.7.3
> 
> 
> Thanks,
> 
> Craig T.
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140804/b751e070/attachment-0001.html>


More information about the KDevelop-devel mailing list