alexeckert / parallelDist

R Package: Parallel Distance Matrix Computation using Multiple Threads
GNU General Public License v2.0
49 stars 9 forks source link

Installing issue on CentOS #1

Closed nickinglis closed 7 years ago

nickinglis commented 7 years ago

I’m trying to install it on CentOS Linux 7 using Microsoft-R Open 3.3.3, and getting the errors below. I’ve tried building on gcc 4.9.2 and 4.8.5. RcppParallel and RcppArmadillo both installed without issue. I’ve tried the source in the tar.gz and from github.

Microsoft R Open 3.3.3 The enhanced R distribution from Microsoft Microsoft packages Copyright (C) 2017 Microsoft Corporation

Using the Intel MKL for parallel mathematical computing(using 2 cores).

Default CRAN mirror snapshot taken on 2017-03-15. See: https://mran.microsoft.com/.

install.packages('~salesmindev/parallelDist/parallelDist_0.1.1.tar.gz') inferring 'repos = NULL' from 'pkgs'

  • installing source package ‘parallelDist’ ... package ‘parallelDist’ successfully unpacked and MD5 sums checked libs I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/Rcpp/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppParallel/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppArmadillo/include" -c DistanceDTWFactory.cpp -o DistanceDTWFactory.o sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory make: [DistanceDTWFactory.o] Error 127 (ignored) I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/Rcpp/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppParallel/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppArmadillo/include" -c DistanceFactory.cpp -o DistanceFactory.o sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory make: [DistanceFactory.o] Error 127 (ignored) I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/Rcpp/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppParallel/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppArmadillo/include" -c RcppExports.cpp -o RcppExports.o sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory make: [RcppExports.o] Error 127 (ignored) I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/Rcpp/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppParallel/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppArmadillo/include" -c Utility.cpp -o Utility.o sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory make: [Utility.o] Error 127 (ignored) I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/Rcpp/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppParallel/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppArmadillo/include" -c parallelDist.cpp -o parallelDist.o sh: I/usr/lib64/microsoft-r/3.3/lib64/R/include: No such file or directory make: [parallelDist.o] Error 127 (ignored) gcc -std=gnu99 -I/usr/lib64/microsoft-r/3.3/lib64/R/include -DNDEBUG -DU_STATIC_IMPLEMENTATION -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/Rcpp/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppParallel/include" -I"/usr/lib64/microsoft-r/3.3/lib64/R/library/RcppArmadillo/include" -fpic -DU_STATIC_IMPLEMENTATION -O2 -g -c parallelDist_init.c -o parallelDist_init.o -shared -L/usr/lib64/microsoft-r/3.3/lib64/R/lib -o parallelDist.so DistanceDTWFactory.o DistanceFactory.o RcppExports.o Utility.o parallelDist.o parallelDist_init.o -L/usr/lib64/microsoft-r/3.3/lib64/R/lib -lRlapack -L/usr/lib64/microsoft-r/3.3/lib64/R/lib -lRblas -lgfortran -lm -L/usr/lib64/microsoft-r/3.3/lib64/R/lib -lR sh: line 2: -shared: command not found make: *** [parallelDist.so] Error 127 ERROR: compilation failed for package ‘parallelDist’
  • removing ‘/usr/lib64/microsoft-r/3.3/lib64/R/library/parallelDist’ Warning message: In install.packages("~salesmindev/parallelDist/parallelDist_0.1.1.tar.gz") : installation of package ‘/home/salesmindev/parallelDist/parallelDist_0.1.1.tar.gz’ had non-zero exit status
nickinglis commented 7 years ago

Does parallelDist depend on R >= 3.4.0? The DESCRIPTION file doesn't say so, but I see a lot of things in the release notes for R 3.4.0 that suggest that it might, and I see that the OS/X package binary was built on R 3.4.0.

alexeckert commented 7 years ago

Hi Nick, this might be a problem with C++11 and Microsoft's R distribution settings (see https://stackoverflow.com/questions/41738088/xgboost-r-package-installation-fails).

In "/usr/lib64/microsoft-r/3.3/lib64/R/etc/Makeconf" set:
CXX1X=gcc -std=c++0x
CXX1XSTD=-std=c++0x -fPIC
nickinglis commented 7 years ago

Worked a charm, thank you! Still getting a warning about OpenMP not being used by this compiler, but the package compiles and the unit tests pass so we're running.