Review Request 119583: Fix build failures occurring in GCC versions <4.8
Milian Wolff
mail at milianw.de
Sun Aug 3 14:24:57 UTC 2014
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/119583/#review63700
-----------------------------------------------------------
Ship it!
I'd instead put the dtor into a .cpp file, afaik that was at one point also required for compiling on Windows.
- Milian Wolff
On Aug. 3, 2014, 12:37 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, 12:37 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/idefinesandincludesmanager.h 3a6e87a
>
> 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/20140803/5615a509/attachment.html>
More information about the KDevelop-devel
mailing list