[Bf-committers] [Proposal] LIBMV: Workaround for Internal Compiler error on VS2012

Jürgen Herrmann shadowrom at me.com
Tue May 14 16:05:28 CEST 2013


Hey ;)

we have a problem, when compiling extern_libmv on VS2012 x64 the compiler crashes.
It seems that this inlining problem is known to MS and they are working on a fix.
This does not happen on x86 builds though.
I could not find a real fix for this yet.
So I'd like to commit the following workaround patch, any suggestions or comments?


---------------SNIP--------------
Index: extern/libmv/libmv/tracking/esm_region_tracker.cc
===================================================================
--- extern/libmv/libmv/tracking/esm_region_tracker.cc    (revision 56794)
+++ extern/libmv/libmv/tracking/esm_region_tracker.cc    (working copy)
@@ -32,7 +32,12 @@
 #include "libmv/tracking/track_region.h"
 
 namespace libmv {
-
+/* Ugly but necessary fix for compilation on VS2012
+/* this file causes an Internal Compiler Error */
+// TODO: check regularly if ICE is fixed by MS!
+#if (_MSC_VER >= 1700 && _WIN64)
+#pragma optimize("", off)
+#endif
 // TODO(keir): Reduce duplication between here and the other region trackers.
 static bool RegionIsInBounds(const FloatImage &image1,
                       double x, double y,
Index: extern/libmv/libmv/tracking/lmicklt_region_tracker.cc
===================================================================
--- extern/libmv/libmv/tracking/lmicklt_region_tracker.cc    (revision 56794)
+++ extern/libmv/libmv/tracking/lmicklt_region_tracker.cc    (working copy)
@@ -27,7 +27,12 @@
 #include "libmv/numeric/numeric.h"
 
 namespace libmv {
-
+/* Ugly but necessary fix for compilation on VS2012
+/* this file causes an Internal Compiler Error */
+// TODO: check regularly if ICE is fixed by MS!
+#if (_MSC_VER >= 1700 && _WIN64)
+#pragma optimize("", off)
+#endif
 // TODO(keir): Reduce duplication between here and the other region trackers.
 static bool RegionIsInBounds(const FloatImage &image1,
                       double x, double y,
---------------SNIP--------------

Best regards

/Jürgen


More information about the Bf-committers mailing list