我正在尝试安装此代码https://github.com/NVlabs/ssn_superpixelscmake ..
但在步骤中出现错误
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
所以我删除了构建文件夹,重新创建了它并将 cd 放入其中并运行,cmake .. -DCUDA_cublas_LIBRARY=/usr/lib/x86_64-linux-gnu/libcublas.so.9.1
但现在收到以下消息。
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.
我在CMake 无法解析运行时目录路径find_library
这为和提供了解决方案,find_package
但我的解决方案是add_library
。无论如何,我尝试修复第一个 CMake 警告:
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.
通过编辑 src/caffe/CMakeLists.txt 的第 20 行,将其替换add_library(caffe ${srcs})
为add_library(caffe ${srcs} NO_DEFAULT_PATH)
,但现在收到此消息。
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
我不知道现在该做什么,希望在这里得到一些帮助。