gadomski / cpd

C++ implementation of the Coherent Point Drift point set registration algorithm.
http://www.gadom.ski/cpd
GNU General Public License v2.0
401 stars 124 forks source link

Installation failing #40

Closed dnicolella closed 9 years ago

dnicolella commented 9 years ago

Hi,

I am having trouble installing the cpd package. I am attempting to install on a Mac running OS X 10.11.1. I followed the following steps: Using brew: installed armadillo installed flags

then downloaded fgt using git installed following the instructions: $ mkdir build $ cd build $ cmake .. -DCMAKE_BUILD_TYPE=Release $ make

no errors.

downloaded cpd using git

executed: $mkdir cpd/build && cd cpd/build then $cmake .. -DBUILD_CLI=ON

this is where things failed with the following error:

-- cpd version EAD-HASH-NOTFOUND -- cpd options: ARMA_64BIT_WORD: ON ARMA_NO_DEBUG: OFF BUILD_DEBUG_OUTPUT: OFF CMake Error at CMakeLists.txt:66 (find_package): By not providing "FindFgt.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "Fgt", but CMake did not find one.

Could not find a package configuration file provided by "Fgt" (requested version 0.2.0) with any of the following names:

FgtConfig.cmake
fgt-config.cmake

Add the installation prefix of "Fgt" to CMAKE_PREFIX_PATH or set "Fgt_DIR" to a directory containing one of the above files. If "Fgt" provides a separate development package or SDK, be sure it has been installed.

-- Configuring incomplete, errors occurred!

Then, I modified the CMakeLists.txt file in the cpd/build directory to add the line:

set(Fgt_DIR "/Users/dnicolella-mbp/Documents/CoherentPointDrift/C_plus/fgt/build")

Now I get the following error:

-- cpd version 0.2.2-63-g02aea6b -- cpd options: ARMA_64BIT_WORD: ON ARMA_NO_DEBUG: OFF BUILD_DEBUG_OUTPUT: OFF CMake Error at /Users/dnicolella-mbp/Documents/CoherentPointDrift/fgt/build/FgtConfig.cmake:23 (include): include could not find load file:

/Users/dnicolella-mbp/Documents/CoherentPointDrift/fgt/build/FgtTargets.cmake

Call Stack (most recent call first): CMakeLists.txt:66 (find_package)

-- Found PythonInterp: //anaconda/bin/python (found version "2.7.10") -- Looking for include file pthread.h -- Looking for include file pthread.h - found -- Looking for pthread_create -- Looking for pthread_create - found -- Found Threads: TRUE
-- Configuring incomplete, errors occurred!

It seems that I am missing something here - I don't think I want to be adding machine specific paths to the cmake files.

Any help in solving this issue would be greatly appreciated.

(I am not a programmer, so I may be missing something obvious, and for that I apologize in advance).

Best Regards, Dan Nicolella

dnicolella commented 9 years ago

I got this to (almost) work by installing both fgt and cod in /usr/local and running sudo make install for both packages.

Now, I get the error: [ 96%] Linking CXX executable ../bin/cpd ld: library not found for -lgflags-static clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: * [bin/cpd] Error 1 make[1]: * [cli/CMakeFiles/Cli.dir/all] Error 2 make: *\ [all] Error 2

Any ideas on fixing this?

Thanks for your time.

Dan

gadomski commented 9 years ago

Dan,

Thanks for the bug report. Due to #39, cpd does not currently build against Homebrew's gflags (the missing library that's causing your latest problems). You can either build and install gflags yourself (http://gflags.github.io/gflags/) or disable the command-line executable in cpd by setting BUILD_CLI=OFF in your CMake configuration.

HTH.

dnicolella commented 9 years ago

Thanks! I installed gflags myself and that did the trick.

Best Regards, Dan


Dan Nicolella, Ph.D. Institute Engineer Manager, Musculoskeletal Biomechanics Section Southwest Research Institute 6220 Culebra Road, San Antonio, TX 78238 voice: (210) 522-3222, fax: (210) 522-6220 www.swri.orghttp://www.swri.org

On Oct 22, 2015, at 4:45 PM, Pete Gadomski notifications@github.com<mailto:notifications@github.com> wrote:

Dan,

Thanks for the bug report. Due to #39https://urldefense.proofpoint.com/v2/url?u=https-3Agithub.com_gadomski_cpd_issues_39&d=BQMCaQ&c=l_IU86Q8JTGnHn9K9kRmRlrLmhfeE6S9tCyr6T8mzvM&r=UDJPlzH23jKCaTXcJqte56r9_X0Q42XfJrrr9SD-nVQ&m=LhHZeVMOpRSXF7SPKY9zNqcWWHBJl1tz7KXwpAXq0pY&s=lTP-XoZOuBfvsgIuem6WS83yfiwnUXxSdRq6DQ93IBU&e=, cpd does not currently build against Homebrew's gflags (the missing library that's causing your latest problems). You can either build and install gflags yourself (http://gflags.github.io/gflags/https://urldefense.proofpoint.com/v2/url?u=http-3Agflags.github.iogflags&d=BQMCaQ&c=l_IU86Q8JTGnHn9K9kRmRlrLmhfeE6S9tCyr6T8mzvM&r=UDJPlzH23jKCaTXcJqte56r9_X0Q42XfJrrr9SD-nVQ&m=LhHZeVMOpRSXF7SPKY9zNqcWWHBJl1tz7KXwpAXq0pY&s=WYUCvEB04xcOKI35cS9HAmNxsgyq5vUhp3nZ6FwXbdY&e=) or disable the command-line executable in cpd by setting BUILD_CLI=OFF in your CMake configuration.

HTH.

— Reply to this email directly or view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_gadomski_cpd_issues_40-23issuecomment-2D150365347&d=BQMCaQ&c=l_IU86Q8JTGnHn9K9kRmRlrLmhfeE6S9tCyr6T8mzvM&r=UDJPlzH23jKCaTXcJqte56r9_X0Q42XfJrrr9SD-nVQ&m=LhHZeVMOpRSXF7SPKY9zNqcWWHBJl1tz7KXwpAXq0pY&s=LYqYwKV1_tkeB_4wsfgJX1xyj44zdI4uMRz5P70aUx8&e=.