http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46980
--- Comment #3 from John David Anglin <danglin at gcc dot gnu.org> 2011-10-10 21:40:53 UTC --- This is just a guess, but I suspect the problem is opencv is using precompiled headers. Note that pch is disabled for libstdcxx. I tried to fix the libstdcxx pch bug, but it was a complex one caused by a compiler miscompilation of itself. I believe it is gone in 4.6, and possibly 4.5.