Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 393685 - media-libs/opencv-2.4.3 uses True and and False as class names - clashes with #defines in other headers
Summary: media-libs/opencv-2.4.3 uses True and and False as class names - clashes with...
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] KDE (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Andreas K. Hüttel
URL: http://code.opencv.org/issues/2529
Whiteboard: tracking upstream
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-08 22:49 UTC by Jean-Francois Ostiguy
Modified: 2012-12-16 00:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch for opencv-2.3.1 (still applies but breaks 2.4.3 build) (opencv-2.3.1a-True-False.patch,5.00 KB, patch)
2011-12-31 21:56 UTC, Andreas K. Hüttel
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Francois Ostiguy 2011-12-08 22:49:24 UTC
opencv-2.3.1a uses True and and False as class names. This is a bad idea: these names clashes with #defines from other system headers. See bug #393555. 
The patch I supplied for opencv should be applied.   


Reproducible: Always
Comment 1 Andreas K. Hüttel archtester gentoo-dev 2011-12-31 21:56:43 UTC
Created attachment 297489 [details, diff]
patch for opencv-2.3.1 (still applies but breaks 2.4.3 build)

Adding the patch here for completeness.
Comment 2 Andreas K. Hüttel archtester gentoo-dev 2011-12-31 22:02:28 UTC
While I see the point of this, could you please file a bug at https://code.ros.org/trac/opencv/ and link to it here?!
Comment 3 Andreas K. Hüttel archtester gentoo-dev 2011-12-31 22:13:37 UTC
The other question is of course, your patch modifies publicly installed headers.

It's in the end up to upstream to decide...
Comment 4 Andreas K. Hüttel archtester gentoo-dev 2011-12-31 22:20:40 UTC
Patch added in 2.3.1a-r1. Please still submit the upstream bug and link to it here.
Comment 5 Andreas K. Hüttel archtester gentoo-dev 2012-11-05 20:55:17 UTC
As of 2.4.3, this patch makes the build fail. Removed. 

Did you submit it upstream for review and integration?
Comment 6 Andreas K. Hüttel archtester gentoo-dev 2012-11-10 13:36:59 UTC
Reported upstream
Comment 7 Chris Reffett (RETIRED) gentoo-dev Security 2012-11-28 03:24:10 UTC
Might want to poke upstream again; they reported on the bug that it's "fixed" by adding #undef True and #undef False in 2.4.3 to prevent the collision with the other headers. Not sure if we consider that to really be fixing the issue.
Comment 8 Andreas K. Hüttel archtester gentoo-dev 2012-12-16 00:16:50 UTC
(In reply to comment #7)
> Might want to poke upstream again; they reported on the bug that it's
> "fixed" by adding #undef True and #undef False in 2.4.3 to prevent the
> collision with the other headers. Not sure if we consider that to really be
> fixing the issue.

It's an incomplete and slighlty st&%/&%id fix (since now things might break if something calls True or False and expects the x11 definition). Having these names in a publicly exported interface just calls for trouble.

However, unless sonething is actually reported broken, it probably makes no sense to keep this bug open.