leezu commented on issue #17359: Mxnet doesn't install for R if OpenCV is build 
on linux
URL: 
https://github.com/apache/incubator-mxnet/issues/17359#issuecomment-577331501
 
 
   @shawnbrar how did you generate `opencv4.pc`? I tried compiling OpenCV 4.2 
from source but didn't get a `opencv4.pc`.
   
   In any case, this issue can be fixed by the following patch:
   
   ``` patch
   modified   R-package/src/Makevars
   @@ -1,4 +1,4 @@
    CXX_STD = CXX11
   -PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) `pkg-config --libs opencv`
   -PKG_CFLAGS = `pkg-config --cflags opencv`
   -PKG_CPPFLAGS = -I../inst/include `pkg-config --cflags opencv` `Rscript -e 
'Rcpp:::CxxFlags()'`
   +PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) `(pkg-config --cflags opencv || 
pkg-config --cflags opencv4)`
   +PKG_CFLAGS = `(pkg-config --cflags opencv || pkg-config --cflags opencv4)`
   +PKG_CPPFLAGS = -I../inst/include `(pkg-config --cflags opencv || pkg-config 
--cflags opencv4)` `Rscript -e 'Rcpp:::CxxFlags()'`
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to