Bug 1417383
| Summary: | GCC7 & some of std:: function do not exist | ||
|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Igor Gnatenko <ignatenko> |
| Component: | gpgme | Assignee: | Igor Gnatenko <ignatenko> |
| Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | rawhide | CC: | davejohansen, fkluknav, ignatenko, jakub, jwakely, law, mpolacek, rdieter, tmraz |
| Target Milestone: | --- | Keywords: | Regression |
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-02-11 08:01:49 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: | |||
The obvious question is does the code #include <functional> ? My first guess would be that it was previously relying on that header being implicitly included by some other header, and I reduced the interdependencies between headers. The code needs to include what it uses. I don't see #include <functional> in gpgme-1.8.0/lang/qt/src/threadedjobmixin.h so this is almost certainly a bug in the package, not GCC. GCC defines std::function and std::bind in the right place, as it always has. In fact I don't see #include <functional> ANYWHERE in the entire source tree for gpgme. (In reply to Jonathan Wakely from comment #2) > I don't see #include <functional> in > gpgme-1.8.0/lang/qt/src/threadedjobmixin.h so this is almost certainly a bug > in the package, not GCC. > > GCC defines std::function and std::bind in the right place, as it always has. wondering how it worked before... For reference, the <future>, <mutex>, and <regex> headers used to include the whole of <functional> (thousands of lines), but now they don't. This is a Good Thing™. I'll make a note of this in the GCC 7 "porting to" doc. (In reply to Jonathan Wakely from comment #5) > For reference, the <future>, <mutex>, and <regex> headers used to include > the whole of <functional> (thousands of lines), but now they don't. This is > a Good Thing™. > > I'll make a note of this in the GCC 7 "porting to" doc. Thanks a lot! |
/bin/sh ../../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lang/cpp/src -I../../../src -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/libassuan2 -DBUILDING_QGPGME -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -c -o job.lo job.cpp libtool: compile: g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../../lang/cpp/src -I../../../src -I/usr/include/qt5/QtCore -I/usr/include/qt5 -I/usr/include/libassuan2 -DBUILDING_QGPGME -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -c job.cpp -fPIC -DPIC -o .libs/job.o make[5]: Leaving directory '/builddir/build/BUILD/gpgme-1.8.0/lang/qt/src' In file included from job.cpp:65:0: threadedjobmixin.h:98:33: error: 'function' in namespace 'std' does not name a template type void setFunction(const std::function<T_result()> &function) ^~~~~~~~ ... threadedjobmixin.h:170:35: error: 'bind' is not a member of 'std' m_thread.setFunction(std::bind(func, this->context())); ^~~~ and so on. it doesn't specify -std=c++11, but I suppose it should not be required for gcc7 since its default std for c++ is c++14