Bug 1066546

Summary: Invalid "noexcept" clause in exception
Product: [Fedora] Fedora Reporter: Tim Niemueller <tim>
Component: hokuyoaistAssignee: Rich Mattes <richmattes>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: richmattes, tim
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hokuyoaist-3.0.2-1.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-15 15:27:33 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Fix for noexcept problem none

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.