kimtang opened a new issue #7428: Linking error while compiling for R-package in windows URL: https://github.com/apache/incubator-mxnet/issues/7428 For bugs or installation issues, please provide the following information. The more information you provide, the more likely people will be able to help you. ## Environment info Operating System: Windows 10 Compiler: mingw_64 Package used (Python/R/Scala/Julia): R MXNet version: See below Or if installed from source: MXNet commit hash (`git rev-parse HEAD`): 89e3ee3ea7c223db8c65ddd8c94c6e787d7c52df If you are using python package, please provide Python version and distribution: If you are using R package, please provide R `sessionInfo()`: R version 3.4.0 (2017-04-21) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 14393) Matrix products: default locale: [1] LC_COLLATE=English_United Kingdom.1252 [2] LC_CTYPE=English_United Kingdom.1252 [3] LC_MONETARY=English_United Kingdom.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United Kingdom.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] compiler_3.4.0 ## Error Message: Please paste the full error message, including stack trace. > R CMD INSTALL --no-multiarch R-package * installing to library 'C:/Users/kuent/OneDrive/Dokumente/R/win-library/3.4' * installing *source* package 'mxnet' ... ** libs c:/Rtools/mingw_64/bin/g++ -shared -s -static-libgcc -o mxnet.dll tmp.def executor.o export.o im2rec.o io.o kvstore.o mxnet.o ndarray.o symbol.o -LC:/PROGRA~1/R/R-34~1.0/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-34~1.0/bin/x64 -lRblas -L../inst/libs/x64/ -llibmxnet -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-34~1.0/bin/x64 -lR im2rec.o:im2rec.cc:(.text+0x209b): undefined reference to `dmlc::InputSplit::Create(char const*, unsigned int, unsigned int, char const*)' im2rec.o:im2rec.cc:(.text+0x24ce): undefined reference to `dmlc::Stream::Create(char const*, char const*, bool)' im2rec.o:im2rec.cc:(.text+0x2cd8): undefined reference to `dmlc::Stream::Create(char const*, char const*, bool)' im2rec.o:im2rec.cc:(.text+0x2eb1): undefined reference to `cv::imdecode(cv::_InputArray const&, int)' im2rec.o:im2rec.cc:(.text+0x3048): undefined reference to `cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)' im2rec.o:im2rec.cc:(.text+0x3140): undefined reference to `cv::fastFree(void*)' im2rec.o:im2rec.cc:(.text+0x3208): undefined reference to `cv::fastFree(void*)' im2rec.o:im2rec.cc:(.text+0x3310): undefined reference to `cv::resize(cv::_InputArray const&, cv::_OutputArray const&, cv::Size_<int>, double, double, int)' im2rec.o:im2rec.cc:(.text+0x339e): undefined reference to `cv::imencode(cv::String const&, cv::_InputArray const&, std::vector<unsigned char, std::allocator<unsigned char> >&, std::vector<int, std::allocator<int> > const&)' im2rec.o:im2rec.cc:(.text+0x33a8): undefined reference to `cv::String::deallocate()' im2rec.o:im2rec.cc:(.text+0x34d8): undefined reference to `cv::fastFree(void*)' im2rec.o:im2rec.cc:(.text+0x356d): undefined reference to `cv::fastFree(void*)' im2rec.o:im2rec.cc:(.text+0x35ab): undefined reference to `dmlc::RecordIOWriter::WriteRecord(void const*, unsigned long long)' im2rec.o:im2rec.cc:(.text+0x3c3c): undefined reference to `cv::String::allocate(unsigned long long)' im2rec.o:im2rec.cc:(.text+0x3c65): undefined reference to `cv::Mat::copySize(cv::Mat const&)' im2rec.o:im2rec.cc:(.text+0x3ce0): undefined reference to `cv::Mat::Mat(cv::Mat const&, cv::Range const&, cv::Range const&)' im2rec.o:im2rec.cc:(.text+0x3dd1): undefined reference to `cv::fastFree(void*)' im2rec.o:im2rec.cc:(.text+0x3e9d): undefined reference to `cv::fastFree(void*)' im2rec.o:im2rec.cc:(.text+0x3eaa): undefined reference to `cv::Mat::deallocate()' im2rec.o:im2rec.cc:(.text+0x3eb7): undefined reference to `cv::Mat::deallocate()' im2rec.o:im2rec.cc:(.text+0x3fa5): undefined reference to `cv::Mat::copyTo(cv::_OutputArray const&) const' im2rec.o:im2rec.cc:(.text+0x40a0): undefined reference to `cv::fastFree(void*)' im2rec.o:im2rec.cc:(.text+0x416c): undefined reference to `cv::fastFree(void*)' im2rec.o:im2rec.cc:(.text+0x4253): undefined reference to `cv::Mat::copyTo(cv::_OutputArray const&) const' im2rec.o:im2rec.cc:(.text+0x4350): undefined reference to `cv::fastFree(void*)' im2rec.o:im2rec.cc:(.text+0x441c): undefined reference to `cv::fastFree(void*)' im2rec.o:im2rec.cc:(.text+0x44de): undefined reference to `cv::Mat::deallocate()' im2rec.o:im2rec.cc:(.text+0x44eb): undefined reference to `cv::Mat::deallocate()' im2rec.o:im2rec.cc:(.text+0x48c9): undefined reference to `cv::Mat::deallocate()' im2rec.o:im2rec.cc:(.text+0x48d6): undefined reference to `cv::Mat::deallocate()' im2rec.o:im2rec.cc:(.text+0x54c9): undefined reference to `cv::String::deallocate()' im2rec.o:im2rec.cc:(.text$_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv]+0x15): undefined reference to `cv::String::deallocate()' im2rec.o:im2rec.cc:(.text$_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_]+0x10): undefined reference to `cv::String::deallocate()' im2rec.o:im2rec.cc:(.text$_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE4moveEPKPvPS5_]+0x23): undefined reference to `cv::String::deallocate()' im2rec.o:im2rec.cc:(.text$_ZN2cv3MatD1Ev[_ZN2cv3MatD1Ev]+0x91): undefined reference to `cv::Mat::deallocate()' im2rec.o:im2rec.cc:(.text$_ZN2cv3MatD1Ev[_ZN2cv3MatD1Ev]+0x75): undefined reference to `cv::fastFree(void*)' collect2.exe: error: ld returned 1 exit status no DLL was created ERROR: compilation failed for package 'mxnet' ## Minimum reproducible example if you are using your own code, please provide a short script that reproduces the error. ## Steps to reproduce or if you are running standard examples, please provide the commands you have run that lead to the error. 1. Compile Mxnet and copy the libmxnet.dll to ~/mxnet/R-package/inst/libs/x64 2. R CMD INSTALL --no-multiarch R-package ## What have you tried to solve it? 1. Get familiar with R-package first to understand how to pass additional object to R command. 2. 3. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on 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