Closed vikram-rawat closed 5 years ago
@vikram-rawat Do you have RTools installed on your computer?
I can library ROpenCVLite,but when I try to run devtools::install_github("swarm-lab/Rvision").
Error: Malformed remote specification 'swarm-lab/ROpenCVLite'
@vikram-rawat @shujun1992 Try the new version. It passes all checks on appveyor and installs fine on my Windows testing machine.
I had lib64 instead of lib but: cannot open file '/home/kemal/R/x86_64-suse-linux-gnu-library/3.4/ROpenCVLite/opencv/lib/pkgconfig/opencv.pc': No such file or directory
Any idea?
@kk-1 Did you try removing and reinstalling ROpenCVLite first?
Thanks for your patience!
After many trials, I figured out that for openSUSE Tumbleweed with cuda 9.1, gcc version 4.9.4 is required (works actually). So I just installed ROpenCVLite, which took some time (about 30 - 40 min).
But well although I am not willing, I will try to uninstall and reinstall ROpenCVLite again.
Is it possible to bypass (download it once) downloading the package (opencv 3.4) once and trying to install it again?
Cause it is a big package, about 90MB, and everytime inst. fails, I have to wait for the download.
I also tried to copy lib4/pkgconfig to lib/pkgconfig but I guess there is another problem:
Error in file(file, "rt") : cannot open the connection
Calls:
@kk-1 I do not have access to a machine running openSUSE, so I can't really reproduce the problem. Can you tell me what's under "/home/kemal/R/x86_64-suse-linux-gnu-library/3.4/ROpenCVLite/opencv/"? I wonder if Cmake on openSUSE has different defaults for naming directories than Ubuntu (which is my linux testing system).
I do not recommend moving anything around though.
dir listing of: /home/kemal/R/x86_64-suse-linux-gnu-library/3.4/ROpenCVLite/opencv/ drwxr-xr-x 2 kemal users 4096 Jan 25 21:52 bin drwxr-xr-x 4 kemal users 4096 Jan 25 21:52 include drwxr-xr-x 3 kemal users 4096 Jan 25 21:52 lib64 drwxr-xr-x 3 kemal users 4096 Jan 25 21:52 share
Ok, so the problem is that for some reason Cmake names the library folder lib64 on openSuse and lib on Ubuntu and Mac. It should be fixable, but I won't have much time today or tomorrow.
Please also note that when I change the name of the lib64 to lib, installation goes for a while till: ^ g++-4.9 -shared -L/usr/lib64/R/lib -L/usr/local/lib64 -o Rvision.so RcppExports.o visionModule.o -Wl,-rpath=/home/kemal/R/x86_64-suse-linux-gnu-library/3.4/ROpenCVLite/opencv/lib -L/home/kemal/R/x86_64-suse-linux-gnu-library/3.4/ROpenCVLite/opencv/lib Libs: -L${exec_prefix}/lib64 -lopencv_cudabgsegm -lopencv_cudaobjdetect -lopencv_cudastereo -lopencv_dnn -lopencv_ml -lopencv_shape -lopencv_stitching -lopencv_cudafeatures2d -lopencv_superres -lopencv_cudacodec -lopencv_videostab -lopencv_cudaoptflow -lopencv_cudalegacy -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_photo -lopencv_imgcodecs -lopencv_cudawarping -lopencv_cudaimgproc -lopencv_cudafilters -lopencv_video -lopencv_objdetect -lopencv_imgproc -lopencv_flann -lopencv_cudaarithm -lopencv_core -lopencv_cudev -ldl -lm -lpthread -lrt -lcudart -lnppc -lnppial -lnppicc -lnppicom -lnppidei -lnppif -lnppig -lnppim -lnppist -lnppisu -lnppitc -lnpps -lcublas -lcufft -L-L/my_hd2/my_dir/my_prg/cuda-9.1 -llib64 -llapack -L/usr/lib64/R/lib -lR g++-4.9: error: Libs:: No such file or directory
"Libs" ? some kind of case sensitivity?
@kk-1 You can edit the opencv.pc
file in /usr/lib/R/library/ROpenCVLite/opencv/lib64/pkgconfig/opencv.pc
, before editing the opencv.pc
, change the folder name from lib64
to lib
(the new path is now /usr/lib/R/library/ROpenCVLite/opencv/lib/pkgconfig/opencv.pc
) and in the opencv.pc
replace all lib64
by lib
, it should work. It's not a clean fix, I will see if there's a better way tweaking Makevars.
You should have something like this (tested on Arch Linux)
# Package Information for pkg-config
prefix=/usr/lib/R/library/ROpenCVLite/opencv
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir_old=${prefix}/include/opencv
includedir_new=${prefix}/include
Name: OpenCV
Description: Open Source Computer Vision Library
Version: 3.4.0
Libs: -L${exec_prefix}/lib -lopencv_dnn -lopencv_ml -lopencv_objdetect -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_imgproc -lopencv_flann -lopencv_core
Libs.private: -ldl -lm -lpthread -lrt
Cflags: -I${includedir_old} -I${includedir_new}
Hi Simon. This package looks incredible. But I also can't seem to install it. Do you by any chance know what might be the issue?
devtools::install_github("swarm-lab/Rvision")
Downloading GitHub repo swarm-lab/Rvision@master
from URL https://api.github.com/repos/swarm-lab/Rvision/zipball/master
Installing Rvision
Downloading GitHub repo swarm-lab/ROpenCVLite@master
from URL https://api.github.com/repos/swarm-lab/ROpenCVLite/zipball/master
Installing ROpenCVLite
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore \
--quiet CMD INSTALL \
'/private/var/folders/l3/qm78fw951vg5gc3cd04wm8m80000gn/T/RtmpKjCQpv/devtoolsaa677efe97aa/swarm-lab-ROpenCVLite-55af572' \
--library='/Library/Frameworks/R.framework/Versions/3.4/Resources/library' --install-tests
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
* installing *source* package 'ROpenCVLite' ...
+ set -e
+ mkdir -p inst/tmp
+ mkdir -p inst/opencv/
+ cd inst/tmp/
+ Rscript -e 'download.file("https://github.com/opencv/opencv/archive/3.4.0.zip", "opencv-3.4.0.zip")'
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
trying URL 'https://github.com/opencv/opencv/archive/3.4.0.zip'
Content type 'application/zip' length 91041793 bytes (86.8 MB)
==================================================
downloaded 86.8 MB
+ Rscript -e 'unzip("opencv-3.4.0.zip")'
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
+ cp ../OpenCVModule.cmake opencv-3.4.0/cmake/
+ cd opencv-3.4.0
+ mkdir build
+ cd build
+ cmake -DWITH_IPP=ON -DBUILD_opencv_world=OFF -DBUILD_opencv_contrib_world=OFF -DBUILD_matlab=OFF -DPYTHON_EXECUTABLE=OFF -DINSTALL_CREATE_DISTRIB=ON -DCMAKE_BUILD_TYPE=RELEASE -DCMAKE_INSTALL_PREFIX=/Library/Frameworks/R.framework/Versions/3.4/Resources/library/ROpenCVLite/opencv/ ../
./configure: line 20: cmake: command not found
ERROR: configuration failed for package 'ROpenCVLite'
* removing '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/ROpenCVLite'
Installation failed: Command failed (1)
'/Library/Frameworks/R.framework/Resources/bin/R' --no-site-file --no-environ --no-save --no-restore \
--quiet CMD INSTALL \
'/private/var/folders/l3/qm78fw951vg5gc3cd04wm8m80000gn/T/RtmpKjCQpv/devtoolsaa67618aa854/swarm-lab-Rvision-f226f33' \
--library='/Library/Frameworks/R.framework/Versions/3.4/Resources/library' --install-tests
During startup - Warning messages:
1: Setting LC_CTYPE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
ERROR: dependency 'ROpenCVLite' is not available for package 'Rvision'
* removing '/Library/Frameworks/R.framework/Versions/3.4/Resources/library/Rvision'
Installation failed: Command failed (1)
My session info:
session_info()
Error in session_info() : could not find function "session_info"
> devtools::session_info()
Session info -------------------------------------------------------------------------------------------
setting value
version R version 3.4.3 (2017-11-30)
system x86_64, darwin15.6.0
ui RStudio (1.1.383)
language (EN)
collate C
tz Africa/Johannesburg
date 2018-02-23
Packages -----------------------------------------------------------------------------------------------
package * version date source
base * 3.4.3 2017-12-07 local
base64enc 0.1-3 2015-07-28 CRAN (R 3.4.0)
colorspace 1.3-2 2016-12-14 CRAN (R 3.4.0)
compiler 3.4.3 2017-12-07 local
curl 3.1 2017-12-12 CRAN (R 3.4.3)
datasets * 3.4.3 2017-12-07 local
devtools 1.13.5 2018-02-18 CRAN (R 3.4.3)
digest 0.6.15 2018-01-28 CRAN (R 3.4.3)
ggplot2 2.2.1 2016-12-30 CRAN (R 3.4.0)
git2r 0.21.0 2018-01-04 CRAN (R 3.4.3)
graphics * 3.4.3 2017-12-07 local
grDevices * 3.4.3 2017-12-07 local
grid 3.4.3 2017-12-07 local
gtable 0.2.0 2016-02-26 CRAN (R 3.4.0)
httr 1.3.1 2017-08-20 CRAN (R 3.4.1)
jsonlite 1.5 2017-06-01 CRAN (R 3.4.0)
keras * 2.1.4 2018-02-23 Github (rstudio/keras@c8b24e5)
knitr 1.19 2018-01-29 CRAN (R 3.4.3)
labeling 0.3 2014-08-23 CRAN (R 3.4.0)
lazyeval 0.2.1 2017-10-29 CRAN (R 3.4.2)
magrittr 1.5 2014-11-22 CRAN (R 3.4.0)
memoise 1.1.0 2017-04-21 CRAN (R 3.4.0)
methods * 3.4.3 2017-12-07 local
munsell 0.4.3 2016-02-13 CRAN (R 3.4.0)
pillar 1.1.0 2018-01-14 CRAN (R 3.4.3)
plyr 1.8.4 2016-06-08 CRAN (R 3.4.0)
R6 2.2.2 2017-06-17 CRAN (R 3.4.0)
Rcpp 0.12.15 2018-01-20 CRAN (R 3.4.3)
reshape2 1.4.3 2017-12-11 cran (@1.4.3)
reticulate 1.5 2018-02-14 CRAN (R 3.4.3)
rlang 0.2.0 2018-02-20 cran (@0.2.0)
scales 0.5.0 2017-08-24 CRAN (R 3.4.1)
stats * 3.4.3 2017-12-07 local
stringi 1.1.6 2017-11-17 cran (@1.1.6)
stringr 1.2.0 2017-02-18 CRAN (R 3.4.0)
tensorflow 1.5 2018-01-17 CRAN (R 3.4.3)
tfruns 1.3 2018-02-18 cran (@1.3)
tibble 1.4.2 2018-01-22 CRAN (R 3.4.3)
tools 3.4.3 2017-12-07 local
utils * 3.4.3 2017-12-07 local
whisker 0.3-2 2013-04-28 CRAN (R 3.4.0)
withr 2.1.1 2017-12-19 cran (@2.1.1)
yaml 2.1.16 2017-12-12 CRAN (R 3.4.3)
zeallot 0.1.0 2018-01-28 CRAN (R 3.4.3)
@reidfalconer You're missing Cmake (see https://github.com/swarm-lab/ROpenCVLite#212---mac).
@sjmgarnier I completely glanced over that step. Apologies! I installed it (using Homebrew) and its up and running perfectly! 👍
Does not install on Fedora I had to change the folder name from lib64 to lib as @dickoa suggested which got me further in the installation process but it stopped on some error
g++ -m64 -shared -L/usr/lib64/R/lib -Wl,-z,relro -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -o Rvision.so RcppExports.o visionModule.o -Wl,-rpath=/home/johannes/r/x86_64/library/ROpenCVLite/opencv/lib -L/home/johannes/r/x86_64/library/ROpenCVLite/opencv/lib -lopencv_dnn -lopencv_ml -lopencv_objdetect -lopencv_shape -lopencv_stitching -lopencv_superres -lopencv_videostab -lopencv_calib3d -lopencv_features2d -lopencv_highgui -lopencv_videoio -lopencv_imgcodecs -lopencv_video -lopencv_photo -lopencv_imgproc -lopencv_flann -lopencv_core -ldl -lm -lpthread -lrt -llapack -L/usr/lib64/R/lib -lR
/usr/bin/ld: cannot find -llapack
collect2: error: ld returned 1 exit status
make: *** [/usr/share/R/make/shlib.mk:6: Rvision.so] Error 1
ERROR: compilation failed for package ‘Rvision’
* removing ‘/home/johannes/r/x86_64/library/Rvision’
Installation failed: Command failed (1)
> sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Fedora 28 (Workstation Edition)
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
locale:
[1] LC_CTYPE=is_IS.UTF-8 LC_NUMERIC=C
[3] LC_TIME=is_IS.UTF-8 LC_COLLATE=is_IS.UTF-8
[5] LC_MONETARY=is_IS.UTF-8 LC_MESSAGES=en_GB.UTF-8
[7] LC_PAPER=is_IS.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=is_IS.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] httr_1.3.1 compiler_3.5.1 R6_2.3.0 tools_3.5.1
[5] withr_2.1.2 curl_3.2 memoise_1.1.0 knitr_1.20
[9] git2r_0.23.0 digest_0.6.18 devtools_1.13.6
@vonStadarhraun It looks like you are missing the LAPACK library. I removed it from the compilation flags (not sure it is useful anyway), so it should work now.
Closing this thread because it has become a general purpose forum about non-related installation problems. Please post separate issues in the future. Thanks.
I am getting this error when I try to run devtools::install_github("swarm-lab/Rvision")
Please help me out.