gadomski/cpd

Problem with building cpd-0.2

alexsmartens opened this issue · 3 comments

Hi,
I have tried to build cpd-0.2, but have not had a chance to finish the build. Could you help to fix this issue, please
Thank you!

I'm having the following error:

cmake ..
-- The CXX compiler identification is GNU 5.4.0
-- The C compiler identification is GNU 5.4.0
-- 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
-- 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
-- No build type specified, setting to Release
-- cpd version EAD-HASH-NOTFOUND
-- Found Armadillo: /usr/lib/libarmadillo.so (found suitable version "6.500.5", minimum required is "4.500.1")
-- Found Figtree: /home/alex/Downloads/figtree-master/
-- Figtree found (include: /home/alex/Downloads/figtree-master/include/, lib: /home/alex/Downloads/figtree-master/)
-- Found PythonInterp: /usr/bin/python (found version "2.7.12")
-- 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
-- Configuring done
WARNING: Target "cpd-lib" requests linking to directory "/home/alex/Downloads/figtree-master/". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "cpd-lib" requests linking to directory "/home/alex/Downloads/figtree-master/". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "cpd-test" requests linking to directory "/home/alex/Downloads/figtree-master/". Targets may link only to libraries. CMake is dropping the item.
WARNING: Target "cpd-performance" requests linking to directory "/home/alex/Downloads/figtree-master/". Targets may link only to libraries. CMake is dropping the item.
-- Generating done
-- Build files have been written to: /home/alex/Downloads/cpd-0.2/build

$ make
Scanning dependencies of target cpd-lib
[ 3%] Building CXX object src/CMakeFiles/cpd-lib.dir/affinity_eigenvectors.cpp.o
[ 6%] Building CXX object src/CMakeFiles/cpd-lib.dir/affinity_matrix.cpp.o
[ 9%] Building CXX object src/CMakeFiles/cpd-lib.dir/find_P.cpp.o
[ 12%] Building CXX object src/CMakeFiles/cpd-lib.dir/nonrigid.cpp.o
[ 16%] Building CXX object src/CMakeFiles/cpd-lib.dir/nonrigid_lowrank.cpp.o
[ 19%] Building CXX object src/CMakeFiles/cpd-lib.dir/registration.cpp.o
[ 22%] Building CXX object src/CMakeFiles/cpd-lib.dir/rigid.cpp.o
[ 25%] Building CXX object src/CMakeFiles/cpd-lib.dir/sigma2.cpp.o
[ 29%] Building CXX object src/CMakeFiles/cpd-lib.dir/version.cpp.o
[ 32%] Linking CXX shared library ../lib/libcpd.so
[ 32%] Built target cpd-lib
Scanning dependencies of target gtest
[ 35%] Building CXX object vendor/gtest-1.7.0/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 38%] Linking CXX shared library ../../lib/libgtest.so
[ 38%] Built target gtest
Scanning dependencies of target gtest_main
[ 41%] Building CXX object vendor/gtest-1.7.0/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[ 45%] Linking CXX shared library ../../lib/libgtest_main.so
[ 45%] Built target gtest_main
Scanning dependencies of target cpd-test
[ 48%] Building CXX object test/CMakeFiles/cpd-test.dir/config.cpp.o
[ 51%] Building CXX object test/CMakeFiles/cpd-test.dir/affinity_eigenvectors_test.cpp.o
[ 54%] Building CXX object test/CMakeFiles/cpd-test.dir/affinity_matrix_test.cpp.o
[ 58%] Building CXX object test/CMakeFiles/cpd-test.dir/exceptions_test.cpp.o
[ 61%] Building CXX object test/CMakeFiles/cpd-test.dir/find_P_test.cpp.o
[ 64%] Building CXX object test/CMakeFiles/cpd-test.dir/nonrigid_lowrank_test.cpp.o
[ 67%] Building CXX object test/CMakeFiles/cpd-test.dir/nonrigid_test.cpp.o
[ 70%] Building CXX object test/CMakeFiles/cpd-test.dir/rigid_test.cpp.o
[ 74%] Building CXX object test/CMakeFiles/cpd-test.dir/sigma2_test.cpp.o
[ 77%] Building CXX object test/CMakeFiles/cpd-test.dir/version_test.cpp.o
[ 80%] Building CXX object test/CMakeFiles/cpd-test.dir/arma_64bit_test.cpp.o
[ 83%] Linking CXX executable ../bin/cpd-test
../lib/libcpd.so.EAD-HASH-NOTFOUND: undefined reference to `figtree'
collect2: error: ld returned 1 exit status
test/CMakeFiles/cpd-test.dir/build.make:358: recipe for target 'bin/cpd-test' failed
make[2]: *** [bin/cpd-test] Error 1
CMakeFiles/Makefile2:274: recipe for target 'test/CMakeFiles/cpd-test.dir/all' failed
make[1]: *** [test/CMakeFiles/cpd-test.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Hm, looks like a bug in the v0.2 branch regarding the naming of the dynamic libraries. Before I fix, any particular reason you're building v0.2? The latest version is v0.5.0, and all of my active development is happening off of there.

Hi Pete,
yeah, I am building the v0.2 branch. I am interested in non-rigid transformation (although affine transform might also work). Your description says that I need to go along with the v0.2 branch if I need non-rigid transformation.
I have tested quite a few ICP approaches, no one seems to work in my case. I think CPD non-rigid or affine would be good for my particular purpose.

Should I keep using the v0.2 branch or you suggest to build the v0.2 one?

I have actually just fixed the problem. I manually added the path to the dynamic library of figtree to the CmakeLists

Glad you fixed the problem. v0.5.0 includes both nonrigid and affine, but is missing nonrigid_lowrank (#57), which is a faster version of the nonrigid transformation. I'd recommend using v0.5.0 if at all possible, as it's a more mature and better-tested version of the library.

Since it sounds like you've figured out your acute issue, I'm closing this ticket. Thanks for using cpd, let me know how it goes!