按以下代码一步步操作
conda create -n NerfingMVS python=3.7
conda activate NerfingMVS
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 -c pytorch
pip install -r requirements.txt
https://colmap.github.io/install.html
Linux 中
建议的依赖: CUDA(版本至少7.X)
依赖默认Ubuntu仓库:
sudo apt-get install \
git \
cmake \
ninja-build \
build-essential \
libboost-program-options-dev \
libboost-filesystem-dev \
libboost-graph-dev \
libboost-system-dev \
libeigen3-dev \
libflann-dev \
libfreeimage-dev \
libmetis-dev \
libgoogle-glog-dev \
libgtest-dev \
libsqlite3-dev \
libglew-dev \
qtbase5-dev \
libqt5opengl5-dev \
libcgal-dev \
libceres-dev
配置和编制COLMAP:
git clone https://github.com/colmap/colmap.git
cd colmap
mkdir build
cd build
cmake .. -GNinja
ninja
sudo ninja install
在cmake … -GNinja时出现报错
– Boost found.
– Found Boost components: filesystem;graph;program_options;system
– Found FreeImage
– Includes : /usr/include
– Libraries : /usr/lib/x86_64-linux-gnu/libfreeimage.so CMake Error at cmake/FindFreeImage.cmake:96 (target_include_directories): Cannot
specify include directories for imported target
“freeimage::FreeImage”. Call Stack (most recent call first):
cmake/FindDependencies.cmake:15 (find_package) CMakeLists.txt:96
(include)CMake Error at cmake/FindFreeImage.cmake:98 (target_link_libraries):
Cannot specify link libraries for target “freeimage::FreeImage” which
is not built by this project. Call Stack (most recent call first):
cmake/FindDependencies.cmake:15 (find_package) CMakeLists.txt:96
(include)– Configuring incomplete, errors occurred! See also “/home/uriky/桌面/NerfingMVS-main/colmap/build/CMakeFiles/CMakeOutput.log”.
尝试更新cmake看看能不能解决
https://github.com/Kitware/CMake/releases/进入下载cmake的安装包
cmake -version
which cmake
sudo ln -sf /home/uriky/cmake-3.29.3-linux-x86_64/bin/* /usr/bin/#将安装包解压之后设置软链接
cmake -version
重新运行一遍cmake … -GNinja刚刚的错误消失了,猜测可能是cmake的版本问题导致之前的错误,现在出现了新的错误
1、 CMake Error at cmake/FindLZ4.cmake:91 (message): Could not find LZ4
2、Call Stack (most recent call first): cmake/FindDependencies.cmake:18
3、(find_package) CMakeLists.txt:96 (include)
先解决第一个安装这个LZ4的包,安装代码如下
sudo apt install liblz4-dev
再次进行一遍 cmake … -GNinja,错误解决,但是出现了警告
CMake Warning at cmake/CMakeHelper.cmake:103 (add_executable):
Cannot generate a safe runtime search path for target colmap_main
because files in some directories may conflict with libraries in
implicit directories:runtime library [libgmp.so.10] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /home/uriky/anaconda3/lib runtime library [liblz4.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /home/uriky/anaconda3/lib runtime library [libsqlite3.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /home/uriky/anaconda3/lib runtime library [libglog.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /home/uriky/anaconda3/lib runtime library [libgomp.so.1] in /usr/lib/gcc/x86_64-linux-gnu/7 may be hidden by files in: /home/uriky/anaconda3/lib
Some of these libraries may not be found correctly. Call Stack (most
recent call first): src/colmap/exe/CMakeLists.txt:67
(COLMAP_ADD_EXECUTABLE)
警告就不管了(注:建议这里直接跳到111111),解决完错误,继续上述ninja代码 报错了
FAILED:
src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o
/usr/local/cuda-10.0/bin/nvcc -DBOOST_ALL_NO_LIB
-DBOOST_FILESYSTEM_DYN_LINK -DBOOST_GRAPH_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCOLMAP_CGAL_ENABLED -DCOLMAP_CUDA_ENABLED -DCOLMAP_GPU_ENABLED -DCOLMAP_GUI_ENABLED -DCOLMAP_OPENGL_ENABLED -DCOLMAP_OPENMP_ENABLED -DGFLAGS_IS_A_DLL=0 -DGLOG_VERSION_MAJOR=0 -DGLOG_VERSION_MINOR=5 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/uriky/桌面/NerfingMVS-main/colmap/src -isystem /home/uriky/anaconda3/inude -isystem /usr/include/eigen3 -isystem
/home/uriky/anaconda3/include/qt -isystem
/home/uriky/anaconda3/include/qt/QtCore -isystem
/home/uriky/anaconda3/./mkspecs/linux-g++ -isystem
/home/uriky/anaconda3/include/qt/QtOpenGL -isystem
/home/uriky/anaconda3/include/qt/QtWidgets -isystem
/home/uriky/anaconda3/include/qt/QtGui -isystem
/usr/local/cuda-10.0/include -Wno-deprecated-gpu-targets
–compiler-options -fPIC --use_fast_math --default-stream per-thread -Xptxas=-suppress-stack-size-warning -O3 -DNDEBUG -std=c++14 “–generate-code=arch=compute_89,code=[sm_89]” -Xcompiler=-fPIC -x cu
-c ‘/home/uriky/桌面/NerfingMVS-main/colmap/c/colmap/mvs/gpu_mat_prng.cu’
-o src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o && /usr/local/cuda-10.0/bin/nvcc -DBOOST_ALL_NO_LIB
-DBOOST_FILESYSTEM_DYN_LINK -DBOOST_GRAPH_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCOLMAP_CGAL_ENABLED -DCOLMAP_CUDA_ENABLED -DCOLMAP_GPU_ENABLED -DCOLMAP_GUI_ENABLED -DCOLMAP_OPENGL_ENABLED -DCOLMAP_OPENMP_ENABLED -DGFLAGS_IS_A_DLL=0 -DGLOG_VERSION_MAJOR=0 -DGLOG_VERSION_MINOR=5 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/uriky/桌面/NerfingMVS-main/colmap/src -isystem /home/uriky/anaconda3/include -isystem /usr/include/eigen3 -isystem
/home/uriky/ananda3/include/qt -isystem
/home/uriky/anaconda3/include/qt/QtCore -isystem
/home/uriky/anaconda3/./mkspecs/linux-g++ -isystem
/home/uriky/anaconda3/include/qt/QtOpenGL -isystem
/home/uriky/anaconda3/include/qt/QtWidgets -isystem
/home/uriky/anaconda3/include/qt/QtGui -isystem
/usr/local/cuda-10.0/include -Wno-deprecated-gpu-targets
–compiler-options -fPIC --use_fast_math --default-stream per-thread -Xptxas=-suppress-stack-size-warning -O3 -DNDEBUG -std=c++14 “–generate-code=arch=compute_89,code=[sm_89]” -Xcompiler=-fPIC -x cu
-M ‘/home/uriky/桌面/NerfingMVS-main/colmap/src/colmap/mvs/gpu_mat_prng.cu’
-MT src/colmap/mvs/CMakeFil/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o -o src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o.d nvcc
fatal : Unsupported gpu architecture ‘compute_89’ [59/213] Building
CXX object src/colmap/mvs/CMakeFiles/colmap_mvs.dir/meshing.cc.o In
file included from /usr/include/CGAL/Triangulation_3.h:62:0,
from /usr/include/CGAL/Delaunay_triangulation_3.h:40,
from /home/uriky/桌面/NerfingMVS-main/colmap/src/colmap/mvs/meshing.cc:37:
/home/uriky/anaconda3/include/boost/bind.hpp:41:1: note: #pragma
message: The practice of declaring the Bind placeholders (_1, _2, …)
in the global namespace is deprecated. Please use
<boost/bind/bind.hpp> + using namespace boost::placeholders, or define
BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. ) ^
ninja: build stopped: subcommand failed.
目前来看报错有两个方面
1、nvcc fatal : Unsupported gpu architecture ‘compute_89’
2、/home/uriky/anaconda3/include/boost/bind.hpp:41:1: note: #pragma message: The practice of declaring the Bind placeholders (_1, _2, …) in the global namespace is deprecated. Please use <boost/bind/bind.hpp> + using namespace boost::placeholders, or define BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior.
)
^
ninja: build stopped: subcommand failed.
对于1、应该是cuda版本的问题,以下是电脑的配置,不过实际上目前我使用的cuda版本是10.0的,也下载了11版本的cuda,现在改一下软链接,改成11版本的cuda尝试一下能不能解决这个报错还是报错
[1/155] Building CUDA object
src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o
FAILED:
src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o
/usr/local/cuda-10.0/bin/nvcc -DBOOST_ALL_NO_LIB
-DBOOST_FILESYSTEM_DYN_LINK -DBOOST_GRAPH_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCOLMAP_CGAL_ENABLED -DCOLMAP_CUDA_ENABLED -DCOLMAP_GPU_ENABLED -DCOLMAP_GUI_ENABLED -DCOLMAP_OPENGL_ENABLED -DCOLMAP_OPENMP_ENABLED -DGFLAGS_IS_A_DLL=0 -DGLOG_VERSION_MAJOR=0 -DGLOG_VERSION_MINOR=5 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/uriky/桌面/NerfingMVS-main/cmap/src -isystem /home/uriky/anaconda3/include -isystem /usr/include/eigen3 -isystem
/home/uriky/anaconda3/include/qt -isystem
/home/uriky/anaconda3/include/qt/QtCore -isystem
/home/uriky/anaconda3/./mkspecs/linux-g++ -isystem
/home/uriky/anaconda3/include/qt/QtOpenGL -isystem
/home/uriky/anaconda3/include/qt/QtWidgets -isystem
/home/uriky/anaconda3/include/qt/QtGui -isystem
/usr/local/cuda-10.0/include -Wno-deprecated-gpu-targets
–compiler-options -fPIC --use_fast_math --default-stream per-thread -Xptxas=-suppress-stack-size-warning -O3 -DNDEBUG -std=c++14 “–generate-code=arch=compute_89,code=[sm_89]” -Xcompiler=-fPIC -x cu
-c ‘/home/uriky/桌面/NerfingMVS-main/colmap/src/colmap/mvs/gpu_mat_prng.cu’
-o src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o && /usr/local/cuda-10.0/bin/nvcc -DBOOST_ALL_NO_LIB
-DBOOST_FILESYSTEM_DYN_LINK -DBOOST_GPH_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCOLMAP_CGAL_ENABLED -DCOLMAP_CUDA_ENABLED -DCOLMAP_GPU_ENABLED -DCOLMAP_GUI_ENABLED -DCOLMAP_OPENGL_ENABLED -DCOLMAP_OPENMP_ENABLED -DGFLAGS_IS_A_DLL=0 -DGLOG_VERSION_MAJOR=0 -DGLOG_VERSION_MINOR=5 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/uriky/桌面/NerfingMVS-main/colmap/src -isystem /home/uriky/anaconda3/include -isystem /usr/include/eigen3 -isystem
/he/uriky/anaconda3/include/qt -isystem
/home/uriky/anaconda3/include/qt/QtCore -isystem
/home/uriky/anaconda3/./mkspecs/linux-g++ -isystem
/home/uriky/anaconda3/include/qt/QtOpenGL -isystem
/home/uriky/anaconda3/include/qt/QtWidgets -isystem
/home/uriky/anaconda3/include/qt/QtGui -isystem
/usr/local/cuda-10.0/include -Wno-deprecated-gpu-targets
–compiler-options -fPIC --use_fast_math --default-stream per-thread -Xptxas=-suppress-stack-size-warning -O3 -DNDEBUG -std=c++14 “–generate-code=arch=compute_89,code=[sm_89]” -Xcompiler=-fPIC -x cu
-M ‘/home/uriky/桌面/NerfingMVS-main/colmap/src/colmap/mvs/gpu_mat_prng.cu’
-MT src/colmap/mvs/CMakeFilesolmap_mvs_cuda.dir/gpu_mat_prng.cu.o -o src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_prng.cu.o.d nvcc
fatal : Unsupported gpu architecture ‘compute_89’ [2/155] Building
CUDA object
src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_ref_image.cu.o
FAILED:
src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_ref_image.cu.o
/usr/local/cuda-10.0/bin/nvcc -DBOOST_ALL_NO_LIB
-DBOOST_FILESYSTEM_DYN_LINK -DBOOST_GRAPH_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCOLMAP_CGAL_ENABLED -DCOLMAP_CUDA_ENABLED -DCOLMAP_GPU_ENABLED -DCOLMAP_GUI_ENABLED -DCOLMAP_OPENGL_ENABLED -DCOLMAP_OPENMP_ENABLED -DGFLAGS_IS_A_DLL=0 -DGLOG_VERSION_MAJOR=0 -DGLOG_VERSION_MINOR=5 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/uriky/桌面/NerfingMVS-main/cmap/src -isystem /home/uriky/anaconda3/include -isystem /usr/include/eigen3 -isystem
/home/uriky/anaconda3/include/qt -isystem
/home/uriky/anaconda3/include/qt/QtCore -isystem
/home/uriky/anaconda3/./mkspecs/linux-g++ -isystem
/home/uriky/anaconda3/include/qt/QtOpenGL -isystem
/home/uriky/anaconda3/include/qt/QtWidgets -isystem
/home/uriky/anaconda3/include/qt/QtGui -isystem
/usr/local/cuda-10.0/include -Wno-deprecated-gpu-targets
–compiler-options -fPIC --use_fast_math --default-stream per-thread -Xptxas=-suppress-stack-size-warning -O3 -DNDEBUG -std=c++14 “–generate-code=arch=compute_89,code=[sm_89]” -Xcompiler=-fPIC -x cu
-c ‘/home/uriky/桌面/NerfingMVS-main/colmap/src/colmap/mvs/gpu_mat_ref_image.cu’
-o src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_ref_image.cu.o
&& /usr/local/cuda-10.0/bin/nvcc -DBOOST_ALL_NO_LIB
-DBOOST_FILESYSTEM_DYN_LINKDBOOST_GRAPH_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCOLMAP_CGAL_ENABLED -DCOLMAP_CUDA_ENABLED -DCOLMAP_GPU_ENABLED -DCOLMAP_GUI_ENABLED -DCOLMAP_OPENGL_ENABLED -DCOLMAP_OPENMP_ENABLED -DGFLAGS_IS_A_DLL=0 -DGLOG_VERSION_MAJOR=0 -DGLOG_VERSION_MINOR=5 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/uriky/桌面/NerfingMVS-main/colmap/src -isystem /home/uriky/anaconda3/include -isystem /usr/include/eigen3 -ystem
/home/uriky/anaconda3/include/qt -isystem
/home/uriky/anaconda3/include/qt/QtCore -isystem
/home/uriky/anaconda3/./mkspecs/linux-g++ -isystem
/home/uriky/anaconda3/include/qt/QtOpenGL -isystem
/home/uriky/anaconda3/include/qt/QtWidgets -isystem
/home/uriky/anaconda3/include/qt/QtGui -isystem
/usr/local/cuda-10.0/include -Wno-deprecated-gpu-targets
–compiler-options -fPIC --use_fast_math --default-stream per-thread -Xptxas=-suppress-stack-size-warning -O3 -DNDEBUG -std=c++14 “–generate-code=arch=compute_89,code=[sm_89]” -Xcompiler=-fPIC -x cu
-M ‘/home/uriky/桌面/NerfingMVS-main/colmap/src/colmap/mvs/gpu_mat_ref_image.cu’
-MT src/colmapvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_ref_image.cu.o -o src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/gpu_mat_ref_image.cu.o.d
nvcc fatal : Unsupported gpu architecture ‘compute_89’ [3/155]
Building CUDA object
src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/patch_match_cuda.cu.o
FAILED:
src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/patch_match_cuda.cu.o
/usr/local/cuda-10.0/bin/nvcc -DBOOST_ALL_NO_LIB
-DBOOST_FILESYSTEM_DYN_LINK -DBOOST_GRAPH_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCOLMAP_CGAL_ENABLED -DCOLMAP_CUDA_ENABLED -DCOLMAP_GPU_ENABLED -DCOLMAP_GUI_ENABLED -DCOLMAP_OPENGL_ENABLED -DCOLMAP_OPENMP_ENABLED -DGFLAGS_IS_A_DLL=0 -DGLOG_VERSION_MAJOR=0 -DGLOG_VERSION_MINOR=5 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/uriky/桌面/NerfingMVS-main/cmap/src -isystem /home/uriky/anaconda3/include -isystem /usr/include/eigen3 -isystem
/home/uriky/anaconda3/include/qt -isystem
/home/uriky/anaconda3/include/qt/QtCore -isystem
/home/uriky/anaconda3/./mkspecs/linux-g++ -isystem
/home/uriky/anaconda3/include/qt/QtOpenGL -isystem
/home/uriky/anaconda3/include/qt/QtWidgets -isystem
/home/uriky/anaconda3/include/qt/QtGui -isystem
/usr/local/cuda-10.0/include -Wno-deprecated-gpu-targets
–compiler-options -fPIC --use_fast_math --default-stream per-thread -Xptxas=-suppress-stack-size-warning -O3 -DNDEBUG -std=c++14 “–generate-code=arch=compute_89,code=[sm_89]” -Xcompiler=-fPIC -x cu
-c ‘/home/uriky/桌面/NerfingMVS-main/colmap/src/colmap/mvs/patch_match_cuda.cu’
-o src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/patch_match_cuda.cu.o && /usr/local/cuda-10.0/bin/nvcc -DBOOST_ALL_NO_LIB
-DBOOST_FILESYSTEM_DYN_LINK -DBOOST_GRAPH_DYN_LINK -DBOOST_REGEX_DYN_LINK -DCOLMAP_CGAL_ENABLED -DCOLMAP_CUDA_ENABLED -DCOLMAP_GPU_ENABLED -DCOLMAP_GUI_ENABLED -DCOLMAP_OPENGL_ENABLED -DCOLMAP_OPENMP_ENABLED -DGFLAGS_IS_A_DLL=0 -DGLOG_VERSION_MAJOR=0 -DGLOG_VERSION_MINOR=5 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_NO_DEBUG -DQT_OPENGL_LIB -DQT_WIDGETS_LIB -I/home/uriky/桌面/NerfingMVS-main/colmap/src -isystem /home/uriky/anaconda3/include -isystem /usr/include/eigen3 -ystem
/home/uriky/anaconda3/include/qt -isystem
/home/uriky/anaconda3/include/qt/QtCore -isystem
/home/uriky/anaconda3/./mkspecs/linux-g++ -isystem
/home/uriky/anaconda3/include/qt/QtOpenGL -isystem
/home/uriky/anaconda3/include/qt/QtWidgets -isystem
/home/uriky/anaconda3/include/qt/QtGui -isystem
/usr/local/cuda-10.0/include -Wno-deprecated-gpu-targets
–compiler-options -fPIC --use_fast_math --default-stream per-thread -Xptxas=-suppress-stack-size-warning -O3 -DNDEBUG -std=c++14 “–generate-code=arch=compute_89,code=[sm_89]” -Xcompiler=-fPIC -x cu
-M ‘/home/uriky/桌面/NerfingMVS-main/colmap/src/colmap/mvs/patch_match_cuda.cu’
-MT src/colmap/s/CMakeFiles/colmap_mvs_cuda.dir/patch_match_cuda.cu.o -o src/colmap/mvs/CMakeFiles/colmap_mvs_cuda.dir/patch_match_cuda.cu.o.d
nvcc fatal : Unsupported gpu architecture ‘compute_89’ [14/155]
Building CXX object
src/colmap/scene/CMakeFiles/colmap_scene.dir/camera_rig.cc.o ninja:
build stopped: subcommand failed.
又扯上算力问题了
nvcc fatal : Unsupported gpu architecture ‘compute_89’
nvcc --list-gpu-arch
输入命令行发现根本就没有89的算力
将cuda改成11.8版本之后查询有89的算力,再重复之前的代码
再把cuda版本改成11.8的试一下,再运行代码还是报之前的算力错误,查询cuda版本还是10.0,发现了致命的错误就是为创建的conda虚拟环境中的cuda版本没改变,现在改一下虚拟环境NerfingMVS中的cuda版本,改为11.8在虚拟环境中再source一下就好了

还是报错,说我用的cuda版本还是10.0的
重启了虚拟环境,直接colmap文件都没有了,再重新开始
建议的依赖: CUDA(版本至少7.X)
依赖默认Ubuntu仓库:
sudo apt-get install \
git \
cmake \
ninja-build \
build-essential \
libboost-program-options-dev \
libboost-filesystem-dev \
libboost-graph-dev \
libboost-system-dev \
libeigen3-dev \
libflann-dev \
libfreeimage-dev \
libmetis-dev \
libgoogle-glog-dev \
libgtest-dev \
libsqlite3-dev \
libglew-dev \
qtbase5-dev \
libqt5opengl5-dev \
libcgal-dev \
libceres-dev
配置和编制COLMAP:
git clone https://github.com/colmap/colmap.git
cd colmap
mkdir build
cd build
cmake .. -GNinja
ninja
sudo ninja install
上面重启了虚拟环境之后,算力方面不报错了,但是出现了新的错误(待解决)
[54/213] Building CXX object
src/colmap/exe/CMakeFiles/colmap_exe.dir/sfm.cc.o In file included
from
/home/uriky/anaconda3/include/boost/property_tree/json_parser/detail/parser.hpp:7:0,
from /home/uriky/anaconda3/include/boost/property_tree/json_parser/detail/read.hpp:13,
from /home/uriky/anaconda3/include/boost/property_tree/json_parser.hpp:16,
from /home/uriky/桌面/NerfingMVS-main/colmap/src/colmap/exe/sfm.cc:42:
/home/uriky/anaconda3/include/boost/bind.hpp:41:1: note: #pragma
message: The practice of declaring the Bind placeholders (_1, _2, …)
in the global namespace is deprecated. Please use
<boost/bind/bind.hpp> + using namespace boost::placeholders, or define
BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. ) ^
[135/213] Building CXX object
src/colmap/mvs/CMakeFiles/colmap_mvs.dir/meshing.cc.o In file included
from /usr/include/CGAL/Triangulation_3.h:62:0,
from /usr/include/CGAL/Delaunay_triangulation_3.h:40,
from /home/uriky/桌面/NerfingMVS-main/colmap/src/colmap/mvs/meshing.cc:37:
/home/uriky/anaconda3/include/boost/bind.hpp:41:1: note: #pragma
message: The practice of declaring the Bind placeholders (_1, _2, …)
in the global namespace is deprecated. Please use
<boost/bind/bind.hpp> + using namespace boost::placeholders, or define
BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. ) ^
[193/213] Building CXX object
src/colmap/exe/CMakeFiles/colmap_main.dir/sfm.cc.o In file included
from
/home/uriky/anaconda3/include/boost/property_tree/json_parser/detail/parser.hpp:7:0,
from /home/uriky/anaconda3/include/boost/property_tree/json_parser/detail/read.hpp:13,
from /home/uriky/anaconda3/include/boost/property_tree/json_parser.hpp:16,
from /home/uriky/桌面/NerfingMVS-main/colmap/src/colmap/exe/sfm.cc:42:
/home/uriky/anaconda3/include/boost/bind.hpp:41:1: note: #pragma
message: The practice of declaring the Bind placeholders (_1, _2, …)
in the global namespace is deprecated. Please use
<boost/bind/bind.hpp> + using namespace boost::placeholders, or define
BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. ) ^
[213/213] Linking CXX executable src/colmap/exe/colmap FAILED:
src/colmap/exe/colmap : && /usr/bin/c++ -Wno-maybe-uninitialized
-Wall -O3 -DNDEBUG src/colmap/exe/CMakeFiles/colmap_main.dir/feature.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/sfm.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/colmap.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/database.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/gui.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/image.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/model.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/mvs.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/vocab_tree.cc.o -o
src/colmap/exe/colmap -L/home/uriky/anaconda3/lib
-L/usr/local/cuda-11.8/targets/x86_64-linux/lib/stubs -L/usr/local/cuda-11.8/targets/x86_64-linux/lib -Wl,-rpath,/home/uriky/anaconda3/lib:/usr/local/cuda-11.8/targets/x86_64-linux/lib:
src/colmap/controllers/libcolmap_controllers.a
src/colmap/retrieval/libcolmap_retrieval.a
src/colmap/scene/libcolmap_scene.a src/colmap/sfm/libcolmap_sfm.a
src/colmap/util/libcolmap_util.a
src/colmap/util/libcolmap_util_cuda.a
src/colmap/mvs/libcolmap_mvs_cuda.a src/colmap/ui/libcolmap_ui.a
src/colmap/util/libcolmap_util_cuda.a
src/colmap/controllers/libcolmap_controllers.a
src/colmap/retrieval/libcolmap_retrieval.a
src/colmap/sfm/libcolmap_sfm.a src/colmap/mvs/libcolmap_mvs.a
src/thirdparty/PoissonRecon/libcolmap_poisson_recon.a
/usr/lib/x86_64-linux-gnu/libCGAL.so.13.0.1
/usr/lib/x86_64-linux-gnu/libgmp.so
src/colmap/estimators/libcolmap_estimators.a
src/colmap/feature/libcolmap_feature.a
/usr/lib/x86_64-linux-gnu/libflann.so
/usr/lib/x86_64-linux-gnu/liblz4.so
src/thirdparty/SiftGPU/libcolmap_sift_gpu.a
/usr/local/cuda-11.8/targets/x86_64-linux/lib/libcudart.so -ldl
/usr/lib/x86_64-linux-gnu/librt.so
/usr/local/cuda-11.8/targets/x86_64-linux/lib/libcurand.so
/usr/lib/x86_64-linux-gnu/libGLEW.so
src/colmap/optim/libcolmap_optim.a
/home/uriky/anaconda3/lib/libboost_program_options.so.1.73.0
src/colmap/image/libcolmap_image.a src/colmap/scene/libcolmap_scene.a
src/colmap/feature/libcolmap_feature_types.a
src/colmap/geometry/libcolmap_geometry.a
src/colmap/math/libcolmap_math.a
/usr/lib/x86_64-linux-gnu/libmetis.so
/home/uriky/anaconda3/lib/libboost_graph.so.1.73.0
/home/uriky/anaconda3/lib/libboost_regex.so.1.73.0
src/colmap/sensor/libcolmap_sensor.a src/colmap/util/libcolmap_util.a
/home/uriky/anaconda3/lib/libboost_filesystem.so.1.73.0
/usr/lib/x86_64-linux-gnu/libsqlite3.so
/home/uriky/anaconda3/lib/libglog.so.0.5.0
/home/uriky/anaconda3/lib/libgflags.so.2.2.2
/usr/lib/x86_64-linux-gnu/libGLX.so
/usr/lib/x86_64-linux-gnu/libOpenGL.so /usr/lib/libceres.so.1.13.0
/usr/lib/x86_64-linux-gnu/libglog.so
/home/uriky/anaconda3/lib/libgflags.so.2.2.2 -lpthread
src/thirdparty/VLFeat/libcolmap_vlfeat.a
/usr/lib/gcc/x86_64-linux-gnu/7/libgomp.so -lpthread
/usr/lib/x86_64-linux-gnu/libfreeimage.so
src/thirdparty/LSD/libcolmap_lsd.a
/home/uriky/anaconda3/lib/libQt5OpenGL.so.5.15.2
/home/uriky/anaconda3/lib/libQt5Widgets.so.5.15.2
/home/uriky/anaconda3/lib/libQt5Gui.so.5.15.2
/home/uriky/anaconda3/lib/libQt5Core.so.5.15.2 -lcudadevrt
-lcudart_static -lrt -lpthread -ldl && : /usr/bin/ld: warning: /home/uriky/anaconda3/lib/libstdc++.so: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010001 /usr/bin/ld: warning:
/home/uriky/anaconda3/lib/libstdc++.so: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010002 /usr/bin/ld: warning:
/home/uriky/anaconda3/lib/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010001 /usr/bin/ld: warning:
/home/uriky/anaconda3/lib/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010002 /usr/bin/ld: warning:
/home/uriky/anaconda3/lib/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010001 /usr/bin/ld: warning:
/home/uriky/anaconda3/lib/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010002 /usr/bin/ld: warning:
//home/uriky/anaconda3/lib/libquadmath.so.0: unsupported
GNU_PROPERTY_TYPE (5) type: 0xc0010001 /usr/bin/ld: warning:
//home/uriky/anaconda3/lib/libquadmath.so.0: unsupported
GNU_PROPERTY_TYPE (5) type: 0xc0010002
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘TIFFFieldTag@LIBTIFF_4.0’未定义的引用
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘TIFFFieldName@LIBTIFF_4.0’未定义的引用
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘TIFFFieldReadCount@LIBTIFF_4.0’未定义的引用
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘TIFFFieldPassCount@LIBTIFF_4.0’未定义的引用
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘TIFFFieldDataType@LIBTIFF_4.0’未定义的引用
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘_TIFFDataSize@LIBTIFF_4.0’未定义的引用
/usr/lib/libceres.so.1.13.0:对‘google::kLogSiteUninitialized’未定义的引用
collect2: error: ld returned 1 exit status ninja: build stopped:
subcommand failed.
兄弟们前些天系统崩了现在继续写
CMake Warning at cmake/CMakeHelper.cmake:103 (add_executable):
Cannot generate a safe runtime search path for target colmap_main
because files in some directories may conflict with libraries in
implicit directories:runtime library [libgmp.so.10] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /home/uriky/anaconda3/lib runtime library [liblz4.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /home/uriky/anaconda3/lib runtime library [libsqlite3.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /home/uriky/anaconda3/lib runtime library [libglog.so.0] in /usr/lib/x86_64-linux-gnu may be hidden by files in: /home/uriky/anaconda3/lib runtime library [libgomp.so.1] in /usr/lib/gcc/x86_64-linux-gnu/7 may be hidden by files in: /home/uriky/anaconda3/lib
Some of these libraries may not be found correctly. Call Stack (most
recent call first): src/colmap/exe/CMakeLists.txt:67
(COLMAP_ADD_EXECUTABLE)
方法未能解决警告
方法未能解决警告
111111:把有冲突的库从anaconda3/lib下面的东西移动到别的地方就不冲突了(截图第三行代码有问题,按照代码框执行就可)=============警告已经解决
ls ~/anaconda3/lib/libgmp.so.10
mkdir ~/anaconda3/libfake
mv ~/anaconda3/libgmp.so.10 ~/anaconda3/libfake
cmake .. -GNinja
mv ~/anaconda3/libgmp.so.10 ~/anaconda3/libfake
mv ~/anaconda3/liblz4.so.1 ~/anaconda3/libfake
mv ~/anaconda3/lib/liblz4.so.1 ~/anaconda3/libfake
mv ~/anaconda3/lib/libsqlite3.so.0 ~/anaconda3/libfake
mv ~/anaconda3/lib/libgomp.so.1 ~/anaconda3/libfake
继续:
ninja
[138/213] Building CXX object
src/colmap/mvs/CMakeFiles/colmap_mvs.dir/meshing.cc.o In file included
from /usr/include/CGAL/Triangulation_3.h:62:0,
from /usr/include/CGAL/Delaunay_triangulation_3.h:40,
from /home/uriky/桌面/code/NerfingMVS-main/colmap/src/colmap/mvs/meshing.cc:37:
/home/uriky/anaconda3/include/boost/bind.hpp:41:1: note: #pragma
message: The practice of declaring the Bind placeholders (_1, _2, …)
in the global namespace is deprecated. Please use
<boost/bind/bind.hpp> + using namespace boost::placeholders, or define
BOOST_BIND_GLOBAL_PLACEHOLDERS to retain the current behavior. ) ^
[213/213] Linking CXX executable src/colmap/exe/colmap FAILED:
src/colmap/exe/colmap : && /usr/bin/c++ -Wno-maybe-uninitialized
-Wall -O3 -DNDEBUG src/colmap/exe/CMakeFiles/colmap_main.dir/feature.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/sfm.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/colmap.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/database.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/gui.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/image.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/model.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/mvs.cc.o
src/colmap/exe/CMakeFiles/colmap_main.dir/vocab_tree.cc.o -o
src/colmap/exe/colmap -L/home/uriky/anaconda3/lib
-L/usr/local/cuda-11.8/targets/x86_64-linux/lib/stubs -L/usr/local/cuda-11.8/targets/x86_64-linux/lib -Wl,-rpath,/home/uriky/anaconda3/lib:/usr/local/cuda-11.8/targets/x86_64-linux/lib:
src/colmap/controllers/libcolmap_controllers.a
src/colmap/retrieval/libcolmap_retrieval.a
src/colmap/scene/libcolmap_scene.a src/colmap/sfm/libcolmap_sfm.a
src/colmap/util/libcolmap_util.a
src/colmap/util/libcolmap_util_cuda.a
src/colmap/mvs/libcolmap_mvs_cuda.a src/colmap/ui/libcolmap_ui.a
src/colmap/util/libcolmap_util_cuda.a
src/colmap/controllers/libcolmap_controllers.a
src/colmap/retrieval/libcolmap_retrieval.a
src/colmap/sfm/libcolmap_sfm.a src/colmap/mvs/libcolmap_mvs.a
src/thirdparty/PoissonRecon/libcolmap_poisson_recon.a
/usr/lib/x86_64-linux-gnu/libCGAL.so.13.0.1
/usr/lib/x86_64-linux-gnu/libgmp.so
src/colmap/estimators/libcolmap_estimators.a
src/colmap/feature/libcolmap_feature.a
/usr/lib/x86_64-linux-gnu/libflann.so
/usr/lib/x86_64-linux-gnu/liblz4.so
src/thirdparty/SiftGPU/libcolmap_sift_gpu.a
/usr/local/cuda-11.8/targets/x86_64-linux/lib/libcudart.so -ldl
/usr/lib/x86_64-linux-gnu/librt.so
/usr/local/cuda-11.8/targets/x86_64-linux/lib/libcurand.so
/usr/lib/x86_64-linux-gnu/libGLEW.so
src/colmap/optim/libcolmap_optim.a
/home/uriky/anaconda3/lib/libboost_program_options.so.1.82.0
src/colmap/image/libcolmap_image.a src/colmap/scene/libcolmap_scene.a
src/colmap/feature/libcolmap_feature_types.a
src/colmap/geometry/libcolmap_geometry.a
src/colmap/math/libcolmap_math.a
/usr/lib/x86_64-linux-gnu/libmetis.so
/home/uriky/anaconda3/lib/libboost_graph.so.1.82.0
/home/uriky/anaconda3/lib/libboost_regex.so.1.82.0
src/colmap/sensor/libcolmap_sensor.a src/colmap/util/libcolmap_util.a
/home/uriky/anaconda3/lib/libboost_filesystem.so.1.82.0
/home/uriky/anaconda3/lib/libboost_atomic.so.1.82.0
/usr/lib/x86_64-linux-gnu/libsqlite3.so
/home/uriky/anaconda3/lib/libglog.so.0.5.0
/home/uriky/anaconda3/lib/libgflags.so.2.2.2
/usr/lib/x86_64-linux-gnu/libGLX.so
/usr/lib/x86_64-linux-gnu/libOpenGL.so /usr/lib/libceres.so.1.13.0
/usr/lib/x86_64-linux-gnu/libglog.so
/home/uriky/anaconda3/lib/libgflags.so.2.2.2 -lpthread
src/thirdparty/VLFeat/libcolmap_vlfeat.a
/usr/lib/gcc/x86_64-linux-gnu/7/libgomp.so -lpthread
/usr/lib/x86_64-linux-gnu/libfreeimage.so
src/thirdparty/LSD/libcolmap_lsd.a
/home/uriky/anaconda3/lib/libQt5OpenGL.so.5.15.2
/home/uriky/anaconda3/lib/libQt5Widgets.so.5.15.2
/home/uriky/anaconda3/lib/libQt5Gui.so.5.15.2
/home/uriky/anaconda3/lib/libQt5Core.so.5.15.2 -lcudadevrt
-lcudart_static -lrt -lpthread -ldl && : /usr/bin/ld: warning: /home/uriky/anaconda3/lib/libstdc++.so: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010001 /usr/bin/ld: warning:
/home/uriky/anaconda3/lib/libstdc++.so: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010002 /usr/bin/ld: warning:
/home/uriky/anaconda3/lib/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010001 /usr/bin/ld: warning:
/home/uriky/anaconda3/lib/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010002 /usr/bin/ld: warning:
/home/uriky/anaconda3/lib/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010001 /usr/bin/ld: warning:
/home/uriky/anaconda3/lib/libgcc_s.so.1: unsupported GNU_PROPERTY_TYPE
(5) type: 0xc0010002 /usr/bin/ld: warning:
//home/uriky/anaconda3/lib/libicudata.so.73: unsupported
GNU_PROPERTY_TYPE (5) type: 0xc0010001 /usr/bin/ld: warning:
//home/uriky/anaconda3/lib/libicudata.so.73: unsupported
GNU_PROPERTY_TYPE (5) type: 0xc0010002 /usr/bin/ld: warning:
//home/uriky/anaconda3/lib/libquadmath.so.0: unsupported
GNU_PROPERTY_TYPE (5) type: 0xc0010001 /usr/bin/ld: warning:
//home/uriky/anaconda3/lib/libquadmath.so.0: unsupported
GNU_PROPERTY_TYPE (5) type: 0xc0010002
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘TIFFFieldTag@LIBTIFF_4.0’未定义的引用
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘TIFFFieldName@LIBTIFF_4.0’未定义的引用
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘TIFFFieldReadCount@LIBTIFF_4.0’未定义的引用
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘TIFFFieldPassCount@LIBTIFF_4.0’未定义的引用
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘TIFFFieldDataType@LIBTIFF_4.0’未定义的引用
/usr/lib/x86_64-linux-gnu/libfreeimage.so:对‘_TIFFDataSize@LIBTIFF_4.0’未定义的引用
/usr/lib/libceres.so.1.13.0:对‘google::kLogSiteUninitialized’未定义的引用
collect2: error: ld returned 1 exit status ninja: build stopped:
subcommand failed.
conda uninstall libtiff#卸载libtiff,没用!!!!!!!!!!!!
sudo apt-get install libtiff-dev
成功后进行下一步运行COLMAP:
colmap -h
colmap gui
汇编与 CUDA支助 ,也安装Ubuntu的默认CUDA包:
sudo apt-get install -y \
nvidia-cuda-toolkit \
nvidia-cuda-toolkit-gcc
或者,手动安装最新的CUDA从独的主页。 在CMake配置 指定 CMAKE_CUDA_ARCHITECTURES 为"本土",如果你想要跑COLMAP你 当前的机器,“所有”/“所有主要的”,以便能够将其分发给其他机, 或者一个具体CUDA构,如"75",等等。