## Description

Building the R package fails if OpenCV is disabled.

## Environment info (Required)

Debian Stable (stretch). R installed from CRAN Debian packages (version 3.5.1). 
CUDA tools installed from Debian Backports repository. All other tools, 
including the necessary dependencies, installed from Debian Stretch repository 
(gcc 6.3).

## Minimum reproducible example

`(git clone --recursive https://github.com/apache/incubator-mxnet; cd 
incubator-mxnet; time make -j $(nproc) USE_OPENCV=0 USE_BLAS=openblas 
USE_CUDA=1 USE_CUDA_PATH=/usr/lib/nvidia-cuda-toolkit && make rpkg)`

fails with the following error:

```
[…]
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
Error: package or namespace load failed for ‘mxnet’:
 .onLoad failed in loadNamespace() for 'mxnet', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object 
'/home/liori/R/x86_64-pc-linux-gnu-library/3.5/mxnet/libs/mxnet.so':
  /home/liori/R/x86_64-pc-linux-gnu-library/3.5/mxnet/libs/mxnet.so: undefined 
symbol: _ZTVN2cv11_InputArrayE
Error: loading failed
Execution halted
ERROR: loading failed
* removing ‘/home/liori/R/x86_64-pc-linux-gnu-library/3.5/mxnet’
* restoring previous ‘/home/liori/R/x86_64-pc-linux-gnu-library/3.5/mxnet’
Makefile:568: polecenia dla obiektu 'rpkg' nie powiodły się
make: *** [rpkg] Błąd 1
```

Changing `USE_OPENCV=0` to `USE_OPENCV=1` makes the package build correctly 
without any errors.

If the R package requires OpenCV itself, I believe this should be just 
documented on the 
http://mxnet.incubator.apache.org/install/ubuntu_setup.html#install-the-mxnet-package-for-r
 webpage.

[ Full content available at: 
https://github.com/apache/incubator-mxnet/issues/12491 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to