Bug 1066546 - Invalid "noexcept" clause in exception
Summary: Invalid "noexcept" clause in exception
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: hokuyoaist
Version: 20
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Rich Mattes
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-18 15:38 UTC by Tim Niemueller
Modified: 2014-04-15 15:27 UTC (History)
2 users (show)

Fixed In Version: hokuyoaist-3.0.2-1.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-04-15 15:27:33 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Fix for noexcept problem (4.26 KB, patch)
2014-02-18 15:38 UTC, Tim Niemueller
no flags Details | Diff

Description Tim Niemueller 2014-02-18 15:38:04 UTC
Created attachment 864614 [details]
Fix for noexcept problem

Description of problem:
The Hokuyo drivers own exception type uses the following prototype:
const char* what() throw()

This is incompatible with the current stdc++ if C++11 is enabled (and when using clang). We use gearbox as one alternative for accessing Hokuyo laser range finders and therefore run into compilation errors with clang.

Version-Release number of selected component (if applicable):
gearbox-10.11-5.fc20.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Build Fawkes with clang on Fedora 20

Actual results:
Should compile

Expected results:
Compile error:
In file included from /home/tim/robotics/fawkes/src/plugins/laser/urg_gbx_aqt.cpp:30:
In file included from /usr/include/hokuyoaist-3/hokuyoaist/hokuyoaist.h:32:
/usr/include/hokuyoaist-3/hokuyoaist/hokuyo_errors.h:83:29: error: 'hokuyoaist::BaseError::what' hides overloaded
      virtual function [-Werror,-Woverloaded-virtual]
        virtual const char* what() throw();
                            ^
/usr/lib/gcc/x86_64-redhat-linux/4.8.2/../../../../include/c++/4.8.2/exception:68:25: note: hidden overloaded virtual
      function 'std::exception::what' declared here: different qualifiers (const vs none)
    virtual const char* what() const _GLIBCXX_USE_NOEXCEPT;
                        ^
1 error generated.


Additional info:
A patch has been added which fixes this problem and should be compatible with GCC, clang and libstdc++ and libc++.

Comment 1 Tim Niemueller 2014-02-18 15:39:53 UTC
Ok, I realized only now that this was not about the noexcept clause but about the constness... Anyway, the patch fixes this, too :-)

Comment 2 Rich Mattes 2014-03-03 01:34:53 UTC
hokuyoaist was moved out of the gearbox package, so I'm switching this to the hokuyoaist component.

I applied the patch you supplied, and the build fails: 
/home/rich/fedora/hokuyoaist/gbiggs-hokuyoaist-32e8771/src/hokuyo_errors.cpp:380:13: error: prototype for 'const char* hokuyoaist::BaseError::what()' does not match any in class 'hokuyoaist::BaseError'
 const char* BaseError::what() throw()
             ^
In file included from /home/rich/fedora/hokuyoaist/gbiggs-hokuyoaist-32e8771/src/hokuyo_errors.cpp:29:0:
/home/rich/fedora/hokuyoaist/gbiggs-hokuyoaist-32e8771/include/hokuyoaist/hokuyo_errors.h:84:29: error: candidate is: virtual const char* hokuyoaist::BaseError::what() const
         virtual const char* what() const _GLIBCXX_USE_NOEXCEPT;
                             ^
It looks like your patch changes the header definitions, but not the implementations in the hokuyo_errors.cpp file.

Comment 3 Fedora Update System 2014-04-06 14:57:48 UTC
hokuyoaist-3.0.2-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/hokuyoaist-3.0.2-1.fc20

Comment 4 Fedora Update System 2014-04-07 03:22:43 UTC
Package hokuyoaist-3.0.2-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing hokuyoaist-3.0.2-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-4858/hokuyoaist-3.0.2-1.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-04-15 15:27:33 UTC
hokuyoaist-3.0.2-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.