Bug 843436
Summary: | #define DBL_EPSILON ignored | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | nucleo <alekcejk> | ||||
Component: | mingw-headers | Assignee: | Erik van Pienbroek <erik-fedora> | ||||
Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | unspecified | Docs Contact: | |||||
Priority: | unspecified | ||||||
Version: | 19 | CC: | alekcejk, erik-fedora, kalevlember, ktietz, rjones | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2015-02-17 14:22:14 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
nucleo
2012-07-26 10:31:47 UTC
It is missing an '#include <float.h>' in ts_perf.hpp. Nothing changed after I added '#include <float.h>' in ts_perf.hpp. Looks like float.h used even without adding this #include because it builds after modifying /usr/i686-w64-mingw32/sys-root/mingw/include/float.h. I took a closer look at this and it's passing "-isystem /usr/i686-w64-mingw32/sys-root/mingw/include" to g++, which overrides the order of gcc's internal includes. While normally /usr/lib64/gcc/i686-w64-mingw32/4.7.0/include precedes /usr/i686-w64-mingw32/sys-root/mingw/include, the use of -isystem reverses the order. Apparently with gcc 4.6 and newer, the mingw-w64 headers expect that gcc's include directory always comes first. The #include_next <float.h> in mingw-w64's float.h is guarded by __GNUC__ == 4 && __GNUC_MINOR__ < 6. Kai, are the float.h headers supposed to still correctly include the other one if the system include directory order is swapped? The order of system-include directories is right now fixed. We expect that gcc's internal include comes before the standard include directory. Of course this might cause issues with -isystem, so a patch for this upstream could be a solution. Does it help to revome the guard __GNUC__ == 4 && _GNUC_MINGW_ < 6? (In reply to comment #4) > The order of system-include directories is right now fixed. We expect that > gcc's internal include comes before the standard include directory. > Of course this might cause issues with -isystem, so a patch for this > upstream could be a solution. > Does it help to revome the guard __GNUC__ == 4 && _GNUC_MINGW_ < 6? I modified /usr/i686-w64-mingw32/sys-root/mingw/include/float.h: --- float.h.orig 2012-07-05 21:54:45.000000000 +0300 +++ float.h 2012-07-26 20:37:54.216850282 +0300 @@ -13,7 +13,7 @@ #if (defined (__GNUC__) && defined (__GNUC_MINOR__)) \ || (defined(__clang__) && defined(__clang_major__)) -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)) \ +#if (__GNUC__ < 4 ) \ || (__clang_major__ >=3) #if !defined(_FLOAT_H___) && !defined(__FLOAT_H) #include_next <float.h> But compilation failed with the same error: In file included from /home/user/rpmbuild/BUILD/OpenCV-2.4.2/modules/ts/include/opencv2/ts/ts.hpp:583:0, from /home/user/rpmbuild/BUILD/OpenCV-2.4.2/modules/core/perf/perf_precomp.hpp:8, from /home/user/rpmbuild/BUILD/OpenCV-2.4.2/build_win32shared/modules/core/opencv_perf_core_pch_dephelp.cxx:1: /home/user/rpmbuild/BUILD/OpenCV-2.4.2/modules/ts/include/opencv2/ts/ts_perf.hpp:163:88: error: 'DBL_EPSILON' was not declared in this scope The only place where I found -isystem is cmake/OpenCVPCHSupport.cmake, but looks like -isystem added even after removing line "sed -i '/_PCH_isystem_prefix/d' cmake/OpenCVPCHSupport.cmake". I placed files /usr/lib/gcc/i686-w64-mingw32/4.7.0/include/float.h in /usr/i686-w64-mingw32/sys-root/mingw/include/ and /usr/i686-w64-mingw32/sys-root/mingw/include/float.h in /usr/lib/gcc/i686-w64-mingw32/4.7.0/include/ but still getting the same error. Now I got other error after this modification of /usr/i686-w64-mingw32/sys-root/mingw/include/float.h: --- float.h.orig 2012-07-05 21:54:45.000000000 +0300 +++ float.h 2012-08-01 03:39:20.474592779 +0300 @@ -13,8 +13,6 @@ #if (defined (__GNUC__) && defined (__GNUC_MINOR__)) \ || (defined(__clang__) && defined(__clang_major__)) -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)) \ - || (__clang_major__ >=3) #if !defined(_FLOAT_H___) && !defined(__FLOAT_H) #include_next <float.h> #endif @@ -113,7 +111,6 @@ #define _FLOAT_H___ #endif #endif -#endif #ifndef _MINGW_FLOAT_H_ #define _MINGW_FLOAT_H_ New build error: In file included from /usr/i686-w64-mingw32/sys-root/mingw/include/float.h:17:0, from /home/user/rpmbuild/BUILD/OpenCV-2.4.2/modules/core/include/opencv2/core/types_c.h:58, from /home/user/rpmbuild/BUILD/OpenCV-2.4.2/modules/core/include/opencv2/core/core.hpp:49, from /home/user/rpmbuild/BUILD/OpenCV-2.4.2/modules/core/src/precomp.hpp:50, from /home/user/rpmbuild/BUILD/OpenCV-2.4.2/build_win32shared/modules/core/opencv_core_pch_dephelp.cxx:1: /usr/lib/gcc/i686-w64-mingw32/4.7.0/include/float.h:279:24: fatal error: float.h: No such file or directory If I additionally to changes from Comment 8 remove this line in file /usr/lib/gcc/i686-w64-mingw32/4.7.0/include/float.h: #include_next <float.h> then it compiles fine. So maybe possible fix needs adding some kind of ifdefs for #include_next in /usr/lib/gcc/i686-w64-mingw32/4.7.0/include/float.h and modification of ifdefs in /usr/i686-w64-mingw32/sys-root/mingw/include/float.h ? This bug appears to have been reported against 'rawhide' during the Fedora 19 development cycle. Changing version to '19'. (As we did not run this process for some time, it could affect also pre-Fedora 19 development cycle bugs. We are very sorry. It will help us with cleanup during Fedora 19 End Of Life. Thank you.) More information and reason for this action is here: https://fedoraproject.org/wiki/BugZappers/HouseKeeping/Fedora19 Is this issue still valid on modern Fedora environments? I can't build the SRPM you mentioned here as it depends on cuda which isn't in Fedora and I don't know where its RPM package can be found This message is a notice that Fedora 19 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 19. It is Fedora's policy to close all bug reports from releases that are no longer maintained. Approximately 4 (four) weeks from now this bug will be closed as EOL if it remains open with a Fedora 'version' of '19'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 19 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged change the 'version' to a later Fedora version prior this bug is closed as described in the policy above. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Fedora please feel free to reopen this bug against that version. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days |