Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Issue on MXNet R installation with GPU support on Windows #8936

Description

@nicolasjamet

Description

When following the installation tutorial : https://gist.github.com/thirdwing/89aa9bfc588ade138496e6932072152c, the step : R CMD INSTALL --no-multiarch R-package returns
"Error: compilation failed for package 'mxnet'" ( several errors including : compiler and library support for the ISO C++ 2011 standard, im2rec.cc:20:30: fatal error, make: *** [im2rec.o] Error 1,...)

Environment info (Required)

Windows 10
GPU : GeForce GTX 1080 Ti
R 3.3.2
Rtools 3.4
Visual Studio 14
Cuda 9
Cudnn 7
OpenCV 3.3.1
prebuilt GPU-enabled MXNet libraries :
-> 20171204_mxnet_x64_vc141_gpu_cu90
-> prebuildbase_win10_x64_vc14_v2

All environment variables seem to be well defined.
For Rtools, paths are : C:\Rtools\mingw_64\bin & C:\Rtools\bin

R sessionInfo:

R version 3.3.2 (2016-10-31)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

locale:
[1] LC_COLLATE=French_Switzerland.1252 LC_CTYPE=French_Switzerland.1252 LC_MONETARY=French_Switzerland.1252
[4] LC_NUMERIC=C LC_TIME=French_Switzerland.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

loaded via a namespace (and not attached):
[1] tools_3.3.2

Error Message:

c:\mxnet>R CMD INSTALL --no-multiarch R-package

  • installing to library 'C:/R-3.3.2/library'
  • installing source package 'mxnet' ...
    ** libs
    c:/Rtools/mingw_64/bin/g++ -I"C:/R-3.3.2/include" -DNDEBUG -I../inst/include -I"C:/R-3.3.2/library/Rcpp/include" -I"C:/TDM-GCC-64//include" -O2 -Wall -mtune=core2 -c executor.cc -o executor.o
    In file included from executor.cc:9:0:
    ./base.h: In function 'std::string mxnet::R::toPyString(const string&, const RObject&)':
    ./base.h:276:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (size_t i = 0; i < vec.size(); ++i) {
    ^
    ./base.h: In function 'std::vector mxnet::R::Dim2InternalShape(const Rcpp::Dimension&)':
    ./base.h:340:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (size_t i = 0; i < rshape.size(); ++i) {
    ^
    executor.cc: In static member function 'static void mxnet::R::Executor::UpdateArray(const char*, const List&, Rcpp::List*, bool, bool)':
    executor.cc:43:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (size_t i = 0; i < from.size(); ++i) {
    ^
    executor.cc: In static member function 'static Rcpp::List mxnet::R::Executor::CloneArray(const List&)':
    executor.cc:87:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (size_t i = 0; i < src.size(); ++i) {
    ^
    executor.cc: In function 'Rcpp::List* mxnet::R::CreateArrayList(const List&, const string&, const std::vector<std::basic_string >&, const RObjectType&, std::vector<void*>)':
    executor.cc:123:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (size_t i = 0; i < source_array.size(); ++i) {
    ^
    executor.cc: In function 'Rcpp::List
    mxnet::R::CreateGradList(const List&, const List&, const std::vector<std::basic_string >&, const RObjectType&, std::vector<void*>, std::vector)':
    executor.cc:155:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (size_t i = 0; i < grad_reqs.size(); ++i) {
    ^
    c:/Rtools/mingw_64/bin/g++ -I"C:/R-3.3.2/include" -DNDEBUG -I../inst/include -I"C:/R-3.3.2/library/Rcpp/include" -I"C:/TDM-GCC-64//include" -O2 -Wall -mtune=core2 -c export.cc -o export.o
    In file included from export.cc:9:0:
    ./base.h: In function 'std::string mxnet::R::toPyString(const string&, const RObject&)':
    ./base.h:276:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (size_t i = 0; i < vec.size(); ++i) {
    ^
    ./base.h: In function 'std::vector mxnet::R::Dim2InternalShape(const Rcpp::Dimension&)':
    ./base.h:340:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (size_t i = 0; i < rshape.size(); ++i) {
    ^
    export.cc: In static member function 'static void mxnet::R::Exporter::Export(const string&)':
    export.cc:92:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
    for (size_t i = 0; i < func_names.size(); ++i) {
    ^
    c:/Rtools/mingw_64/bin/g++ -I"C:/R-3.3.2/include" -DNDEBUG -I../inst/include -I"C:/R-3.3.2/library/Rcpp/include" -I"C:/TDM-GCC-64//include" -O2 -Wall -mtune=core2 -c im2rec.cc -o im2rec.o
    In file included from C:/Rtools/mingw_64/x86_64-w64-mingw32/include/c++/random:35:0,
    from im2rec.cc:14:
    C:/Rtools/mingw_64/x86_64-w64-mingw32/include/c++/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO C++ 2011 standard. This support is currently experimental, and must be enabled with the -std=c++11 or -std=gnu++11 compiler options.
    #error This file requires compiler and library support for the
    ^

    In file included from ../inst/include/dmlc/io.h:14:0,
    from im2rec.cc:16:
    ../inst/include/dmlc/./logging.h:67:3: warning: identifier 'nullptr' is a keyword in C++11 [-Wc++0x-compat]
    LogCheckError() : str(nullptr) {}
    ^
    im2rec.cc:20:30: fatal error: opencv2/opencv.hpp: No such file or directory
    #include <opencv2/opencv.hpp>

    ^
    compilation terminated.
    make: *** [im2rec.o] Error 1
    Warning: l'exécution de la commande 'make -f "Makevars.win" -f "C:/R-3.3.2/etc/x64/Makeconf" -f "C:/R-3.3.2/share/make/winshlib.mk" SHLIB_LDFLAGS='$(SHLIB_CXXLDFLAGS)' SHLIB_LD='$(SHLIB_CXXLD)' SHLIB="mxnet.dll" WIN=64 TCLBIN=64 OBJECTS="executor.o export.o im2rec.o io.o kvstore.o mxnet.o ndarray.o symbol.o"' renvoie un statut 2
    ERROR: compilation failed for package 'mxnet'
  • removing 'C:/R-3.3.2/library/mxnet'

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions