Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"library not found for -lippicv" during installation process #4

Open
124bit opened this issue Feb 16, 2016 · 16 comments
Open

"library not found for -lippicv" during installation process #4

124bit opened this issue Feb 16, 2016 · 16 comments

Comments

@124bit
Copy link

124bit commented Feb 16, 2016

Hello,
The command devtools::install_github("swarm-lab/videoplayR") throws the following:
ld: library not found for -lippicv
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [videoplayR.so] Error 1
ERROR: compilation failed for package ‘videoplayR’
I am running RStudio Version 0.99.491 @ OS X Version 10.11.3. Pls find details of the error in the attachment:
videoplayeR_error_installation.txt
Pls advise. Thanks, Lev

@sjmgarnier
Copy link
Member

@124bit It seems to be a problem with the update to OpenCV 3.1. I'll investigate this as soon as I can. In the meantime, can you try reverting to OpenCV 3.0?

@Dvomedo
Copy link

Dvomedo commented Mar 27, 2016

Any news on this? I have the same issue. I would like to try with OpenCV 3.0, but furthest I've managed to get is:
brew switch opencv3 0
Error: opencv3 does not have a version "0" in the Cellar.
Versions available: 3.1.0_2

@sjmgarnier
Copy link
Member

@Dvomedo I didn't get a chance to look into this yet. In the meantime you can install openCV 3.0.0 by copying the following line in your terminal:

brew install https://raw.githubusercontent.com/Homebrew/homebrew-science/d154fff3192ab13bb69b0b7cb5b297a947a565e2/opencv3.rb

This points towards the latest version of the formula on Github that was referencing openCV 3.0.0. You will also probably need to pin this formula to prevent it from being upgraded every time you run brew upgrade. You can do this by entering brew pin opencv3 in your terminal (use brew unpin opencv3 when you want to resume normal upgrades for this formula).

@Dvomedo
Copy link

Dvomedo commented Mar 27, 2016

@sjmgarnier Thanks a lot Simon! This has worked.
Everything after went as described in your documentation. Thanks for the quick reply and even more for the library.

@sjmgarnier
Copy link
Member

@Dvomedo No problem. I hope I find the time to solve this compilation problem with newer versions of OpenCV.

@sjmgarnier
Copy link
Member

@124bit @Dvomedo FYI, this is the source of the problem: opencv/opencv#6338. Hopefully this will be fixed next time OpenCV is updated on homebrew.

@sjmgarnier sjmgarnier changed the title trouble during the installation process "library not found for -lippicv" during installation process Apr 2, 2016
@sjmgarnier
Copy link
Member

@124bit @Dvomedo Removing -lippicv from opencv.pc solved the compilation problem. It's more a workaround than a fix, but it'll do until the problem is solved by the OpenCV dev team.

@ruapekapeka
Copy link

I may have a continuation problem, or one related to versions of R. However, I downgraded my opencv version to 3.0.0 by downloading the binary, re-running CMake and building and installing the package from scratch. I could find no way to remove opencv 3.1 but assumed the install would overwrite. Once successfully installed I re-ran the installation of the videoplayR module. It got further than last attempt so it would appear that I successfully solved the -lippicv issue of before, however now the installation proceeds until the point where it is testing to see if the installed package can be loaded. It decides no, offering the following error messages:
installing to /Library/Frameworks/R.framework/Versions/3.2/Resources/library/videoplayR/libs
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/Library/Frameworks/R.framework/Versions/3.2/Resources/library/videoplayR/libs/videoplayR.so':
dlopen(/Library/Frameworks/R.framework/Versions/3.2/Resources/library/videoplayR/libs/videoplayR.so, 6): Library not loaded: lib/libopencv_shape.3.0.dylib
Referenced from: /Library/Frameworks/R.framework/Versions/3.2/Resources/library/videoplayR/libs/videoplayR.so
Reason: image not found
Error: loading failed
Execution halted
ERROR: loading failed
Error: Command failed (1)

  • removing ‘/Library/Frameworks/R.framework/Versions/3.2/Resources/library/videoplayR’

Oups.

I running a iMac (64 bit early) with OS X El Capitan (v 10.11.4), my R version is 3.2.4.
So, progress but not yet over the finish line. All assistance gratefully received.
Peter

@sjmgarnier
Copy link
Member

@ruapekapeka It looks like your OpenCV installation is missing some components or is not properly detected (do you have pkg-config on your system). I don't recommend installing OpenCV from scratch. As explained in the vignette, I recommend for Mac using a package manager like Homebrew (my personal choice) or MacPorts to install OpenCV and pkg-config.

@ruapekapeka
Copy link

Thanks Simon, yes, things had got into a bit of a pickle. I have successfully installed videoplayR now however. Steps taken (incase anyone else ends up in this position)

  1. Uninstalled everything: "brew uninstall opencv3" - this assumes pkg-config is properly installed and can be left in place
  2. Re-install using homebrew making sure to point it to the 3.0.0 version (as per above) - the first attempt without this explicitly called installed the latest (3.1) version of opencv so "brew install https://raw.githubusercontent.com/Homebrew/homebrew-science/d154fff3192ab13bb69b0b7cb5b297a947a565e2/opencv3.rb"
  3. Pin this version of opencv "brew pin opencv3"
  4. Recreate the symlinks using the "--overwrite" option, and not forgetting "--force"
  5. Continue with the R installation of videoplayR as previously outlined

@sjmgarnier
Copy link
Member

@124bit @Dvomedo @ruapekapeka There is a solution to this problem here: http://www.learnopencv.com/install-opencv-3-on-yosemite-osx-10-10-x/

Find ippicv: find /usr/local -name "libippicv.a"
Make a symlink to /usr/local/lib: ln -s /some/path/OpenCV/3rdparty/lib/libippicv.a /usr/local/lib/

@jsheen
Copy link

jsheen commented Nov 3, 2017

Hi everyone! I have tried what @ruapekapeka has suggested but am running into an error message in step 2. The error is listed as a "SHA256 mismatch," and also lists:
Expected: da51a4e459b0bcbe14fb847c4f168415f421765fb91996f42b9e1ce0575f05d5
Actual: 4dd618de44852b21f0f63709e648567b33b85de07ff2abdeb53fd4edafae2692

I was wondering if anyone had any suggestions on downloading the older OpenCV 3.0.0 version? I think that it may have something to do with homebrew switching things around, such that opencv is listed in homebrew-core rather than homebrew-science, and only includes the latest version of OpenCV.

@sjmgarnier
Copy link
Member

IMPORTANT NOTICE

I have stopped developing videoplayR. Instead, I have created two libraries to replace it:

  1. ROpenCVLite: this library downloads, compiles, and installs OpenCV within the R library in a standardized location across Mac, Windows, and Linux. It doesn't provide any computer vision functions directly, but allows developers to create packages using OpenCV without having to worry about the platform of the end-user.
  2. Rvision: this library depends on ROpenCVLite and provides computer vision functions somewhat similar to the discontinued videoplayR package.

Besides making sure that OpenCV is installed in a standardized location across platforms, this new organization also allows updating Rvision frequently without having to recompile OpenCV every time, like it was happening with videoplayR (ROpenCVLite needs reinstalling only when a new release of OpenCV becomes available).

I recommend that you try out the two new packages instead (they should both install fine on Windows), and report bugs, feature requests, and comments on their respective repository. I don't have much time at the moment to push their development, but it'll be helpful to know what people have a need for when I get back to it.

@Sheethalvr
Copy link

Hello,

Does the 'videoplayR' package works on mac OS or do I use ROpenCVLite and Rvision?
In the latter case, R doesn't find any package named - Rvision.
I'm currently using Mac OS Catalina version 10.15.4 and RStudio version - 3.6.1

Any leads would be very grateful.

@sjmgarnier
Copy link
Member

@Sheethalvr videoplayR is not developed anymore. Please use ROpenCVLite and Rvision instead. Rvision has not been released on CRAN and can be installed following the instructions on the package's website at: https://swarm-lab.github.io/Rvision/articles/z1_install.html

@Sheethalvr
Copy link

@sjmgarnier Thank you Simon for the quick help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants