Skip to content

[R-pkg-devel] Anyone Know How To Setup Wine for Windows Testing?

4 messages · Tomas Kalibera, Steve Bronder, Henrik Bengtsson

#
On 7/16/20 7:57 PM, Steve Bronder wrote:
Did you have any update on this? If there is a problem with MinGW-w64 
version, you can (just for experimentation) try UCRT demo build, which 
uses a newer version of MinGW-w64 than RTools 4:

https://developer.r-project.org/Blog/public/2020/07/30/windows/utf-8-build-of-r-and-cran-packages/index.html
(reference at very bottom)
Please note Brian Ripley has added/improved support for cross-compiling 
on Linux for Windows, so that it can be used for diagnosing LTO warnings 
(see NEWS in R-devel and src/gnuwin32/README.compilation). The 
cross-compilers and needed cross-compiled libraries for R itself are 
part of at least some Linux distributions (he tested on Fedora).
Microsoft is giving for free time-limited VMs primarily for testing 
Edge/MSIE, you can run them in e.g. in Virtualbox. As instructed in the 
VM, take snapshots often.
Being able to test R on Wine may be useful, if you figure it out, I 
would be interested to learn more. It is easier to obtain, may be easier 
to automate, and some low-level bugs may be easier to diagnose. Of 
course, for the price of sometimes seeing errors not present on real 
Windows.

Best
Tomas
9 days later
#
inline


On Wed, Sep 9, 2020 at 3:35 AM Tomas Kalibera <tomas.kalibera at gmail.com>
wrote:
So this worked with a patched version of wine. that fixed the above error.
I'm waiting for that patch to go in and for the next wine release to try
this again.
Yes very exciting!
We have a Jenkins box that we use to spinup AWS windows sessions when we
need to thoroughly debug now but ty for the info!
Do you think there would be more false positives or true negatives? That
was my one big concern since it's just emulating the actual windows
software environment.
- Steve Bronder
2 days later
#
On 9/18/20 11:56 PM, Steve Bronder wrote:
Thanks!
An (expensive) way to try out would be to run all CRAN/BIOC checks on 
Windows and in Wine and compare the results.? Things breaking in Wine, 
but not in Windows: hopefully often it would be clear immediately from 
Wine messages in many cases that it is a Wine issue. Also it may be a 
real problem that just does not map to a failure on Windows. Things 
working in Wine, but breaking in Windows, hopefully would be uncommon.

If Wine turns up usable for this, we could legally distribute a virtual 
disk with say R-devel and free applications needed by it, with a simple 
script that would just run a package check there on any Linux 
distribution. Maybe even as a docker/singularity image. This should make 
it easy and fast for Linux users to check their packages (of course, 
this can't replace completely testing on Windows, and there is 
winbuilder and rhub, too).

That is in addition to the added flexibility of debugging the low-level 
bugs having the source code for the "OS".

Best
Tomas

  
  
#
Getting R to run well on Wine would be really neat.  Here are some
additional comments that might encourage someone to move this forward.

On Ubuntu 18.04, you can install and run R 3.6.0 on Wine as:

curl -O https://cloud.r-project.org/bin/windows/base/old/3.6.0/R-3.6.0-win.exe
wine R-3.6.0-win.exe /SILENT
wine start "%ProgramW6432%/R/R-3.6.0/bin/i386/R"

However, for me, never versions of R (e.g. R 3.6.1) fail to install
with an error "This program does not support the version of Windows
your computer is running."  This is with the current stable version of
Wine is 5.0.2 (August 2020) available from https://www.winehq.org/.
(If you struggle to install Wine (>= 4.5) on Ubuntu 18.04, see also
https://askubuntu.com/questions/1145473/how-do-i-install-libfaudio0).
I observed the same with Wine 3.0.


Some more comments: Back in 2016 I was looking into running R on Wine
via futures.  This could make it possible to access features in
Windows-only R packages from R sessions running Linux.  I only spent
so much time on it before concluding it wasn't stable and not worth my
time to investigate further.  For instance, I managed to launch a Wine
background worker as in:

rscript <- c("wine", "start", "/Unix",
normalizePath("~/.wine/drive_c/Program\
Files/R/R-3.5.1/bin/i386/Rscript.exe", mustWork = TRUE))
cl <- future::makeClusterPSOCK(1L, rscript=rscript, verbose=TRUE)

but only when running 32-bit Wine.  On 64-bit Wine is stalled.

/Henrik
On Mon, Sep 21, 2020 at 7:16 AM Tomas Kalibera <tomas.kalibera at gmail.com> wrote: