Closed itskalvik closed 8 years ago
Hi @kdkalvik,
what operating system do you have and what version of CMake are you using?
I have cmake 3.2.0 and the operating system is ubuntu4tegra and I am running it on a nvidia Jetson TX1 soc. On Feb 25, 2016 1:51 AM, "Michal Uřičář" notifications@github.com wrote:
Hi @kdkalvik https://github.com/kdkalvik,
what operating system do you have and what version of CMake are you using?
— Reply to this email directly or view it on GitHub https://github.com/uricamic/clandmark/issues/40#issuecomment-188658192.
I see, could you please turn verbose output in CMake and send me the compilation line?
ubuntu@tegra-ubuntu:~/clandmark/examples/build$ make VERBOSE=1
/usr/local/bin/cmake -H/home/ubuntu/clandmark/examples -B/home/ubuntu/clandmark/examples/build --check-build-system CMakeFiles/Makefile.cmake 0
/usr/local/bin/cmake -E cmake_progress_start /home/ubuntu/clandmark/examples/build/CMakeFiles /home/ubuntu/clandmark/examples/build/CMakeFiles/progress.marks
make -f CMakeFiles/Makefile2 all
make[1]: Entering directory /home/ubuntu/clandmark/examples/build' make -f CMakeFiles/static_input.dir/build.make CMakeFiles/static_input.dir/depend make[2]: Entering directory
/home/ubuntu/clandmark/examples/build'
cd /home/ubuntu/clandmark/examples/build && /usr/local/bin/cmake -E cmake_depends "Unix Makefiles" /home/ubuntu/clandmark/examples /home/ubuntu/clandmark/examples /home/ubuntu/clandmark/examples/build /home/ubuntu/clandmark/examples/build /home/ubuntu/clandmark/examples/build/CMakeFiles/static_input.dir/DependInfo.cmake --color=
make[2]: Leaving directory /home/ubuntu/clandmark/examples/build' make -f CMakeFiles/static_input.dir/build.make CMakeFiles/static_input.dir/build make[2]: Entering directory
/home/ubuntu/clandmark/examples/build'
Linking CXX executable static_input
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/static_input.dir/link.txt --verbose=1
/usr/bin/c++ CMakeFiles/static_input.dir/static_input.o -o static_input -L/usr/local/cuda/lib -rdynamic -lflandmark /usr/lib/libopencv_objdetect.so.2.4.12 /usr/lib/libopencv_highgui.so.2.4.12 /usr/lib/libopencv_imgproc.so.2.4.12 /usr/lib/libopencv_core.so.2.4.12 /usr/local/cuda/lib/libcudart.so /usr/local/cuda/lib/libnppc.so /usr/local/cuda/lib/libnppi.so /usr/local/cuda/lib/libnpps.so -ldl -lm -lpthread -lrt -ltbb -Wl,-rpath,/usr/local/cuda/lib:
/usr/bin/ld: CMakeFiles/static_input.dir/static_input.o: undefined reference to symbol '_ZN9clandmark12CFeaturePoolD1Ev'
//usr/local/lib/libclandmark.so.1: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: * [static_input] Error 1
make[2]: Leaving directory `/home/ubuntu/clandmark/examples/build'
make[1]: * [CMakeFiles/static_input.dir/all] Error 2
make[1]: Leaving directory`/home/ubuntu/clandmark/examples/build'
make: *\ [all] Error 2
Hmm, this looks strange, I do not see linking to the clandmark dynamic library in this output.
Maybe you could try to modify this line of CMakeLists.txt in examples folder as follows:
target_link_libraries(${var} flandmark clandmark ${OpenCV_LIBS})
I have another problem when I try to run video_input I get the following error ./video_input: error while loading shared libraries: libflandmark.so.1: cannot open shared object file: No such file or directory
Glad to hear that. Thanks for reporting this, I will fix it in the repository as well. For some reason on Ubuntu this was not necessary, although it should have been :)
I see, could you please send me what
ldd video_input | grep flandmark
tells you?
libflandmark.so.1 => not found
Try to copy libflandmark.so
and libclandmark.so
to the same directory where video_input
is and then again do the
ldd video_input | grep flandmark
where can I find the 2 files?
Oh, I see it now, there is a problem with the rpath, It points for you to /usr/local/cuda/lib
so it cannot find these two.
How can I change it
I am looking for the solution now.
Just to make sure, you are doing make
+ make install
?
yes, I followed the instructions in the website.
and what is your CMAKE_INSTALL_PREFIX
?
/usr
and do you see libclandmark.so
and libflandmark.so
in your build/libclandmark
directory?
nope
hmm and somewhere in /usr/lib/cmake/clandmark
?
no its not there. should I just manually copy the .s files I found them in my /usr/local/lib
You can try to copy them, but I guess that won't be enough. Try it though, just for sure.
If I am right, then you should add these lines to the CMakeLists.txt before the foreach
block:
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,'$ORIGIN/' " )
Copying the files to my build folder fixed it. Thank you.
/usr/bin/ld: CMakeFiles/video_input.dir/video_input.cpp.o: undefined reference to symbol '_ZN9clandmark9CLandmark6detectEPN12cimg_library4CImgIhEEPiPd' /usr/local/lib/libclandmark.so.1: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make[2]: * [video_input] Error 1 make[1]: * [CMakeFiles/video_input.dir/all] Error 2 make: *\ [all] Error 2
When I run cmake .. it runs fine but when I run make I get the following errors. I am using CImg and Rapidxml which come with clandmark and I followed the installation instructions for clandmark from the website.