[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [44813] trunk/blender: Bundle new upstream version of libmv from own branch

Sergey Sharybin sergey.vfx at gmail.com
Sun Mar 11 20:52:33 CET 2012


Revision: 44813
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44813
Author:   nazgul
Date:     2012-03-11 19:52:25 +0000 (Sun, 11 Mar 2012)
Log Message:
-----------
Bundle new upstream version of libmv from own branch

This version of libmv includes new gflags and glog libraries which makes
it possible to compile libmv with clang compiler.

Also remove code from CMakeLists which was disabling libmv if using clang.

Tested on linux with gcc-4.6 and clang-3.0, windows cmake+msvc and scons+mingw.
Could be some issues with other platforms/build system which shall be simple to resolve.

Modified Paths:
--------------
    trunk/blender/CMakeLists.txt
    trunk/blender/extern/libmv/CMakeLists.txt
    trunk/blender/extern/libmv/ChangeLog
    trunk/blender/extern/libmv/files.txt
    trunk/blender/extern/libmv/libmv/logging/logging.h
    trunk/blender/extern/libmv/libmv/simple_pipeline/pipeline.cc
    trunk/blender/extern/libmv/libmv-capi.cpp
    trunk/blender/extern/libmv/patches/series
    trunk/blender/extern/libmv/third_party/gflags/README.libmv
    trunk/blender/extern/libmv/third_party/gflags/config.h
    trunk/blender/extern/libmv/third_party/gflags/gflags.cc
    trunk/blender/extern/libmv/third_party/gflags/gflags_completions.cc
    trunk/blender/extern/libmv/third_party/gflags/gflags_reporting.cc
    trunk/blender/extern/libmv/third_party/gflags/mutex.h
    trunk/blender/extern/libmv/third_party/glog/ChangeLog
    trunk/blender/extern/libmv/third_party/glog/README.libmv
    trunk/blender/extern/libmv/third_party/glog/src/base/commandlineflags.h
    trunk/blender/extern/libmv/third_party/glog/src/base/googleinit.h
    trunk/blender/extern/libmv/third_party/glog/src/config_freebsd.h
    trunk/blender/extern/libmv/third_party/glog/src/config_linux.h
    trunk/blender/extern/libmv/third_party/glog/src/config_mac.h
    trunk/blender/extern/libmv/third_party/glog/src/demangle.cc
    trunk/blender/extern/libmv/third_party/glog/src/glog/log_severity.h
    trunk/blender/extern/libmv/third_party/glog/src/glog/logging.h
    trunk/blender/extern/libmv/third_party/glog/src/glog/raw_logging.h
    trunk/blender/extern/libmv/third_party/glog/src/logging.cc
    trunk/blender/extern/libmv/third_party/glog/src/raw_logging.cc
    trunk/blender/extern/libmv/third_party/glog/src/signalhandler.cc
    trunk/blender/extern/libmv/third_party/glog/src/stacktrace_libunwind-inl.h
    trunk/blender/extern/libmv/third_party/glog/src/stacktrace_x86_64-inl.h
    trunk/blender/extern/libmv/third_party/glog/src/symbolize.cc
    trunk/blender/extern/libmv/third_party/glog/src/symbolize.h
    trunk/blender/extern/libmv/third_party/glog/src/utilities.cc
    trunk/blender/extern/libmv/third_party/glog/src/utilities.h
    trunk/blender/extern/libmv/third_party/glog/src/vlog_is_on.cc
    trunk/blender/extern/libmv/third_party/glog/src/windows/glog/log_severity.h
    trunk/blender/extern/libmv/third_party/glog/src/windows/glog/logging.h
    trunk/blender/extern/libmv/third_party/glog/src/windows/glog/raw_logging.h
    trunk/blender/extern/libmv/third_party/glog/src/windows/port.h
    trunk/blender/extern/libmv/third_party/glog/src/windows/preprocess.sh

Added Paths:
-----------
    trunk/blender/extern/libmv/third_party/gflags/AUTHORS
    trunk/blender/extern/libmv/third_party/gflags/COPYING
    trunk/blender/extern/libmv/third_party/gflags/ChangeLog
    trunk/blender/extern/libmv/third_party/gflags/NEWS
    trunk/blender/extern/libmv/third_party/gflags/gflags/
    trunk/blender/extern/libmv/third_party/gflags/gflags/gflags.h
    trunk/blender/extern/libmv/third_party/gflags/gflags/gflags_completions.h
    trunk/blender/extern/libmv/third_party/gflags/gflags/gflags_declare.h
    trunk/blender/extern/libmv/third_party/gflags/util.h

Removed Paths:
-------------
    trunk/blender/extern/libmv/patches/bundle_tweaks.patch
    trunk/blender/extern/libmv/patches/clang-3.diff
    trunk/blender/extern/libmv/third_party/gflags/gflags.h
    trunk/blender/extern/libmv/third_party/gflags/gflags_completions.h

Property Changed:
----------------
    trunk/blender/extern/libmv/third_party/glog/src/windows/preprocess.sh

Modified: trunk/blender/CMakeLists.txt
===================================================================
--- trunk/blender/CMakeLists.txt	2012-03-11 19:09:01 UTC (rev 44812)
+++ trunk/blender/CMakeLists.txt	2012-03-11 19:52:25 UTC (rev 44813)
@@ -1533,14 +1533,6 @@
 	endif()
 endif()
 
-if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-	if(WITH_LIBMV)
-		message(WARNING "Using Clang as CXX compiler: disabling WITH_LIBMV, this feature will be missing.")
-		set(WITH_LIBMV OFF)
-	endif()
-endif()
-
-
 # ensure python header is found since detection can fail, this could happen
 # with _any_ library but since we used a fixed python version this tends to
 # be most problematic.

Modified: trunk/blender/extern/libmv/CMakeLists.txt
===================================================================
--- trunk/blender/extern/libmv/CMakeLists.txt	2012-03-11 19:09:01 UTC (rev 44812)
+++ trunk/blender/extern/libmv/CMakeLists.txt	2012-03-11 19:52:25 UTC (rev 44813)
@@ -132,9 +132,11 @@
 
 	third_party/fast/fast.h
 	third_party/gflags/config.h
-	third_party/gflags/gflags_completions.h
-	third_party/gflags/gflags.h
+	third_party/gflags/gflags/gflags_completions.h
+	third_party/gflags/gflags/gflags_declare.h
+	third_party/gflags/gflags/gflags.h
 	third_party/gflags/mutex.h
+	third_party/gflags/util.h
 	third_party/ldl/Include/ldl.h
 	third_party/msinttypes/inttypes.h
 	third_party/msinttypes/stdint.h

Modified: trunk/blender/extern/libmv/ChangeLog
===================================================================
--- trunk/blender/extern/libmv/ChangeLog	2012-03-11 19:09:01 UTC (rev 44812)
+++ trunk/blender/extern/libmv/ChangeLog	2012-03-11 19:52:25 UTC (rev 44813)
@@ -1,3 +1,60 @@
+commit bf0c3423ba41b90638e89a56500aeaeb120fbaf1
+Author: Sergey I. Sharybin <g.ulairi at gmail.com>
+Date:   Sun Mar 11 20:34:15 2012 +0600
+
+    Replace "third_party/glog/src/glog/logging.h" with <glog/logging.h>
+    
+    It was needed because of how build systems is setup in Blender but think
+    this will be helpful change for other applications too because it makes
+    it's easier to move libraries around and even use libraries installed
+    on the operation system.
+
+commit 3e2673282f313c5bd19720f26d769f5d240a0563
+Author: Sergey I. Sharybin <g.ulairi at gmail.com>
+Date:   Sun Mar 11 19:27:41 2012 +0600
+
+    Upgrade gflags and glog libraries - stage 2 (final)
+    
+    Changes to upstream code which are needed to make libmv compile smooth on all platforms
+    
+    * Replace <gflags/gflags.h> with "third_party/gflags/gflags/gflags.h" which is easier
+      to setup things in libmv and also helps with setting up building libmv into
+      external applications.
+    * Replace "glog/logging.h" and  "glog/logging.h" with <glog/logging.h> and  <glog/logging.h>
+      which is needed on Windows platform because otherwise files like logging.cc will be using
+      relative path which points to headers used by linux instead of headers need to be used
+      on Windows.
+    * Replace _asm int 3 with __debugbreak(). Such assembler code is obsolete and doesn't work
+      with 64bit versions of MSVC compilers.
+    * Do not use stacktrace for MinGW and FreeBSD because it leads into issues accessing
+      some specific data on this platforms.
+    * Define HAVE_LIB_GFLAGS for Windows builds.
+    * Do not define __declspec(dllimport) for MinGW platforms.
+    * Setup proper includes and datatypes for int32, uint32, int64 and uint64 for MinGW
+    * Do not define va_copy for MinGW platforms (it's already defined there).
+    * Patch localtime_r to be working fine with MinGW, disable strerror_r for MinGW because
+      of lack of needed functions.
+
+commit 8ed07abfa49d1e0511752021c972e0715e5a1383
+Author: Sergey I. Sharybin <g.ulairi at gmail.com>
+Date:   Sun Mar 11 19:06:33 2012 +0600
+
+    Upgrade gflags and glog libraries - stage 1
+    
+    This commit copies sources from latest original release of gflags and glog
+    over currently bundled versions of this libraries without any modifications.
+    
+    This revision can't b compiled, all needed changes to make new libraries working
+    fine will be done with next commit to make it clear which changes were necessary
+    for easier bundling further newer version and extract patches and put them to
+    gflags/glog upstream repo.
+    
+    Such upgrade of libraries is needed to make it able to compile libmv
+    with clang compilers. Currently used versions:
+    
+    - gflags is version 2.0
+    - glog is version 0.3.2
+
 commit 75b9af405964ff2c7d3f0a44500e27e63b37c91b
 Author: Sergey Sharybin <sergey.vfx at gmail.com>
 Date:   Fri Feb 17 23:29:11 2012 +0600
@@ -429,21 +486,3 @@
 Date:   Thu Aug 18 23:14:17 2011 +0200
 
     Fix affine iteration.
-
-commit 4e8e0aa6018e3eb2fbebdad7f1cbd6c909d26e79
-Author: Matthias Fauconneau <matthias.fauconneau at gmail.com>
-Date:   Thu Aug 18 23:03:26 2011 +0200
-
-    Handle rotations.
-
-commit 3ce41cf3c1b5c136a61d8f4c63ccae3cafbdb8da
-Author: Matthias Fauconneau <matthias.fauconneau at gmail.com>
-Date:   Thu Aug 18 22:24:47 2011 +0200
-
-    Slow brute-force affine diamond search implementation.
-
-commit 1c4acd03e030c1c50dc6fc36c419c72ea69a0713
-Author: Matthias Fauconneau <matthias.fauconneau at gmail.com>
-Date:   Thu Aug 18 20:51:43 2011 +0200
-
-    Fix detect.cc.

Modified: trunk/blender/extern/libmv/files.txt
===================================================================
--- trunk/blender/extern/libmv/files.txt	2012-03-11 19:09:01 UTC (rev 44812)
+++ trunk/blender/extern/libmv/files.txt	2012-03-11 19:52:25 UTC (rev 44813)
@@ -78,14 +78,20 @@
 third_party/fast/nonmax.c
 third_party/fast/README
 third_party/fast/README.libmv
+third_party/gflags/AUTHORS
+third_party/gflags/ChangeLog
 third_party/gflags/config.h
+third_party/gflags/COPYING
 third_party/gflags/gflags.cc
 third_party/gflags/gflags_completions.cc
-third_party/gflags/gflags_completions.h
-third_party/gflags/gflags.h
+third_party/gflags/gflags/gflags_completions.h
+third_party/gflags/gflags/gflags_declare.h
+third_party/gflags/gflags/gflags.h
 third_party/gflags/gflags_reporting.cc
 third_party/gflags/mutex.h
+third_party/gflags/NEWS
 third_party/gflags/README.libmv
+third_party/gflags/util.h
 third_party/glog/AUTHORS
 third_party/glog/ChangeLog
 third_party/glog/COPYING

Modified: trunk/blender/extern/libmv/libmv/logging/logging.h
===================================================================
--- trunk/blender/extern/libmv/libmv/logging/logging.h	2012-03-11 19:09:01 UTC (rev 44812)
+++ trunk/blender/extern/libmv/libmv/logging/logging.h	2012-03-11 19:52:25 UTC (rev 44813)
@@ -21,7 +21,7 @@
 #ifndef LIBMV_LOGGING_LOGGING_H
 #define LIBMV_LOGGING_LOGGING_H
 
-#include "glog/logging.h"
+#include <glog/logging.h>
 
 #define LG LOG(INFO)
 #define V0 LOG(INFO)

Modified: trunk/blender/extern/libmv/libmv/simple_pipeline/pipeline.cc
===================================================================
--- trunk/blender/extern/libmv/libmv/simple_pipeline/pipeline.cc	2012-03-11 19:09:01 UTC (rev 44812)
+++ trunk/blender/extern/libmv/libmv/simple_pipeline/pipeline.cc	2012-03-11 19:52:25 UTC (rev 44813)
@@ -280,6 +280,25 @@
     double ex = reprojected_marker.x - markers[i].x;
     double ey = reprojected_marker.y - markers[i].y;
 
+    const int N = 100;
+    char line[N];
+    snprintf(line, N,
+           "image %-3d track %-3d "
+           "x %7.1f y %7.1f "
+           "rx %7.1f ry %7.1f "
+           "ex %7.1f ey %7.1f"
+           "    e %7.1f",
+           markers[i].image,
+           markers[i].track,
+           markers[i].x,
+           markers[i].y,
+           reprojected_marker.x,
+           reprojected_marker.y,
+           ex,
+           ey,
+           sqrt(ex*ex + ey*ey));
+    LG << line;
+
     total_error += sqrt(ex*ex + ey*ey);
   }
   LG << "Skipped " << num_skipped << " markers.";

Modified: trunk/blender/extern/libmv/libmv-capi.cpp
===================================================================
--- trunk/blender/extern/libmv/libmv-capi.cpp	2012-03-11 19:09:01 UTC (rev 44812)
+++ trunk/blender/extern/libmv/libmv-capi.cpp	2012-03-11 19:52:25 UTC (rev 44813)
@@ -30,6 +30,7 @@
 
 #include "libmv-capi.h"
 
+#include "third_party/gflags/gflags/gflags.h"
 #include "glog/logging.h"
 #include "libmv/logging/logging.h"
 

Deleted: trunk/blender/extern/libmv/patches/bundle_tweaks.patch
===================================================================
--- trunk/blender/extern/libmv/patches/bundle_tweaks.patch	2012-03-11 19:09:01 UTC (rev 44812)
+++ trunk/blender/extern/libmv/patches/bundle_tweaks.patch	2012-03-11 19:52:25 UTC (rev 44813)
@@ -1,152 +0,0 @@
-diff --git a/src/libmv/logging/logging.h b/src/libmv/logging/logging.h
-index 067da52..af86c4b 100644
---- a/src/libmv/logging/logging.h
-+++ b/src/libmv/logging/logging.h
-@@ -21,7 +21,7 @@
- #ifndef LIBMV_LOGGING_LOGGING_H
- #define LIBMV_LOGGING_LOGGING_H
- 
--#include "third_party/glog/src/glog/logging.h"
-+#include "glog/logging.h"
- 
- #define LG LOG(INFO)
- #define V0 LOG(INFO)
-diff --git a/src/libmv/simple_pipeline/pipeline.cc b/src/libmv/simple_pipeline/pipeline.cc
-index 2459d05..2e4e5a6 100644
---- a/src/libmv/simple_pipeline/pipeline.cc
-+++ b/src/libmv/simple_pipeline/pipeline.cc
-@@ -280,25 +280,6 @@ double InternalReprojectionError(const Tracks &image_tracks,
-     double ex = reprojected_marker.x - markers[i].x;
-     double ey = reprojected_marker.y - markers[i].y;
- 
--    const int N = 100;
--    char line[N];
--    snprintf(line, N,
--           "image %-3d track %-3d "
--           "x %7.1f y %7.1f "
--           "rx %7.1f ry %7.1f "
--           "ex %7.1f ey %7.1f"
--           "    e %7.1f",
--           markers[i].image,
--           markers[i].track,
--           markers[i].x,
--           markers[i].y,
--           reprojected_marker.x,
--           reprojected_marker.y,
--           ex,
--           ey,
--           sqrt(ex*ex + ey*ey));
--    LG << line;
--
-     total_error += sqrt(ex*ex + ey*ey);
-   }
-   LG << "Skipped " << num_skipped << " markers.";
-diff --git a/src/third_party/glog/src/glog/logging.h b/src/third_party/glog/src/glog/logging.h
-index 57615ef..a58d478 100644
---- a/src/third_party/glog/src/glog/logging.h
-+++ b/src/third_party/glog/src/glog/logging.h
-@@ -33,6 +33,7 @@
- // Pretty much everybody needs to #include this file so that they can
- // log various happenings.
- //
-+
- #ifndef _LOGGING_H_
- #define _LOGGING_H_
- 

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list