dpasqualin / sfreemap

A Simulation Free approach for Stochastic Mapping
https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-017-1554-7
7 stars 4 forks source link

error installing sfreemap #17

Closed Giu1ia closed 3 years ago

Giu1ia commented 4 years ago

Hi, I am trying to install sfreemap on a OS 10.13.6, R 3.6.3, from GitHub but I got this error:


install_github('dpasqualin/sfreemap') Downloading GitHub repo dpasqualin/sfreemap@master ✓ checking for file ‘/private/var/folders/0y/pdllgj192pj_cml_43_ms_jr0000gn/T/Rtmp9RVJBh/remotes2553dc614ac/dpasqualin-sfreemap-b207dc6/DESCRIPTION’ ... ─ preparing ‘sfreemap’: ✓ checking DESCRIPTION meta-information ... ─ cleaning src ─ installing the package to process help pages

─ installing source package ‘sfreemap’ ... using staged installation libs /usr/local/clang4/usr/local/clang4/bin/clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppArmadillo/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fopenmp -fPIC -Wall -g -O2 -c RcppExports.cpp -o RcppExports.o /usr/local/clang4/usr/local/clang4/bin/clang++ -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppArmadillo/include" -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fopenmp -fPIC -Wall -g -O2 -c sfreemap.cpp -o sfreemap.o /usr/local/clang4/usr/local/clang4/bin/clang++ -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/clang4/usr/local/clang4/lib -o sfreemap.so RcppExports.o sfreemap.o -fopenmp -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation R data * moving datasets to lazyload DB inst byte-compile and prepare package for lazy loading * help installing help indices building package indices installing vignettes ** testing if installed package can be loaded from temporary location Error: package or namespace load failed for ‘sfreemap’ in library.dynam(lib, package, package.lib): shared object ‘sfreemap.so’ not found Errore: loading failed Esecuzione interrotta ERROR: loading failed ─ removing ‘/private/var/folders/0y/pdllgj192pj_cml_43_ms_jr0000gn/T/RtmpEg0dP9/Rinst31d3cdc5d7c/sfreemap’

ERROR: package installation failed Errore: Failed to install 'sfreemap' from GitHub: System command 'R' failed, exit status: 1, stdout + stderr (last 10 lines): E> installing vignettes E> testing if installed package can be loaded from temporary location E> Error: package or namespace load failed for ‘sfreemap’ in library.dynam(lib, package, package.lib): E> shared object ‘sfreemap.so’ not found E> Errore: loading failed E> Esecuzione interrotta E> ERROR: loading failed E> * removing ‘/private/var/folders/0y/pdllgj192pj_cml_43_ms_jr0000gn/T/RtmpEg0dP9/Rinst31d3cdc5d7c/sfreemap’ E> ----------------------------------- E> ERROR: package installation failed


I tried also to install it from CRAN, but the response is that "package ‘sfreemap’ is not available (for R version 3.6.3)". I tried with earlier versions (3.1 and 3.3) same error.

Do you have any solution to bypass these errors?

Thanks

prisilveira commented 4 years ago

[windows] I've also tried to install from both CRAN and github... followed the step-by-step on the page and R (v 3.5.1, 4.0.1, 3.6.3) hasn't been able to install the package.

dpasqualin commented 4 years ago

Hi, sorry it took so long to answer. I haven't updated CRAN with recent changes in the package, so I'd suggest using the source on github from now. @Giu1ia , unfortunately I don't have OSX and don't know any one who has it, also the message given by R is not so clear on what steps to do so at this point I don't know how to help you :(

@prisilveira I recently made an update to fix installation issues on Windows. Could you please provide the error message you are receiving? I'll try to fix as soon as possible.

prisilveira commented 4 years ago

[V. 4.0.1] WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 4.0.1 was found. (Only the following incompatible version(s) of Rtools were found:3.4,3.5) Please download and install Rtools custom from https://cran.r-project.org/bin/windows/Rtools/. Downloading GitHub repo dpasqualin/sfreemap@master WARNING: Rtools is required to build R packages, but no version of Rtools compatible with R 4.0.1 was found. (Only the following incompatible version(s) of Rtools were found:3.4,3.5) Please download and install Rtools custom from https://cran.r-project.org/bin/windows/Rtools/. Error: Failed to install 'sfreemap' from GitHub: Could not find tools necessary to compile a package Call pkgbuild::check_build_tools(debug = TRUE) to diagnose the problem.

  [v. 3.6.1] & [v.3.6.3] I noticed there is also a problem with the package‘mnormt’ I've tried many different R version and the Error message I get is below:

Downloading GitHub repo dpasqualin/sfreemap@master Skipping 1 packages not available: mnormt Installing 36 packages: RcppArmadillo, ape, phytools, reshape2, ggplot2, phangorn, seqinr, magick, quadprog, igraph, fastmatch, farver, labeling, munsell, RColorBrewer, viridisLite, colorspace, pixmap, sp, maps, animation, clusterGeneration, coda, combinat, expm, gtools, mnormt, numDeriv, plotrix, scatterplot3d, plyr, gtable, isoband, scales, ade4, segmented Installing packages into ‘C:/Users/piken/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) Error: Failed to install 'sfreemap' from GitHub: (converted from warning) package ‘mnormt’ is not available (for R version 3.6.1)

| >

dpasqualin commented 3 years ago

@prisilveira , I just installed sfreemap on windows using rtools 3.5 and R 3.6.2. Also worked with R 4.0.3 and Rtools 4.0. I used Rstudio to install it, but I don't think it is necessary. Only the commands below were necessary in both cases:

install.packages('devtools')
require(devtools)
install_github('dpasqualin/sfreemap')

I guess you just need to make sure you have the Rtools version installed compatible with R.

dpasqualin commented 3 years ago

@sam217pa , you managed to install sfreemap on OSX, did you have the same problem as @Giu1ia ? Would you know how to solve it? I don't have OSX so I can't reproduce the error. Thank you very much.

sam217pa commented 3 years ago

@dpasqualin I did not have any problem installing; I use clang from the latest LLVM however, installed with homebrew; here is the content of my ~/.R/Makevars:

# -*- conf -*-
LLVM_LOC=/usr/local/opt/llvm
CC=$(LLVM_LOC)/bin/clang #-fopenmp
CFLAGS=-g -O3 -Wall -pedantic -std=gnu99 -mtune=native -pipe
CXX=$(LLVM_LOC)/bin/clang++ -fopenmp
CXXFLAGS=-g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib

And here is the output of R CMD INSTALL sfreemap:

✦ ❯ R CMD INSTALL sfreemap_1.1.tar.gz
* installing to library '/Users/samuelbarreto/.local/share/R'
* installing *source* package 'sfreemap' ...
** using staged installation
** libs
/usr/local/opt/llvm/bin/clang++ -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Users/samuelbarreto/.local/share/R/Rcpp/include" -I"/Users/samuelbarreto/.local/share/R/RcppArmadillo/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe -c RcppExports.cpp -o RcppExports.o
/usr/local/opt/llvm/bin/clang++ -fopenmp -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG  -I"/Users/samuelbarreto/.local/share/R/Rcpp/include" -I"/Users/samuelbarreto/.local/share/R/RcppArmadillo/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fopenmp -fPIC  -g -O3 -Wall -pedantic -std=c++11 -mtune=native -pipe -c sfreemap.cpp -o sfreemap.o
sfreemap.cpp:46:9: warning: absolute value function 'fabsf' given an argument of type 'double' but has parameter of type 'float' which may cause truncation of value [-Wabsolute-value]
    if (fabsf(diff) < TOL) {
        ^
sfreemap.cpp:46:9: note: use function 'std::abs' instead
    if (fabsf(diff) < TOL) {
        ^~~~~
        std::abs
1 warning generated.
/usr/local/opt/llvm/bin/clang++ -fopenmp -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/opt/gettext/lib -L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib -o sfreemap.so RcppExports.o sfreemap.o -fopenmp -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
installing to /Users/samuelbarreto/.local/share/R/00LOCK-sfreemap/00new/sfreemap/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded from temporary location
** checking absolute paths in shared objects and dynamic libraries
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (sfreemap)

To me it looks like a clang version related problem, but I can't be sure.

dpasqualin commented 3 years ago

Thank you very much again @sam217pa . As I could install sfreemap on windows and it works on osx too I'm closing this issue.