magsac
magsac copied to clipboard
Make Error!!! Missing header file!!
Hello,everyone,Why the project I downloaded is missing some header files???????????? Can someone post me? like this:
-- The CXX compiler identification is GNU 7.5.0 -- Check for working CXX compiler: /usr/local/bin/c++ -- Check for working CXX compiler: /usr/local/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done CMake Warning (dev) at CMakeLists.txt:9 (option): Policy CMP0077 is not set: option() honors normal variables. Run "cmake --help-policy CMP0077" for policy details. Use the cmake_policy command to set the policy and suppress this warning.
For compatibility with older versions of CMake, option is clearing the normal variable 'CREATE_SAMPLE_PROJECT'. This warning is for project developers. Use -Wno-dev to suppress it.
-- Found OpenCV: /opt/ros/kinetic (found version "3.3.1")
Found Gflags 2.2.2
-- > GFLAGS_INCLUDE_DIR: /usr/local/include
-- > GFLAGS_LIBRARIES: gflags_shared
Glog library found.
-- Found OpenMP_CXX: -fopenmp (found version "4.5")
-- Found OpenMP: TRUE (found version "4.5")
-- The C compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PythonInterp: /usr/bin/python3.5 (found version "3.5.1")
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.5m.so
-- pybind11 v2.1.1
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- Performing Test HAS_CPP11_FLAG
-- Performing Test HAS_CPP11_FLAG - Success
-- Performing Test HAS_FLTO
-- Performing Test HAS_FLTO - Success
-- LTO enabled
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jjb/envirement/magsac/build
jjb@jjb:~/envirement/magsac/build$ make
Scanning dependencies of target GraphCutRANSAC
[ 5%] Building CXX object CMakeFiles/GraphCutRANSAC.dir/graph-cut-ransac/src/pygcransac/include/GCoptimization.cpp.o
[ 10%] Building CXX object CMakeFiles/GraphCutRANSAC.dir/graph-cut-ransac/src/pygcransac/include/LinkedBlockList.cpp.o
[ 15%] Building CXX object CMakeFiles/GraphCutRANSAC.dir/graph-cut-ransac/src/pygcransac/include/gamma_values.cpp.o
/home/jjb/envirement/magsac/graph-cut-ransac/src/pygcransac/include/gamma_values.cpp:1:9: 警告:#pragma once 出现在主文件中
#pragma once
^~~~
[ 21%] Building CXX object CMakeFiles/GraphCutRANSAC.dir/graph-cut-ransac/src/pygcransac/include/graph.cpp.o
[ 26%] Building CXX object CMakeFiles/GraphCutRANSAC.dir/graph-cut-ransac/src/pygcransac/include/maxflow.cpp.o
[ 31%] Building CXX object CMakeFiles/GraphCutRANSAC.dir/graph-cut-ransac/src/pygcransac/include/relative_pose/bundle.cpp.o
[ 36%] Building CXX object CMakeFiles/GraphCutRANSAC.dir/graph-cut-ransac/src/pygcransac/include/relative_pose/colmap_models.cpp.o
[ 42%] Building CXX object CMakeFiles/GraphCutRANSAC.dir/graph-cut-ransac/src/pygcransac/include/relative_pose/essential.cpp.o
[ 47%] Linking CXX static library libGraphCutRANSAC.a
[ 47%] Built target GraphCutRANSAC
Scanning dependencies of target pymagsac
[ 52%] Building CXX object CMakeFiles/pymagsac.dir/src/pymagsac/src/bindings.cpp.o
[ 57%] Building CXX object CMakeFiles/pymagsac.dir/src/pymagsac/src/magsac_python.cpp.o
/home/jjb/envirement/magsac/src/pymagsac/src/magsac_python.cpp:3:10: 致命错误:fundamental_estimator.h:没有那个文件或目录
#include "fundamental_estimator.h"
Hey @JonnyG123789 were you able to fix this issue. Please let me know I am to facing the same problem.@danini Can you please help with this?
I updated the Graph-Cut RANSAC submodule and put some files into new folders. Apparently, I forgot to update the location in MAGSAC++. I will soon commit it, but you can easily fix this by replacing #include "fundamental_estimator.h" with #include "estimators/fundamental_estimator.h"
I updated the Graph-Cut RANSAC submodule and put some files into new folders. Apparently, I forgot to update the location in MAGSAC++. I will soon commit it, but you can easily fix this by replacing #include "fundamental_estimator.h" with #include "estimators/fundamental_estimator.h"
Thanks for the reply.
Hey, @danini I have cloned your newly updated repo I tried to build using - make -. it was almost complete but at the last found the below error which I couldn't understand can you please help me to fix this error.
[ 89%] Building CXX object CMakeFiles/pymagsac.dir/src/pymagsac/include/magsac.cpp.o [ 94%] Building CXX object CMakeFiles/pymagsac.dir/src/pymagsac/include/model_score.cpp.o [100%] Linking CXX shared module pymagsac.cpython-37m-x86_64-linux-gnu.so /usr/bin/ld: libGraphCutRANSAC.a(colmap_models.cpp.o): relocation R_X86_64_PC32 against symbol `_ZN8pose_lib15NullCameraModel9focal_idxE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/pymagsac.dir/build.make:193: pymagsac.cpython-37m-x86_64-linux-gnu.so] Error 1 make[1]: *** [CMakeFiles/Makefile2:185: CMakeFiles/pymagsac.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
Hey, @danini I have cloned your newly updated repo I tried to build using - make -. it was almost complete but at the last found the below error which I couldn't understand can you please help me to fix this error.
[ 89%] Building CXX object CMakeFiles/pymagsac.dir/src/pymagsac/include/magsac.cpp.o [ 94%] Building CXX object CMakeFiles/pymagsac.dir/src/pymagsac/include/model_score.cpp.o [100%] Linking CXX shared module pymagsac.cpython-37m-x86_64-linux-gnu.so /usr/bin/ld: libGraphCutRANSAC.a(colmap_models.cpp.o): relocation R_X86_64_PC32 against symbol `_ZN8pose_lib15NullCameraModel9focal_idxE' can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: final link failed: bad value collect2: error: ld returned 1 exit status make[2]: *** [CMakeFiles/pymagsac.dir/build.make:193: pymagsac.cpython-37m-x86_64-linux-gnu.so] Error 1 make[1]: *** [CMakeFiles/Makefile2:185: CMakeFiles/pymagsac.dir/all] Error 2 make: *** [Makefile:91: all] Error 2
I think you may fix this by adding “-fPIC” feature in the CMakeLists.txt of Graph-Cut RANSAC submodule.