guys, I am trying to install a R named MotifDiverge
which depends on rphast
, MotifDb
, IRanges
, Rcpp
, RcppGSL
, RcppArmadillo
.I have installed all these dependecies. But somethings went wrong during the installation. I am a newbie to gsl
Rtools
, have no idea what to do, Hope someone give some advice, many thanks!
Here is the error report:
> library(BiocGenerics)
载入程辑包:‘BiocGenerics’
The following objects are masked from ‘package:stats’:
IQR, mad, sd, var, xtabs
The following objects are masked from ‘package:base’:
anyDuplicated, aperm, append, as.data.frame, basename, cbind, colnames, dirname, do.call, duplicated, eval, evalq, Filter, Find, get,
grep, grepl, intersect, is.unsorted, lapply, Map, mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank,
rbind, Reduce, rownames, sapply, setdiff, sort, table, tapply, union, unique, unsplit, which.max, which.min
Warning message:
R graphics engine version 15 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.
> library(Biostrings)
载入需要的程辑包:S4Vectors
载入需要的程辑包:stats4
载入程辑包:‘S4Vectors’
The following objects are masked from ‘package:base’:
expand.grid, I, unname
载入需要的程辑包:IRanges
载入程辑包:‘IRanges’
The following object is masked from ‘package:grDevices’:
windows
载入需要的程辑包:XVector
载入需要的程辑包:GenomeInfoDb
载入程辑包:‘Biostrings’
The following object is masked from ‘package:base’:
strsplit
> #library(rphast)
> library(MotifDb)
载入需要的程辑包:GenomicRanges
See system.file("LICENSE", package="MotifDb") for use restrictions.
> library(devtools)
载入需要的程辑包:usethis
Warning messages:
1: 程辑包‘devtools’是用R版本4.2.3 来建造的
2: 程辑包‘usethis’是用R版本4.2.3 来建造的
> library(rphast)
载入程辑包:‘rphast’
The following object is masked from ‘package:Biostrings’:
complement
> library(Rcpp)
Warning message:
程辑包‘Rcpp’是用R版本4.2.3 来建造的
> library(RcppGSL)
载入程辑包:‘RcppGSL’
The following object is masked from ‘package:Rcpp’:
LdFlags
Warning message:
程辑包‘RcppGSL’是用R版本4.2.3 来建造的
> library(RcppArmadillo)
Registered S3 methods overwritten by 'RcppArmadillo':
method from
predict.fastLm RcppGSL
print.fastLm RcppGSL
summary.fastLm RcppGSL
print.summary.fastLm RcppGSL
载入程辑包:‘RcppArmadillo’
The following objects are masked from ‘package:RcppGSL’:
fastLm, fastLmPure
Warning message:
程辑包‘RcppArmadillo’是用R版本4.2.3 来建造的
> library(gsl)
> install.packages("motifDiverge_0.4.12.tar.gz", repos=NULL, type="source")
将程序包安装入‘C:/Users/zhang/AppData/Local/R/win-library/4.2’
(因为‘lib’没有被指定)
* installing *source* package 'motifDiverge' ...
** using staged installation
**********************************************
WARNING: this package has a configure script
It probably needs manual configuration
**********************************************
** libs
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/Rcpp/include' -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/RcppGSL/include' -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/RcppArmadillo/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c RcppExports.cpp -o RcppExports.o
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/Rcpp/include' -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/RcppGSL/include' -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/RcppArmadillo/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c rcpp_binom-rec.cpp -o rcpp_binom-rec.o
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/Rcpp/include' -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/RcppGSL/include' -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/RcppArmadillo/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c rcpp_convolve.cpp -o rcpp_convolve.o
rcpp_convolve.cpp: In function 'arma::vec rcpp_convolve(SEXP, SEXP)':
rcpp_convolve.cpp:18:6: warning: unused variable 'nx' [-Wunused-variable]
18 | int nx = x.n_elem ;
| ^~
g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-42~1.2/include" -DNDEBUG -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/Rcpp/include' -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/RcppGSL/include' -I'C:/Users/zhang/AppData/Local/R/win-library/4.2/RcppArmadillo/include' -I"C:/rtools42/x86_64-w64-mingw32.static.posix/include" -O2 -Wall -mfpmath=sse -msse2 -mstackrealign -c rcpp_p-sym.cpp -o rcpp_p-sym.o
g++ -std=gnu++11 -shared -s -static-libgcc -o motifDiverge.dll tmp.def RcppExports.o rcpp_binom-rec.o rcpp_convolve.o rcpp_p-sym.o -LC:/PROGRA~1/R/R-42~1.2/bin/x64 -lRlapack -LC:/PROGRA~1/R/R-42~1.2/bin/x64 -lRblas -lgfortran -lm -lquadmath -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64 -LC:/rtools42/x86_64-w64-mingw32.static.posix/lib -LC:/PROGRA~1/R/R-42~1.2/bin/x64 -lR
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: rcpp_binom-rec.o:rcpp_binom-rec:(.text+0x2c4): undefined reference to `gsl_ran_binomial_pdf'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: rcpp_p-sym.o:rcpp_p-sym.cpp:(.text+0x3cb): undefined reference to `gsl_sf_lnfact'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: rcpp_p-sym.o:rcpp_p-sym.cpp:(.text+0x429): undefined reference to `gsl_sf_lnfact'
C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: rcpp_p-sym.o:rcpp_p-sym.cpp:(.text+0x43d): undefined reference to `gsl_sf_lnfact'
collect2.exe: error: ld returned 1 exit status
no DLL was created
ERROR: compilation failed for package 'motifDiverge'
* removing 'C:/Users/zhang/AppData/Local/R/win-library/4.2/motifDiverge'
Warning in install.packages :
安装程序包‘motifDiverge_0.4.12.tar.gz’时退出狀態的值不是0
I have followed the instructions here to install gsl
on my computer.https://solarianprogrammer.com/2020/01/26/getting-started-gsl-gnu-scientific-library-windows-macos-linux/
I guess this error may occured because the gsl
downloaded locally could not be recognized by R?
The installation went well after I modified the
Makevars.win
file in\src
folderAfter that The package is installed successfully!