#StackBounty: #cmake Cannot generate a safe runtime search path for target caffe because files in some directories may conflict with li…

Bounty: 50

I am trying to install this code https://github.com/NVlabs/ssn_superpixels but get an error at the cmake .. step

CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
CUDA_cublas_LIBRARY (ADVANCED)
    linked by target "caffe" in directory /home/haziq/ASTAR/scripts/ssn_superpixels/lib/video_prop_networks/lib/caffe/src/caffe

So I deleted the build folder, recreated it and cd into it and ran cmake .. -DCUDA_cublas_LIBRARY=/usr/lib/x86_64-linux-gnu/libcublas.so.9.1 but now get the following messages.

CMake Warning at src/caffe/CMakeLists.txt:20 (add_library):
  Cannot generate a safe runtime search path for target caffe because files
  in some directories may conflict with libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at src/caffe/test/CMakeLists.txt:29 (add_executable):
  Cannot generate a safe runtime search path for target test.testbin because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target extract_features
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target device_query because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target convert_imageset
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target test_net because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target net_speed_benchmark
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target compute_image_mean
  because files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target train_net because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target finetune_net because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target
  upgrade_net_proto_binary because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target
  upgrade_net_proto_text because files in some directories may conflict with
  libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target
  upgrade_solver_proto_text because files in some directories may conflict
  with libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at tools/CMakeLists.txt:14 (add_executable):
  Cannot generate a safe runtime search path for target caffe.bin because
  files in some directories may conflict with libraries in implicit
  directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.


CMake Warning at python/CMakeLists.txt:9 (add_library):
  Cannot generate a safe runtime search path for target pycaffe because files
  in some directories may conflict with libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.

I found a post here CMake cannot resolve runtime directory path that provides a solution for find_library and find_package but mine is add_library. Anyway I tried fixing the first CMake warning

CMake Warning at src/caffe/CMakeLists.txt:20 (add_library):
  Cannot generate a safe runtime search path for target caffe because files
  in some directories may conflict with libraries in implicit directories:

    runtime library [libsnappy.so.1] in /usr/lib/x86_64-linux-gnu may be hidden by files in:
      /home/haziq/anaconda3/envs/ssn/lib

  Some of these libraries may not be found correctly.

by editing line 20 of src/caffe/CMakeLists.txt by replacing add_library(caffe ${srcs}) with add_library(caffe ${srcs} NO_DEFAULT_PATH) but now get this message.

CMake Error at src/caffe/CMakeLists.txt:20 (add_library):
  Cannot find source file:

    NO_DEFAULT_PATH

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx

What can I try next?


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.