swarm-lab / trackR

trackR - A simple video tracking software for R
https://swarm-lab.github.io/trackR/
GNU General Public License v3.0
30 stars 9 forks source link

Installation error #7

Closed rkadrian closed 5 years ago

rkadrian commented 5 years ago
System information (version)
Detailed description

Forgive me if I have made any mistakes in this message--I'm a GitHub newb. I enjoy R but I'm not the most literate with the nuts and bolts of software.

I followed the installation instructions for Mac (which involved installing CMake and Xcode), and I have updated my operating system, R, and RStudio. However, when I attempt to install trackR, I receive the following error when attempting to install ROpenCVLite. Any ideas? Thank you!

> devtools::install_github("swarm-lab/trackR")
Downloading GitHub repo swarm-lab/trackR@master
Downloading GitHub repo swarm-lab/ROpenCVLite@master
✔  checking for file ‘/private/var/folders/54/77m_hflx6zg823c2jcp4qy6w0000gn/T/RtmpKsgYvy/remotes4bd67976f3e/swarm-lab-ROpenCVLite-095a43b/DESCRIPTION’ ...
─  preparing ‘ROpenCVLite’:
✔  checking DESCRIPTION meta-information ...
─  cleaning src
─  running ‘cleanup’
─  checking for LF line-endings in source and make files and shell scripts
─  checking for empty or unneeded directories
─  building ‘ROpenCVLite_0.1.34.3.tar.gz’

* installing *source* package ‘ROpenCVLite’ ...
+ set -e
+ cd ./src
+ /Library/Frameworks/R.framework/Resources/bin/Rscript -e 'download.file("https://github.com/opencv/opencv/archive/3.4.3.zip", "opencv-3.4.3.zip")'
trying URL 'https://github.com/opencv/opencv/archive/3.4.3.zip'
Content type 'application/zip' length 91708600 bytes (87.5 MB)
==================================================
downloaded 87.5 MB

+ /Library/Frameworks/R.framework/Resources/bin/Rscript -e 'unzip("opencv-3.4.3.zip")'
+ cp ../inst/window_cocoa.mm opencv-3.4.3/modules/highgui/src/
+ cp OpenCVModule.3.4.3.cmake opencv-3.4.3/cmake/OpenCVModule.cmake
+ cd opencv-3.4.3
+ mkdir build
+ cd build
+ cmake -DWITH_IPP=ON -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DBUILD_opencv_matlab=OFF -DBUILD_opencv_java=OFF -DBUILD_opencv_python2=OFF -DBUILD_opencv_python3=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_TESTS=OFF -DINSTALL_CREATE_DISTRIB=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ROpenCVLite/opencv/ ../
./configure: line 18: cmake: command not found
Warning in system(cmd) : error in running command
ERROR: configuration failed for package ‘ROpenCVLite’
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/ROpenCVLite’
Error in i.p(...) : 
  (converted from warning) installation of package ‘/var/folders/54/77m_hflx6zg823c2jcp4qy6w0000gn/T//RtmpKsgYvy/file4bd7a684c8f/ROpenCVLite_0.1.34.3.tar.gz’ had non-zero exit status
sjmgarnier commented 5 years ago

@rkadrian It looks like R cannot find cmake. There are multiple reasons that can explain this, so let's start by clearing up the obvious. Can you please quit R and RStudio, and then reboot your computer? Once this is done, open a terminal and type cmake --version. If the result is something along the lines of cmake version 3.12.4, then open RStudio and try reinstalling trackR. If cmake --version returns an error, please post the error message here.

rkadrian commented 5 years ago

Yes, it definitely cannot find cmake. Trying "cmake --version" in terminal yields "command not found". CMake is sitting in my application folder and opens an interface when I run it. Should I move the application elsewhere? Thank you! (This is after restarting the computer)

sjmgarnier commented 5 years ago

@rkadrian How did you install cmake? It looks like it wasn't added to the path.

sjmgarnier commented 5 years ago

@rkadrian If you used the installer distributed on cmake.org, it looks like you need to do the following (according to: https://stackoverflow.com/questions/30668601/installing-cmake-command-line-tools-on-a-mac). Open a terminal and type:

sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install

rkadrian commented 5 years ago

That fixed the issue--I did use the installer from cmake.org. Installation is complete!! Thanks so much! My ignorance showed: I clearly did not know the correct question to pose to Google to fix the (simple) issue.

sjmgarnier commented 5 years ago

@rkadrian Glad this fixed your problem. I will add this to the installation instructions for ROpenCVLite.