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

Issues installing on MacOS Mojave #16

Open
aaubry89 opened this issue Sep 12, 2019 · 6 comments
Open

Issues installing on MacOS Mojave #16

aaubry89 opened this issue Sep 12, 2019 · 6 comments

Comments

@aaubry89
Copy link

aaubry89 commented Sep 12, 2019

Hello,

I am having some issues installing the software. I am using MacOS Mojave 10.14.6. I am using OpenCV version 4.1.0_1. The error I receive is:

installing to /Library/Frameworks/R.framework/Versions/3.5/Resources/library/wholebrain/libs
** R
** data
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
Error: package or namespace load failed for ‘wholebrain’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/wholebrain/libs/wholebrain.so':
  dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/wholebrain/libs/wholebrain.so, 6): Library not loaded: @rpath/libopencv_calib3d.4.0.dylib
  Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/wholebrain/libs/wholebrain.so
  Reason: image not found

Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/Library/Frameworks/R.framework/Versions/3.5/Resources/library/wholebrain’
Error: Failed to install 'wholebrain' from GitHub:
  (converted from warning) installation of package ‘/var/folders/h7/c6g9qc8j25l92b58yr_jbc2h0000gn/T//RtmpTUVYSu/filea7c527751bbd/wholebrain_0.1.1.tar.gz’ had non-zero exit status`

Any help would be much appreciated. Thank you

@tractatus
Copy link
Owner

Looks like libopencv_calib3d.4.0.dylib is not found.

Did you install OpenCV through ROpenCVLite?

All the best,
Daniel

@aaubry89
Copy link
Author

aaubry89 commented Sep 30, 2019

Hi,
I already had it installed. Would opening R in a separate conda environment and reinstall everything resolve this issue?

@tractatus
Copy link
Owner

Dont know about you environment but the way R looks for the OpenCV shared libraries is through these to commands to try to run in R console and check that the output seems valid:
ROpenCVLite::opencvConfig("libs")
ROpenCVLite::opencvConfig("cflags")

@aaubry89
Copy link
Author

aaubry89 commented Oct 11, 2019

Here is the output I get from those commands

`

ROpenCVLite::opencvConfig("libs")
-L/Library/Frameworks/R.framework/Versions/3.5/Resources/library/opencv/lib -lopencv_calib3d -lopencv_core -lopencv_dnn -lopencv_features2d -lopencv_flann -lopencv_gapi -lopencv_highgui -lopencv_imgcodecs -lopencv_imgproc -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_video -lopencv_videoioWarning message:
In class(object) <- "environment" :
Setting class(x) to "environment" sets attribute to NULL; result will no longer be an S4 object
ROpenCVLite::opencvConfig("cflags")
-I/Library/Frameworks/R.framework/Versions/3.5/Resources/library/opencv/include/opencv4 -I/Library/Frameworks/R.framework/Versions/3.5/Resources/library/opencv/include`

It seems like I have installed opencv using ROpenCVlite, could this be a path issue?

@olawal
Copy link

olawal commented Sep 5, 2020

Hi @aaubry89 Were you able to resolve the issue? I am having the same problem. Thanks.

@sa-blumen
Copy link

Hello, I am trying to download wholebrain into Rstudio on my mac (macOS Monterey v 12.3.1). I have followed the instructions online, but am going in circles when I get to the actual downloading of wholebrain. I keep getting an error message (below) that OpenCV has not been installed. I have tried reinstalling it multiple times (using "installOpenCV()" and "ROpenCVLite::installOpenCV()", but keep getting the same error message. I also tried uninstalling and reinstalling R and Rstudio on my mac. Has anyone run into this problem and figured out how to get wholebrain working on the mac? Thank you in advance for your help! Here is the output/ error message: >devtools::installgithub("tractatus/wholebrain")
Downloading GitHub repo tractatus/wholebrain@HEAD
✔ checking for file ‘/private/var/folders/d/j8h8hmp953d9wlllwdt5qswh0000gq/T/RtmpHJsyUq/remotes23bc733bc2eb/tractatus-wholebrain-1cc9634/DESCRIPTION’ ...
─ preparing ‘wholebrain’:
✔ checking DESCRIPTION meta-information ...
─ cleaning src
─ checking for LF line-endings in source and make files and shell scripts
─ checking for empty or unneeded directories
─ looking to see if a ‘data/datalist’ file should be added
─ building ‘wholebrain_0.1.1.tar.gz’ (2.1s)
installing source package ‘wholebrain’ ...
using staged installation libs
clang++ -arch arm64 -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG pkg-config --cflags fftw3 Rscript -e 'ROpenCVLite::opencvConfig("cflags")' -I'/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/Rcpp/include' -I/opt/R/arm64/include Rscript -e 'Rcpp:::CxxFlags()' -I../inst/include "-std=c++11" -fPIC -falign-functions=64 -Wall -g -O2 -c CThinPlateSpline.cpp -o CThinPlateSpline.o
/bin/sh: pkg-config: command not found
Error in ROpenCVLite::opencvConfig("cflags") :
OpenCV is not installed on this system. Please use installOpenCV() to install it.
Execution halted
CThinPlateSpline.cpp:9:10: fatal error: 'opencv2/opencv.hpp' file not found
include "opencv2/opencv.hpp"
^~~~~~~~~~~~~~~~~~~~
1 error generated.
make: * [CThinPlateSpline.o] Error 1
ERROR: compilation failed for package ‘wholebrain’
removing ‘/Library/Frameworks/R.framework/Versions/4.2-arm64/Resources/library/wholebrain’
Warning message:
In i.p(...) :
installation of package ‘/var/folders/d_/j8h8hmp953d9wlllwdt5qswh0000gq/T//RtmpHJsyUq/file23bc587a0d67/wholebrain_0.1.1.tar.gz’ had non-zero exit status

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

4 participants