Closed lzhangUT closed 3 years ago
@lzhangUT could you make sure that gsl
is installed on your mingw system before trying to install the package? Currently we do not provide official support (nor do we have sufficient knowledge) for Windows though in principle it should work if all requirements are satisfied. The only tricky one is gsl
.
Down the line maybe we can create a conda-forge recipe for mashr
so at least Windows users should be able to use it with conda
.
@lzhangUT To echo what Gao said, it looks like the RcppGSL package has not been installed properly. I would take a look at the package documentation here and figure out what is going on (actually I'm not certain that a missing GSL is the issue here).
I did, both gsl and RcppGSL packages, the same error messages.
From your error prompt:
C:/Users/Li Zhang/Documents/R/win-library/3.5/RcppGSL/include/RcppGSLForward.h:26:29: fatal error: gsl/gsl_vector.h: No such file or directory
It seems your system is not configured to point to the right path of GSL even though you claim it is properly installed (and I believe you!). I do not have any specific knowledge how the GSL installation behaves in mingw
and how to fix this issue, but the big picture idea is that you've got to configure your environment variable to make sure the GSL header directory is in the C++ compiler's INCLUDE
path (-I
option for gcc
), and the GSL library binary is in the compiler's LIBRARY
path (-L
option).
I think this relates to our difficulties in getting Appveyor working for mashr; I was unable to get RcppGSL to recognize the installed GSL. I'm afraid I can't offer any advice on this, but at least we have isolated the issue! Please let us know if you find a solution (it could actually be useful for us as well).
GSL installation on Linux (via apt-get) and on Mac (via homebrew) is straightforward. Here are some steps that worked on Mac without using homebrew and to verify the paths can be recognized.
First, download the desired version of gsl.tar.gz
file from the source: https://www.gnu.org/software/gsl/
The latest version is gsl-2.6
. (As of 05/03/2021)
Then, change directory into the location of unzipped gsl
folder on your computer in terminal.
cd ~/Downloads/gsl-2.6
To install, run:
sudo ./configure && make && sudo make install
To verify the installation, run the following commands in terminal:
gsl-config --cflags
and
gsl-config --libs
If you get
-I/usr/local/include
and
-L/usr/local/lib -lgsl -lgslcblas
respectively for --cflags
and --libs
, gsl
should has been configured successfully. If the above does not work, eg, command gsl-config
is not found, then you should see in your gsl build folder a script called gsl-config
. You can open it up with a text editor, read into it to find the expected -I
and -L
paths and double check if it exists on your computer, in particular the first 3 lines. For the example above these lines are:
prefix=/usr/local
exec_prefix=/usr/local
includedir=/usr/local/include
Next, when you install mashr
in R you should find the R terminal output along the lines of:
clang++ -std=gnu++11 ... -o mashr.so RcppExports.o extreme_deconvolution.o mash.o -I/usr/local/include -L/usr/local/lib -lgsl -lgslcblas ...
that uses the flags and libraries generated. This should ensure a successful compile with GSL included and linked.
I have not tried a Windows solution but I believe the steps are similar. I'm going to close the ticket for now until we have more contributions from Windows users.
My R version: