Hello
I get "make: *** [PF/dists.o] Error 1" error while trying to install the library
System info
$ uname -a
Linux apsrp07947 3.10.0-1160.2.1.el7.x86_64 #1 SMP Mon Sep 21 21:00:09 EDT 2020 x86_64 x86_64 x86_64 GNU/Linux
$ g++ --version
g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> sessionInfo()
R version 3.6.0 (2019-04-26)
Platform: x86_64-redhat-linux-gnu (64-bit)
Running under: Red Hat Enterprise Linux Server 7.9 (Maipo)
Matrix products: default
BLAS/LAPACK: /usr/lib64/R/lib/libRblas.so
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=en_US.UTF-8
[4] LC_COLLATE=en_US.UTF-8 LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C LC_ADDRESS=C
[10] LC_TELEPHONE=C LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.6.0 tools_3.6.0 remotes_2.4.0
Steps:
1- I installed Rcpp and RcppArmadillo
2- Try to install the library by both install.packages("dynamichazard") and remotes::install_github("boennecd/dynamichazard").
Error log (I used MYDIR to mask the full address):
> install.packages("dynamichazard")
Installing package into ‘<MYDIR>/app/R_Library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/dynamichazard_0.6.8.tar.gz'
Content type 'application/x-gzip' length 4447834 bytes (4.2 MB)
==================================================
downloaded 4.2 MB
* installing *source* package ‘dynamichazard’ ...
** package ‘dynamichazard’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c PF/PF_score_n_Hess.cpp -o PF/PF_score_n_Hess.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c PF/PFs.cpp -o PF/PFs.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c PF/covarmat.cpp -o PF/covarmat.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c PF/resamplers.cpp -o PF/resamplers.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c PF/densities.cpp -o PF/densities.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c PF/cond_approx.cpp -o PF/cond_approx.o
g++ -m64 -std=gnu++11 -I"/usr/include/R" -DNDEBUG -DUSE_FC_LEN_T -I"<MYDIR>/app/R_Library/Rcpp/include" -I"<MYDIR>/app/R_Library/RcppArmadillo/include" -I/usr/local/include -fopenmp -fpic -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -c PF/dists.cpp -o PF/dists.o
PF/dists.cpp:219:0: warning: ignoring #pragma omp declare [-Wunknown-pragmas]
#pragma omp declare reduction(armaVP: arma::vec: omp_out += omp_in)
^
PF/dists.cpp:220:0: warning: ignoring #pragma omp declare [-Wunknown-pragmas]
#pragma omp declare reduction(armaMP: arma::mat: omp_out += omp_in)
^
PF/dists.cpp: In member function ‘arma::vec observational_cdist<T>::gradient(const vec&) const’:
PF/dists.cpp:292:13: error: expected ‘+’, ‘*’, ‘-’, ‘&’, ‘^’, ‘|’, ‘&&’, ‘||’, ‘min’ or ‘max’ before ‘armaVP’
reduction(armaVP:result) firstprivate(first_it)
^
PF/dists.cpp: In member function ‘arma::mat observational_cdist<T>::neg_Hessian(const vec&) const’:
PF/dists.cpp:330:53: error: expected ‘+’, ‘*’, ‘-’, ‘&’, ‘^’, ‘|’, ‘&&’, ‘||’, ‘min’ or ‘max’ before ‘armaMP’
#pragma omp parallel for schedule(static) reduction(armaMP:result) \
^
make: *** [PF/dists.o] Error 1
ERROR: compilation failed for package ‘dynamichazard’
* removing ‘<MYDIR>/app/R_Library/dynamichazard’
Warning in install.packages :
installation of package ‘dynamichazard’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmps7OTdz/downloaded_packages’
Appreciate any words of wisdom that might help to tackle this.
Does the package have any binary version to avoid compilation?
Hello
I get "make: *** [PF/dists.o] Error 1" error while trying to install the library
System infoSteps:
1- I installed Rcpp and RcppArmadillo
2- Try to install the library by both
install.packages("dynamichazard")andremotes::install_github("boennecd/dynamichazard").Error log (I used
MYDIRto mask the full address):Appreciate any words of wisdom that might help to tackle this.
Does the package have any binary version to avoid compilation?