Closed ttsesm closed 8 years ago
0) There are some problems with the PKGBUILD script =(
1) Try to undef cmake -U SFM_DEPS_OK .
parameter.
2) Try to force cmake -DSFM_DEPS_OK=ON .
parameter to bypass this check.
using the above settings in cmake gives the following error:
[ 24%] Built target opencv_core
[ 24%] Building CXX object modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/homography.cc.o
In file included from /usr/include/ceres/types.h:42:0,
from /usr/include/ceres/internal/variadic_evaluate.h:38,
from /usr/include/ceres/internal/autodiff.h:148,
from /usr/include/ceres/autodiff_cost_function.h:132,
from /usr/include/ceres/ceres.h:37,
from /home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_light/libmv/multiview/fundamental.cc:24:
/usr/include/ceres/internal/port.h:50:12: error: ‘std::shared_ptr’ has not been declared
using std::shared_ptr;
^
In file included from /usr/include/ceres/ceres.h:55:0,
from /home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_light/libmv/multiview/fundamental.cc:24:
/usr/include/ceres/solver.h:499:5: error: ‘shared_ptr’ does not name a type
shared_ptr<ParameterBlockOrdering> linear_solver_ordering;
^
/usr/include/ceres/solver.h:630:5: error: ‘shared_ptr’ does not name a type
shared_ptr<ParameterBlockOrdering> inner_iteration_ordering;
^
In file included from /usr/include/ceres/types.h:42:0,
from /usr/include/ceres/internal/variadic_evaluate.h:38,
from /usr/include/ceres/internal/autodiff.h:148,
from /usr/include/ceres/autodiff_cost_function.h:132,
from /usr/include/ceres/ceres.h:37,
from /home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_light/libmv/multiview/homography.cc:24:
/usr/include/ceres/internal/port.h:50:12: error: ‘std::shared_ptr’ has not been declared
using std::shared_ptr;
^
In file included from /usr/include/ceres/ceres.h:55:0,
from /home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_light/libmv/multiview/homography.cc:24:
/usr/include/ceres/solver.h:499:5: error: ‘shared_ptr’ does not name a type
shared_ptr<ParameterBlockOrdering> linear_solver_ordering;
^
/usr/include/ceres/solver.h:630:5: error: ‘shared_ptr’ does not name a type
shared_ptr<ParameterBlockOrdering> inner_iteration_ordering;
^
modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/build.make:158: recipe for target 'modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/homography.cc.o' failed
make[2]: *** [modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/homography.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
[ 24%] Linking CXX shared library ../../lib/libopencv_imgproc.so
[ 25%] Built target opencv_imgproc
[ 25%] Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_cmp_mat.cu.o
modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/build.make:110: recipe for target 'modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/fundamental.cc.o' failed
make[2]: *** [modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/fundamental.cc.o] Error 1
[ 25%] Building NVCC (Device) object modules/cudaarithm/CMakeFiles/cuda_compile.dir/src/cuda/cuda_compile_generated_minmax_mat.cu.o
CMakeFiles/Makefile2:26073: recipe for target 'modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/all' failed
make[1]: *** [modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/all] Error 2
1) Run make
and wait for failure.
2) Run make VERBOSE=1
and add output here.
Google points to this discussion about invalid "config.h"
Try to check what config.h is used (for example, run GCC preprocessor via -E
option).
It is important, because compilation is broken in this code block in your case:
https://github.com/ceres-solver/ceres-solver/blob/d80c112168acee98c3679918f3d84cfd4f31a947/include/ceres/internal/port.h#L35-L50
[ 84%] Built target opencv_test_optflow
make -f modules/sfm/src/libmv_light/libmv/numeric/CMakeFiles/numeric.dir/build.make modules/sfm/src/libmv_light/libmv/numeric/CMakeFiles/numeric.dir/depend
make[2]: Entering directory '/home/theodore/package_builds/opencv-git/src/opencv'
cd /home/theodore/package_builds/opencv-git/src/opencv && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/theodore/package_builds/opencv-git/src/opencv /home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_light/libmv/numeric /home/theodore/package_builds/opencv-git/src/opencv /home/theodore/package_builds/opencv-git/src/opencv/modules/sfm/src/libmv_light/libmv/numeric /home/theodore/package_builds/opencv-git/src/opencv/modules/sfm/src/libmv_light/libmv/numeric/CMakeFiles/numeric.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/theodore/package_builds/opencv-git/src/opencv'
make -f modules/sfm/src/libmv_light/libmv/numeric/CMakeFiles/numeric.dir/build.make modules/sfm/src/libmv_light/libmv/numeric/CMakeFiles/numeric.dir/build
make[2]: Entering directory '/home/theodore/package_builds/opencv-git/src/opencv'
make[2]: Nothing to be done for 'modules/sfm/src/libmv_light/libmv/numeric/CMakeFiles/numeric.dir/build'.
make[2]: Leaving directory '/home/theodore/package_builds/opencv-git/src/opencv'
[ 84%] Built target numeric
make -f modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/build.make modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/depend
make[2]: Entering directory '/home/theodore/package_builds/opencv-git/src/opencv'
cd /home/theodore/package_builds/opencv-git/src/opencv && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /home/theodore/package_builds/opencv-git/src/opencv /home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_light/libmv/multiview /home/theodore/package_builds/opencv-git/src/opencv /home/theodore/package_builds/opencv-git/src/opencv/modules/sfm/src/libmv_light/libmv/multiview /home/theodore/package_builds/opencv-git/src/opencv/modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/DependInfo.cmake --color=
make[2]: Leaving directory '/home/theodore/package_builds/opencv-git/src/opencv'
make -f modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/build.make modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/build
make[2]: Entering directory '/home/theodore/package_builds/opencv-git/src/opencv'
[ 84%] Building CXX object modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/fundamental.cc.o
cd /home/theodore/package_builds/opencv-git/src/opencv/modules/sfm/src/libmv_light/libmv/multiview && /usr/bin/c++ -DCERES_FOUND=1 -D__OPENCV_BUILD=1 -I/home/theodore/package_builds/opencv-git/src/opencv/include/opencv -I/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_light -I/home/theodore/package_builds/opencv-git/src/opencv/3rdparty/ippicv/unpack/ippicv_lnx/include -I/home/theodore/package_builds/opencv-git/src/opencv -isystem /usr/include/eigen3 -I/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/include -I/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src -I/home/theodore/package_builds/opencv-git/src/opencv/modules/sfm -I/home/theodore/package_builds/opencv-git/src/opencv/modules/cudev/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/core/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/cudaarithm/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/flann/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/imgproc/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/ml/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/video/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/imgcodecs/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/shape/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/videoio/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/highgui/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/features2d/include -I/home/theodore/package_builds/opencv-git/src/opencv/modules/calib3d/include -I/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/xfeatures2d/include -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fsigned-char -W -Wall -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Wformat -Werror=format-security -Winit-self -Wpointer-arith -Wsign-promo -Wno-narrowing -Wno-delete-non-virtual-dtor -fdiagnostics-show-option -Wno-long-long -pthread -fomit-frame-pointer -ffast-math -msse -msse2 -mno-avx -mno-sse3 -mno-ssse3 -mno-sse4.1 -mno-sse4.2 -ffunction-sections -fvisibility=hidden -fvisibility-inlines-hidden -Wno-undef -Wno-shadow -Wno-sign-compare -Wno-missing-declarations -Wno-unused-but-set-variable -Wno-unused-parameter -Wno-unused-function -fPIC -O3 -DNDEBUG -DNDEBUG -o CMakeFiles/multiview.dir/fundamental.cc.o -c /home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_light/libmv/multiview/fundamental.cc
In file included from /usr/include/ceres/types.h:42:0,
from /usr/include/ceres/internal/variadic_evaluate.h:38,
from /usr/include/ceres/internal/autodiff.h:148,
from /usr/include/ceres/autodiff_cost_function.h:132,
from /usr/include/ceres/ceres.h:37,
from /home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_light/libmv/multiview/fundamental.cc:24:
/usr/include/ceres/internal/port.h:50:12: error: ‘std::shared_ptr’ has not been declared
using std::shared_ptr;
^
In file included from /usr/include/ceres/ceres.h:55:0,
from /home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_light/libmv/multiview/fundamental.cc:24:
/usr/include/ceres/solver.h:499:5: error: ‘shared_ptr’ does not name a type
shared_ptr<ParameterBlockOrdering> linear_solver_ordering;
^
/usr/include/ceres/solver.h:630:5: error: ‘shared_ptr’ does not name a type
shared_ptr<ParameterBlockOrdering> inner_iteration_ordering;
^
modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/build.make:110: recipe for target 'modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/fundamental.cc.o' failed
make[2]: *** [modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/fundamental.cc.o] Error 1
make[2]: Leaving directory '/home/theodore/package_builds/opencv-git/src/opencv'
CMakeFiles/Makefile2:26073: recipe for target 'modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/all' failed
make[1]: *** [modules/sfm/src/libmv_light/libmv/multiview/CMakeFiles/multiview.dir/all] Error 2
make[1]: Leaving directory '/home/theodore/package_builds/opencv-git/src/opencv'
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
that's the output from make VERBOSE=1
. However, I did not get the thing with the config.h
and the gcc preprocessor via -E
option can you explain a bit more.
Please attach your /usr/include/ceres/internal/config.h
Do you have something like this?
$ cat /usr/include/ceres/internal/config.h | grep TR1
// #define CERES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE
#define CERES_TR1_UNORDERED_MAP
#define CERES_TR1_MEMORY_HEADER
#define CERES_TR1_SHARED_PTR
Or you have this?
Hi Alexander, the content of config.h is a bit different than the one that you describe above, all the lines are commented:
cat /usr/include/ceres/internal/config.h | grep TR1
// #define CERES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE
// #define CERES_TR1_UNORDERED_MAP
// #define CERES_TR1_MEMORY_HEADER
// #define CERES_TR1_SHARED_PTR
and for sure not the one from the link, check bellow:
// Ceres Solver - A fast non-linear least squares minimizer
// Copyright 2015 Google Inc. All rights reserved.
// http://ceres-solver.org/
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of Google Inc. nor the names of its contributors may be
// used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// Author: alexs.mac@gmail.com (Alex Stewart)
// Configuration options for Ceres.
//
// Do not edit this file, it was automatically configured by CMake when
// Ceres was compiled with the relevant configuration for the machine
// on which Ceres was compiled.
//
// Ceres Developers: All options should have the same name as their mapped
// CMake options, in the preconfigured version of this file
// all options should be enclosed in '@'.
#ifndef CERES_PUBLIC_INTERNAL_CONFIG_H_
#define CERES_PUBLIC_INTERNAL_CONFIG_H_
// If defined, use the LGPL code in Eigen.
#define CERES_USE_EIGEN_SPARSE
// If defined, Ceres was compiled without LAPACK.
// #define CERES_NO_LAPACK
// If defined, Ceres was compiled without SuiteSparse.
// #define CERES_NO_SUITESPARSE
// If defined, Ceres was compiled without CXSparse.
// #define CERES_NO_CXSPARSE
// If defined, Ceres was compiled without Schur specializations.
// #define CERES_RESTRICT_SCHUR_SPECIALIZATION
// If defined, Ceres was compiled to use Eigen instead of hardcoded BLAS
// routines.
// #define CERES_NO_CUSTOM_BLAS
// If defined, Ceres was compiled with C++11.
#define CERES_USE_CXX11
// If defined, Ceres was compiled without multithreading support.
// #define CERES_NO_THREADS
// If defined Ceres was compiled with OpenMP multithreading support.
#define CERES_USE_OPENMP
// Additionally defined on *nix if Ceres was compiled with OpenMP support,
// as in this case pthreads is also required.
#define CERES_HAVE_PTHREAD
#define CERES_HAVE_RWLOCK
// Which version of unordered map was used when Ceres was compiled. Exactly
// one of these will be defined for any given build.
#define CERES_STD_UNORDERED_MAP
// #define CERES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE
// #define CERES_TR1_UNORDERED_MAP
// #define CERES_NO_UNORDERED_MAP
// If defined, the memory header is in <tr1/memory>, otherwise <memory>.
// #define CERES_TR1_MEMORY_HEADER
// If defined shared_ptr is in std::tr1 namespace, otherwise std.
// #define CERES_TR1_SHARED_PTR
// If defined, Ceres was built as a shared library.
// #define CERES_USING_SHARED_LIBRARY
#endif // CERES_PUBLIC_INTERNAL_CONFIG_H_
so I guess the issue is that I did not compiled ceres_solver with the proper options, right? Actually I used this PKGBUILD file from here
Thanks for update!
I see, there is defined #define CERES_USE_CXX11
in your ceres config. You may try to disable C++11 in ceres build somehow or enable C++11 features in OpenCV build (rebuild with cmake -DCMAKE_CXX_FLAGS="-std=c++11 .
). But this mode is not well tested (especially with opencv_contrib
).
Hi Alexander, I followed your advice and disabled c++11 on ceres_solver package and now the content of config.h in ceres_solver is the one you mentioned above in your message:
$ cat /usr/include/ceres/internal/config.h | grep TR1
// #define CERES_STD_UNORDERED_MAP_IN_TR1_NAMESPACE
#define CERES_TR1_UNORDERED_MAP
#define CERES_TR1_MEMORY_HEADER
#define CERES_TR1_SHARED_PTR
Then I tried to recompile opencv, however now I am getting the following error:
[ 58%] Building CXX object modules/sfm/CMakeFiles/opencv_sfm.dir/src/simple_pipeline.cpp.o
In file included from /home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/simple_pipeline.cpp:43:0:
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h: In function ‘void libmv_initLogging(const char*)’:
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:94:42: error: ‘SetCommandLineOption’ was not declared in this scope
SetCommandLineOption("logtostderr", "1");
^
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h: In function ‘void libmv_startDebugLogging()’:
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:101:42: error: ‘SetCommandLineOption’ was not declared in this scope
SetCommandLineOption("logtostderr", "1");
^
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h: In function ‘void libmv_setLoggingVerbosity(int)’:
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:110:32: error: ‘SetCommandLineOption’ was not declared in this scope
SetCommandLineOption("v", val);
^
modules/sfm/CMakeFiles/opencv_sfm.dir/build.make:206: recipe for target 'modules/sfm/CMakeFiles/opencv_sfm.dir/src/simple_pipeline.cpp.o' failed
make[2]: *** [modules/sfm/CMakeFiles/opencv_sfm.dir/src/simple_pipeline.cpp.o] Error 1
CMakeFiles/Makefile2:25694: recipe for target 'modules/sfm/CMakeFiles/opencv_sfm.dir/all' failed
make[1]: *** [modules/sfm/CMakeFiles/opencv_sfm.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
any idea?
Check this patch: #484
I checked the source file and it is already patched, but compilation still fails.
Try to replace to something like GFLAGS_NAMESPACE::SetCommandLineOption
.
See https://github.com/gflags/gflags/search?utf8=%E2%9C%93&q=SetCommandLineOption
nope it does not work it gives me the following:
In file included from /home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/simple_pipeline.cpp:43:0:
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h: In function ‘void libmv_initLogging(const char*)’:
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:94:3: error: ‘GFLAGS_NAMESPACE’ has not been declared
GFLAGS_NAMESPACE::SetCommandLineOption("logtostderr", "1");
^
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:95:3: error: ‘GFLAGS_NAMESPACE’ has not been declared
GFLAGS_NAMESPACE::SetCommandLineOption("v", "0");
^
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:96:3: error: ‘GFLAGS_NAMESPACE’ has not been declared
GFLAGS_NAMESPACE::SetCommandLineOption("stderrthreshold", severity_fatal);
^
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:97:3: error: ‘GFLAGS_NAMESPACE’ has not been declared
GFLAGS_NAMESPACE::SetCommandLineOption("minloglevel", severity_fatal);
^
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h: In function ‘void libmv_startDebugLogging()’:
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:101:3: error: ‘GFLAGS_NAMESPACE’ has not been declared
GFLAGS_NAMESPACE::SetCommandLineOption("logtostderr", "1");
^
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:102:3: error: ‘GFLAGS_NAMESPACE’ has not been declared
GFLAGS_NAMESPACE::SetCommandLineOption("v", "2");
^
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:103:3: error: ‘GFLAGS_NAMESPACE’ has not been declared
GFLAGS_NAMESPACE::SetCommandLineOption("stderrthreshold", "1");
^
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:104:3: error: ‘GFLAGS_NAMESPACE’ has not been declared
GFLAGS_NAMESPACE::SetCommandLineOption("minloglevel", "0");
^
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h: In function ‘void libmv_setLoggingVerbosity(int)’:
/home/theodore/package_builds/opencv-git/src/opencv_contrib/modules/sfm/src/libmv_capi.h:110:3: error: ‘GFLAGS_NAMESPACE’ has not been declared
GFLAGS_NAMESPACE::SetCommandLineOption("v", val);
^
modules/sfm/CMakeFiles/opencv_sfm.dir/build.make:206: recipe for target 'modules/sfm/CMakeFiles/opencv_sfm.dir/src/simple_pipeline.cpp.o' failed
make[2]: *** [modules/sfm/CMakeFiles/opencv_sfm.dir/src/simple_pipeline.cpp.o] Error 1
CMakeFiles/Makefile2:25694: recipe for target 'modules/sfm/CMakeFiles/opencv_sfm.dir/all' failed
make[1]: *** [modules/sfm/CMakeFiles/opencv_sfm.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 64%] Built target example_tapi_camshift
then I tried to include some header files but no success as well
@TheodoreT ,
@cbalint13 nope, I have already this patch, Alexander pointed me to that earlier, but it does not help. I tried also to use the former status before the patch with the google::
namespace but without success as well.
Same problem here
I added '-D CMAKE_CXX_FLAGS=-std=c++11'
to PKGBUILD file, that solved the std::shared_ptr
error.
but the SetCommandLineOption
error is still there
Well,
adding this line
#include <gflags/gflags.h>
to the file opencv_contrib/modules/sfm/src/libmv_capi.h
solved my issue
@comicchang thanks for the update. Indeed your solution solved the issue here as well. I will try to make a pull request with the solution. Many thanks again.
@TheodoreT Could you try #519 fix?
@alalek thanks #519 solves the issue I was planning to make a PR, but @volokh was faster. I am glad though that the issue is solved :+1: . Therefore, I will close this issue. Thanks again.
原因和解决办法:对于ceres-solver库,当前版本已经是2.2.0了,代码上有较大改动,而opencv的sfm模块所使用的代码是之前的版本,所以需要找个之前的版本自行源码编译。在OpenCV的官网上没有查到关于ceres-solver依赖版本的记载,选取ceres-solver-1.14.0即可构建成功。
I am trying to build the sfm module but without success. I have followed the instructions at the README file but no matter what I am doing I am getting the following message all the time (check also below in CMake file):
System: Archlinux 64bit Packages Installed:
CMake file:
I tried also to set manually the paths through CMake but still no success:
I was not sure if it is related with #485 so I opened a new issue.