Unable to build Binary for target dso_dataset (libgdcmMSFF.so.2.8 Undefined refernce) and conflict with libraries in implicit directories

不羁的心 提交于 2020-07-10 06:54:18

问题


I am trying to build a binary target called dso_dataset. I follow this Github page to run some software. I faced a warning while cmake .. but ignored and went on to do make, but at the end recipe for target failed.

output of command cmake .. is below

(base) gok4abt@ABTZ0KUV:~/dso/build$ sudo cmake ..
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is GNU 7.5.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0") 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Boost version: 1.65.1
-- Found the following Boost libraries:
--   system
--   thread
--   chrono
--   date_time
--   atomic
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found LIBZIP: /usr/local/lib/libzip.so  
--- found PANGOLIN, compiling dso_pangolin library.
--- found OpenCV, compiling dso_opencv library.
--- found ziplib (1.1.1), compiling with zip capability.
--- compiling dso_dataset.
-- Configuring done
CMake Warning at CMakeLists.txt:127 (add_executable):
  Cannot generate a safe runtime search path for target dso_dataset because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libpng16.so.16] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/gok4abt/anaconda3/lib
    runtime library [libz.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/gok4abt/anaconda3/lib
    runtime library [libtiff.so.5] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/gok4abt/anaconda3/lib
    runtime library [liblz4.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/gok4abt/anaconda3/lib

  Some of these libraries may not be found correctly.


-- Generating done
-- Build files have been written to: /home/gok4abt/dso/build

After cmake .. command, I ignored the warning and did sudo make -j4, below is output of make

(base) gok4abt@ABTZ0KUV:~/dso/build$  sudo make -j4

`Scanning dependencies of target dso

[  8%] Building CXX object CMakeFiles/dso.dir/src/FullSystem/FullSystemOptPoint.cpp.o
[  8%] Building CXX object CMakeFiles/dso.dir/src/FullSystem/FullSystem.cpp.o
[ 16%] Building CXX object CMakeFiles/dso.dir/src/FullSystem/FullSystemOptimize.cpp.o
[ 16%] Building CXX object CMakeFiles/dso.dir/src/FullSystem/FullSystemDebugStuff.cpp.o
[ 20%] Building CXX object CMakeFiles/dso.dir/src/FullSystem/FullSystemMarginalize.cpp.o
[ 24%] Building CXX object CMakeFiles/dso.dir/src/FullSystem/Residuals.cpp.o
[ 28%] Building CXX object CMakeFiles/dso.dir/src/FullSystem/CoarseTracker.cpp.o
[ 32%] Building CXX object CMakeFiles/dso.dir/src/FullSystem/CoarseInitializer.cpp.o
[ 36%] Building CXX object CMakeFiles/dso.dir/src/FullSystem/ImmaturePoint.cpp.o
[ 40%] Building CXX object CMakeFiles/dso.dir/src/FullSystem/HessianBlocks.cpp.o
[ 44%] Building CXX object CMakeFiles/dso.dir/src/FullSystem/PixelSelector2.cpp.o
[ 48%] Building CXX object CMakeFiles/dso.dir/src/OptimizationBackend/EnergyFunctional.cpp.o
[ 52%] Building CXX object CMakeFiles/dso.dir/src/OptimizationBackend/AccumulatedTopHessian.cpp.o
[ 56%] Building CXX object CMakeFiles/dso.dir/src/OptimizationBackend/AccumulatedSCHessian.cpp.o
[ 60%] Building CXX object CMakeFiles/dso.dir/src/OptimizationBackend/EnergyFunctionalStructs.cpp.o
[ 64%] Building CXX object CMakeFiles/dso.dir/src/util/settings.cpp.o
[ 68%] Building CXX object CMakeFiles/dso.dir/src/util/Undistort.cpp.o
[ 72%] Building CXX object CMakeFiles/dso.dir/src/util/globalCalib.cpp.o
[ 76%] Building CXX object CMakeFiles/dso.dir/src/IOWrapper/OpenCV/ImageDisplay_OpenCV.cpp.o
[ 80%] Building CXX object CMakeFiles/dso.dir/src/IOWrapper/OpenCV/ImageRW_OpenCV.cpp.o
[ 84%] Building CXX object CMakeFiles/dso.dir/src/IOWrapper/Pangolin/KeyFrameDisplay.cpp.o
[ 88%] Building CXX object CMakeFiles/dso.dir/src/IOWrapper/Pangolin/PangolinDSOViewer.cpp.o
[ 92%] Linking CXX static library lib/libdso.a
[ 92%] Built target dso
Scanning dependencies of target dso_dataset
[ 96%] Building CXX object CMakeFiles/dso_dataset.dir/src/main_dso_pangolin.cpp.o

[100%] Linking CXX executable bin/dso_dataset

//usr/lib/x86_64-linux-gnu/libgdcmMSFF.so.2.8: undefined reference to `uuid_generate@UUID_1.0'
//usr/lib/x86_64-linux-gnu/libgdcmMSFF.so.2.8: undefined reference to `uuid_parse@UUID_1.0'
//usr/lib/x86_64-linux-gnu/libgdcmMSFF.so.2.8: undefined reference to `uuid_unparse@UUID_1.0'

collect2: error: ld returned 1 exit status
CMakeFiles/dso_dataset.dir/build.make:171: recipe for target 'bin/dso_dataset' failed
make[2]: *** [bin/dso_dataset] Error 1
CMakeFiles/Makefile2:104: recipe for target 'CMakeFiles/dso_dataset.dir/all' failed
make[1]: *** [CMakeFiles/dso_dataset.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2`

来源:https://stackoverflow.com/questions/62390133/unable-to-build-binary-for-target-dso-dataset-libgdcmmsff-so-2-8-undefined-refe

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!