stephensrmmartin / omegad

R Package for modeling omega-reliability coefficient from exogenous or latent space using Gaussian Processes or linear models.
0 stars 0 forks source link

Installationsproblem at Windows 10 #7

Open macwig opened 4 years ago

macwig commented 4 years ago

Try to install omegad on Windows 10 wir MRAM 3.5.3 in RStudio, but it don't work. Wether devtools::install_github("stephensrmmartin/omegad") nor install.packages("omegad-master.zip", repos = NULL, type = "win.binary") works. With the first I get these messages: Downloading GitHub repo stephensrmmartin/omegad@master √ checking for file 'C:\Users***\AppData\Local\Temp\Rtmp8O8Cvy\remotes4a8c3b7673a5\stephensrmmartin-omegad-8360990/DESCRIPTION' ...

Installing package into ‘C:/Users/***/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified)

The second try will copy the zip-content into the package folder, but it isn't possible to load the package:

install.packages("C:/Users//Desktop/omegad-master.zip", repos = NULL, type = "win.binary") Installing package into ‘C:/Users//Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) library(omegad-master) Fehler in library(omegad-master) : es gibt kein Paket namens ‘omegad-master’

I tried some other ways but without success Kind regards

stephensrmmartin commented 4 years ago

What version of rstantools do you currently have?

macwig commented 4 years ago

package * version date lib source
rstantools 1.5.1 2018-08-22 [1] CRAN (R 3.5.3)

macwig commented 4 years ago

But it don't work with version 2.0 either (but theres a new error report):

install.packages("rstantools_2.0.0.zip", repos = NULL, type = "win.binary") Installing package into ‘C:/Users/**/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) package ‘rstantools’ successfully unpacked and MD5 sums checked sessioninfo::package_info("rstantools") package version date lib source
assertthat 0.2.1 2019-03-21 [1] CRAN (R 3.5.3) backports 1.1.4 2019-04-10 [1] CRAN (R 3.5.3) crayon 1.3.4 2017-09-16 [1] CRAN (R 3.5.1) desc 1.2.0 2018-05-01 [1] CRAN (R 3.5.3) R6 2.4.0 2019-02-14 [1] CRAN (R 3.5.3) Rcpp 1.0.1 2019-03-17 [1] CRAN (R 3.5.3) rprojroot 1.3-2 2018-01-03 [1] CRAN (R 3.5.1) rstantools 2.0.0 2019-09-15 [1] CRAN (R 3.6.2)

[1] C:/Users/***/Documents/R/win-library/3.5 [2] C:/Program Files/Microsoft/R Open/R-3.5.3/library

devtools::install_github("stephensrmmartin/omegad") Downloading GitHub repo stephensrmmartin/omegad@master Skipping 1 packages ahead of CRAN: rstantools √ checking for file 'C:\Users***\AppData\Local\Temp\RtmpKQGsyG\remotes41407eccb43\stephensrmmartin-omegad-8360990/DESCRIPTION' ...

  • preparing 'omegad': √ checking DESCRIPTION meta-information ...
  • cleaning src
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • building 'omegad_0.0.0.9000.tar.gz' Warnung: file 'omegad/configure' did not have execute permissions: corrected

Installing package into ‘C:/Users/***/Documents/R/win-library/3.5’ (as ‘lib’ is unspecified)

macwig commented 4 years ago

Next test: Using R 3.6.2 64bit:

Installing package into ‘C:/Users/***/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified)

*** arch - i386 Fehler in .shlib_internal(args) : C++14 standard requested but CXX14 is not defined

macwig commented 4 years ago

and with R 3.6.2 32 bit :

devtools::install_github("stephensrmmartin/omegad") Downloading GitHub repo stephensrmmartin/omegad@master Skipping 1 packages ahead of CRAN: StanHeaders √ checking for file 'C:\Users***\AppData\Local\Temp\RtmpI9K7Nb\remotes307070393386\stephensrmmartin-omegad-8360990/DESCRIPTION' ...

  • preparing 'omegad': √ checking DESCRIPTION meta-information ...
  • cleaning src
  • checking for LF line-endings in source and make files and shell scripts
  • checking for empty or unneeded directories
  • building 'omegad_0.0.0.9000.tar.gz' Warnung: file 'omegad/configure' did not have execute permissions: corrected

Installing package into ‘C:/Users/***/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified)

*** arch - i386 Fehler in .shlib_internal(args) : C++14 standard requested but CXX14 is not defined

stephensrmmartin commented 4 years ago

@macwig I think this is due to a few things. First, you need to update all your R packages to their latest versions. Second, you need a compiler capable of handling C++14. Then, I believe, omegad needs a specific argument for windows: Try using install_github("stephensrmmartin/omegad", INSTALL_opts = "--no-multiarch")

stephensrmmartin commented 4 years ago

See https://github.com/stan-dev/rstanarm/issues/325 for more detail. Basically, CXX14 needs to be defined, so that when using CXX14 standard, it knows to call the proper compiler. I can look at this more tomorrow when I have access to a windows machine. Please let me know if the no-multiarch solution above works, and whether changing Makevars.win works. I will add the proper instructions to a readme for future windows users. Thank you for the issue report!

macwig commented 4 years ago

I didn't find the /.R/Makevars or /.R/Makevars.win so I create them. The R 3.6.2 now compile and do a lot but ends with: make: *** [C:/PROGRA~1/R/R-3.6.2/etc/i386/Makeconf:215: funs.o] Error 1 ERROR: compilation failed for package 'omegad'

For the MRAN 3.5.3 the CXX14 = $(BINPREF)g++ -m$(WIN) seems to have no effect.

install_github("stephensrmmartin/omegad", INSTALL_opts = "--no-multiarch") unfortunately did not work. I got the same messages.

stephensrmmartin commented 4 years ago

Could you try installing again, but upload the entire output log here? I need to see where it's failing.

stephensrmmartin commented 4 years ago

Hey @macwig; I successfully built the package via winbuilder. I believe the compilation problem is a configuration issue on your end.

Can you post your Makevars.win here? What version of Rtools do you use? What versions of StanHeaders, rstantools, and rstan do you have? It is possible that the MRAN repo is outdated, and cannot use the latest tools I rely on (including, the latest stanheaders).

As a last resort, you can use this binary windows package built by winbuilder (attached). omegad_0.0.0.9000.zip

macwig commented 4 years ago

With R 3.6.2 it works now, I'll try with my data the next days. With MRAN 3.5.3 it doesn't work, probably because of the parallel library:

install.packages("C:/Users/ /Desktop/omegad_0.0.0.9000.zip", repos = NULL, type = "win.binary") Installing package into ‘C:/Users/ /Documents/R/win-library/3.5’ (as ‘lib’ is unspecified) package ‘omegad’ successfully unpacked and MD5 sums checked library(omegad) Fehler: package or namespace load failed for ‘omegad’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): Namensraum ‘parallel’ 3.5.3 ist bereits geladen, aber >= 3.6.0 wird gefordert Zusätzlich: Warnmeldung: Paket ‘omegad’ wurde unter R Version 3.6.2 erstellt I have no problem not work with MRAN, so you solve the issue for me. Thank you very much.