Refer to the http://www.cnblogs.com/weizhoupan/archive/2011/03/08/1977366.html compiled installation, because the compilation process encountered some problems, the experience to summarize their own!
One, bundler source package access
Using the source package provided by Noah Snavely, url:http://www.cs.cornell.edu/~snavely/bundler/ . (Self-downloaded: bundler_sfm-master.tar.gz)
Second, install Python
The utils/bundler.py in the source code requires a python and Python Image Library (PIL) installed in the system. The installation steps are as follows:
Install python2.7:
sudo apt-get install python2.7;
To install the Python Image Library:
$ sudo apt-get install python-imaging
$ sudo apt-get install Libjpeg-dev libfreetype6 libfreetype6-dev Zlib1g-dev
$ sudo ln-s/usr/lib/' uname-i '-linux-gnu/libfreetype.so/usr/lib/
$ sudo ln-s/usr/lib/' uname-i '-linux-gnu/libjpeg.so/usr/lib/
$ sudo ln-s/usr/lib/' uname-i '-linux-gnu/libz.so/usr/lib/
$ sudo apt-get install pip
$ pip Install PIL
third, installation Gfortran
Some of the libraries that bundler rely on are written in Fortran (for example,./lib/minpack). In order to compile the FORTRAN program, you need to install the Gfortran compiler.
$ sudo apt-get install Gfortran
iv.
compiling/installing dependent libraries
The list of external libraries that bundler relies on is as follows:
(1) LAPACK: linear algebra Calculation Library
(2) BLAS: Basic linear Algebra subroutine, which has its own in the Lapack package, but needs to be set
(3) Libjpeg:jpeg Library, Ubuntu has its own
(4) Libz: Compression Library for general purpose
1. Compilation of LAPACK and Blas
LAPACK (Linear Algebra package) library, is written in FORTRAN language linear algebra calculation library, including linear Equation Group solution (ax=b), matrix decomposition, matrix inversion, matrix eigenvalue, singular value. The library uses the Blas library to do the underlying operations, and many high-level math libraries use Blas and lapack to do the underlying.
BLAS (Basic Linear Algebra subprograms) library, is a Fortran language implementation of vector and matrix Operations Library, is the core of many numerical computing software library, but also some other packaging, such as Cblas is C language, also has C + + packaging, boost /ublas is the C + + template class implementation, there are some special implementations, such as Intel MKL, AMD Core Math library Blas is to do the basic operations of vectors, matrices, such as add, subtract, multiply and so on.
A) Download the LAPACK compilation package
Website:http://www.netlib.org/lapack/#_strong_lapack_version_3_3_0_strong. (Self-downloaded: lapack-3.5.0.tgz)
b) Decompression
$ TAR-ZXVF lapack-3.5.0.tgz
c) before making, you need to create a make.inc file that can be created directly from the Make.inc.example:
$ CD lapack-3.5.0
$ cp make.inc.example Make.inc
If you are using Ubuntu+gfortran, you do not have to change the contents of the Make.inc, otherwise you need to modify the corresponding options in the file according to the system environment and compiler. Lapack relies on Blas, so Blas package needs to be provided before compiling lapack, but Lapack package is already integrated, but it is not compiled by default. To compile the lapack before compiling the Blas, you need to modify the makefile:
$ gedit Makefile
The cursor navigates to line 11th and changes the contents to:
$ lib:blaslib lapacklib tmglib
After the compilation is complete, the directory will generate LIB***BLAS.A, LIBLAPACK.A, and libtmglib.a three files.
Rename these three files to: LIBBLAS.A,LIBLAPACK.A,LIBTMGLIB.A and copy them to the Bundler_sfm-master/lib directory.
2. Compile and install Zlib
Zlib is a library of functions for data compression, developed by Jean-loup Gailly and Mark Adler, and published on May 1, 1995 in the first edition of version 0.9. Zlib uses the DEFLATE algorithm, originally written for the Libpng function library, and later widely used by many software. This library is free software and uses zlib authorization. As of March 2007, Zlib was an open source project that was included in Coverity's U.S. Department of Homeland Security sponsor's choice to continue the review. Zlib's official homepage is: http://www.zlib.net/, currently the latest version is: zlib-1.2.8.
A) Unzip:
$ TAR-ZXVF zlib-1.2.8.tar.gz
b) CD in to compile and install:
$ CD zlib-1.2.8
$ ./configure
$ Make
$ sUdo make install
v. Compile and install Ceres-solver
Installation reference URL for Ceres and its dependent libraries:ceres-solver.org.
six . Compile and install bundler
Go back to Bundler's engineering directory and make to compile and install.
$ make
When you are finished, you will see the newly generated bundler executable file in the bin directory.
I am in the process of compiling the following problems mainly:
Question one:
Gcc:error trying to exec ' f951 ': execvp: No file or directory
MAKE[1]: * * [DPMPAR.O] Error 1
Workaround:
The Fortran compiler is missing, install gfortran; command: sudo apt-get install gfortran; If you still see the same error, check that the gcc,g++ version has been Because of their own before the gcc4.6 to the gcc4.4, and their own installation of Gfortran is required 4.6, so has been compiled with a problem, will it back, compiled through.
Question 2:
After the installation succeeds Ceres-solves, the compilation appears:
BUNDLECERES.CPP:20:25: Fatal error: Ceres/ceres.h: There is no file or directory compilation interrupt.
MAKE[1]: * * [BUNDLECERES.O] Error 1
MAKE[1]: Leaving directory '/HOME/LINASNOOPY/2014_2015/3D/BUNDLER_SFM_MASTER/SRC ' make: * * * [default] Error 2
Workaround:
Add path to Src/makefile (the path where Ceres/ceres.h is located)
After the path is added:
Include_path=-i. /lib/imagelib-i. /lib/sfm-driver-i. /lib/matrix \
-I.. /lib/5point-i. /lib/sba-1.5-i. /lib/ann_1.1_char/include \
-I.. /include -I.. /.. /ceres-solver-1.9.0/include-i. /.. /ceres-solver-1.9.0/internal \
-I.. /.. /ceres-solver-1.9.0/config
Compile and install bundler under Ubuntu