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

2020-09-09 Thread Tomas Kalibera

On 7/16/20 7:57 PM, Steve Bronder wrote:

On Wed, Jul 15, 2020 at 2:22 PM Neal Fultz  wrote:


If you don't mind multi-gig docker containers, this can be helpful:

https://github.com/scottyhardy/docker-wine

It doesn't work with 64 bit versions of R as far as I could tell, but 32
bit did install and start correctly in a few clicks when I tried last year.


Thanks! I'm hoping if I can get this all working locally I can put
everything into a docker container for other folks. At this point I have R
up and running and it can install binary packages, but there are some
terrible terrible Cygwin/Rtools errors I can't figure out. In particular
this warning / message seems worrisome

Cygwin WARNING:
   Couldn't compute FAST_CWD pointer.  This typically occurs if you're using
   an older Cygwin version on a newer Windows.  Please update to the latest
   available Cygwin version from https://cygwin.com/.  If the problem
persists,
   please see https://cygwin.com/problems.html

If anyone has interest I can post a script for setting up the wine instance
as far as I can get atm.


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)


On Wed, Jul 15, 2020 at 10:56 AM J C Nash  wrote:


Are you sure you want to try to run R etc. under Wine?


Do I want to? No :-). But we (Stan) want to use flto and are seeing errors
on windows I want to be able to debug locally.


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).



- If you have Windows running, either directly or in a VM, you can run R
there.


Sadly I don't have access to a windows machine. If I can't figure this out
then I'll probably just get a windows aws instance. But it would be nice
for people to have a wine setup they could test locally on.


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.



- If you have Windows and want to run R under some other OS, then set up a

VM
e.g., Linux Mint, for that. I sometimes test R for Windows in a
VirtualBox VM
for Win10, but generally run in Linux Mint. I've also run R in some Linux
VMs
to test for specific dependencies in some distros.

I rather doubt R will run very well in Linux under Wine. My experience
with Wine
is that a few apps (e.g. Irfanview) run well, but many give lots of
trouble.


Yes I'm 80/20 on whether compilation with Rtools will totally work on wine.
But if I can get this all setup and put it into a docker file I think it
will be useful for other people as well so it's worth spending a bit of
time on.


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


JN


On 2020-07-15 1:17 p.m., Steve Bronder wrote:

Does anyone know of a setup guide for getting R and Rtools 4.0 up and
running on Wine with the Windows Server 2008 R2 VM? Do other maintainers
with more knowhow think that would be useful for debugging purposes?

I've been trying to test out some flto gcc things for windows by

setting up

a local wine VM on my ubuntu box. Wine has an option for Windows Server
2008 R2 (which I believe is the windows session CRAN uses?) If anyone

has

done this before and knows of a guide somewhere that would be very

helpful!

Regards,

Steve Bronder

   [[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel



- Steve Bronder

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Compiling 32-bit on Windows using 64-bit gcc and -m32

2020-09-09 Thread Tomas Kalibera

On 9/7/20 7:07 PM, b...@denney.ws wrote:

Hello,

  


My question is:

Can I use the 64-bit gcc to build a 32-bit package with the -m32 command
line option with Rtools?  And, can that work for CRAN?  Or more generally,
is there a work-around for needing lots of RAM during compilation with the
32-bit compiler?

The background is:

I'm trying to compile a the development version of RxODE
(https://github.com/nlmixrdevelopment/RxODE/issues/278), but I'm hitting
32-bit memory limits (using >3GB and possibly >4GB RAM during compilation)
using the 32-bit version of gcc.  Specifically,


I think this is too much memory to be used for compilation. I think it 
would be best to simplify the code, possibly split it, or just reduce 
the optimization level, as I read you have done already anyway. Maybe it 
doesn't have to be -O0, maybe you can enable some. In the past I've seen 
similar cases when inlining too aggressively in large files, maybe you 
could just reduce that a bit. It may very well be that reducing the 
optimization level just a little bit will provide about the same 
performance, but require far less memory at compile time (in the past 
there have been cases when -O3 did not produce faster code than -O2 on a 
set of standard benchmarks, of course that may be different in today's 
compilers).


Spending much more time for optimizing of the 32-bit builds may not be 
worth the effort (and neither on the R/CRAN side).


Best
Tomas




  


"C:/rtools40/mingw32/bin/"gcc [etc., see the link above for the full command
line]

  


yields the error

  


cc1.exe: out of memory allocating 65536 bytes

  


There is no problem building with mingw64, and I played around to confirm
that by using:

  


Sys.setenv(BINPREF="c:/rtools40/mingw64/bin/")

  


And compilation completed successfully (though installation failed as
expected because the compiled .dll couldn't load on 32-bit R).

  


Thanks,

  


Bill


[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Compiling 32-bit on Windows using 64-bit gcc and -m32

2020-09-09 Thread Dirk Eddelbuettel


On 9 September 2020 at 10:33, Tomas Kalibera wrote:
| Spending much more time for optimizing of the 32-bit builds may not be 
| worth the effort (and neither on the R/CRAN side).

As we are in conditional mode: maybe that could be recognized by adding an
explicit flag allowing us to disable 32-bit builds on a case by case basis?

And it would be nice to be able to do this for that other OS none of us have
access too (outside of a win-builder instance that differs subtly in setup
from the CRAN one).

Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Compiling 32-bit on Windows using 64-bit gcc and -m32

2020-09-09 Thread bill
> From: Tomas Kalibera  
> > Can I use the 64-bit gcc to build a 32-bit package with the -m32 
> > command line option with Rtools?  And, can that work for CRAN?  Or 
> > more generally, is there a work-around for needing lots of RAM during 
> > compilation with the 32-bit compiler?
> >
> > The background is:
> >
> > I'm trying to compile a the development version of RxODE 
> > (https://github.com/nlmixrdevelopment/RxODE/issues/278), but I'm 
> > hitting 32-bit memory limits (using >3GB and possibly >4GB RAM during 
> > compilation) using the 32-bit version of gcc.
>
> I think this is too much memory to be used for compilation. I think it would 
> be best to
> simplify the code, possibly split it, or just reduce the optimization level, 
> as I read you have > done already anyway. Maybe it doesn't have to be -O0, 
> maybe you can enable some. In 
> the past I've seen similar cases when inlining too aggressively in large 
> files, maybe you
> could just reduce that a bit. It may very well be that reducing the 
> optimization level just a 
> little bit will provide about the same performance, but require far less 
> memory at compile 
> time (in the past there have been cases when -O3 did not produce faster code 
> than -O2 on
> a set of standard benchmarks, of course that may be different in today's 
> compilers).

Yes, we are testing reducing the optimization level.  Using -O0 works to 
compile using ~500 MB.  The code can't be simplified as it is a very long 
algebraic equation.  The function is often used in the middle of an 
optimization routine that can often takes minutes to hours (statistical 
minimization here, not meaning compiler optimization), so optimization is 
preferable.  But, it's a fair point that I don't know the value of the 
different -O optimization levels for what is only long algebra.

Thanks,

Bill

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Help in getting past CRAN submission rejections

2020-09-09 Thread Balasubramanian Narasimhan
We've been struggling to get past CRAN's rejections for a new upload of 
CVXR.  The new version makes essentially one change to the existing 
version on CRAN: the addition of a DOI to an article to appear in JSS.  
We realize that CRAN may tighten policies in the meantime forcing some 
changes to be made, which we are happy to do. But we are not sure what.


The automated check 
 
came back with 2 notes on Debian and Windows, both addressed in replies 
and submission comments. (Solaris failures are expected, also noted.)


The communications with CRAN indicates that the problem might be that 
our package (the current version too) _suggests_ solvers not available 
on CRAN. These are either on github or on vendor websites (free to 
academics after login).  One reply from CRAN suggested that we either 
use the "Additional_repositories" field or provide some text in 
Description. The former is not applicable---these are not CRAN-like 
repositories---so we added text in the description with URL links.


What could we be missing?

Thanks.

-Naras

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Help in getting past CRAN submission rejections

2020-09-09 Thread Toby Hocking
Hi Naras
I had a similar issue recently with
https://cloud.r-project.org/web/packages/nc/ --- it Suggests: re2r which is
a package that is no longer on CRAN, but available on github. To solve the
issue I just copied the re2r into a drat repo, which is a CRAN-like
repository hosted on github. More info on drat here
http://eddelbuettel.github.io/drat/DratForPackageAuthors.html So if those
solver packages you have in Suggests are open-source, you can just copy
them to your drat repo, and list that drat repo in Additional_repositories.
If they aren't open-source then you should provide a description of how to
obtain those packages in Description. Something like "gurobi package is not
available in any public open-source repositories but can be downloaded for
academic use free of charge from $GUROBI_URL"
BTW thanks for your efforts in getting CVXR on CRAN, that is really
important work!
Toby


On Wed, Sep 9, 2020 at 10:40 AM Balasubramanian Narasimhan <
na...@stanford.edu> wrote:

> We've been struggling to get past CRAN's rejections for a new upload of
> CVXR.  The new version makes essentially one change to the existing
> version on CRAN: the addition of a DOI to an article to appear in JSS.
> We realize that CRAN may tighten policies in the meantime forcing some
> changes to be made, which we are happy to do. But we are not sure what.
>
> The automated check
> <
> https://win-builder.r-project.org/incoming_pretest/CVXR_1.0-6_20200908_223033/>
>
> came back with 2 notes on Debian and Windows, both addressed in replies
> and submission comments. (Solaris failures are expected, also noted.)
>
> The communications with CRAN indicates that the problem might be that
> our package (the current version too) _suggests_ solvers not available
> on CRAN. These are either on github or on vendor websites (free to
> academics after login).  One reply from CRAN suggested that we either
> use the "Additional_repositories" field or provide some text in
> Description. The former is not applicable---these are not CRAN-like
> repositories---so we added text in the description with URL links.
>
> What could we be missing?
>
> Thanks.
>
> -Naras
>
> __
> R-package-devel@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Help in getting past CRAN submission rejections

2020-09-09 Thread Balasubramanian Narasimhan
Thanks Toby, so there is hope.  The drat suggestion for rcbc is worth a 
try, gurobi is noted as you recommend.

-Naras

On 9/9/20 4:38 PM, Toby Hocking wrote:
> Hi Naras
> I had a similar issue recently with 
> https://cloud.r-project.org/web/packages/nc/ --- it Suggests: re2r 
> which is a package that is no longer on CRAN, but available on github. 
> To solve the issue I just copied the re2r into a drat repo, which is a 
> CRAN-like repository hosted on github. More info on drat here 
> http://eddelbuettel.github.io/drat/DratForPackageAuthors.html So if 
> those solver packages you have in Suggests are open-source, you can 
> just copy them to your drat repo, and list that drat repo in 
> Additional_repositories. If they aren't open-source then you should 
> provide a description of how to obtain those packages in Description. 
> Something like "gurobi package is not available in any public 
> open-source repositories but can be downloaded for academic use free 
> of charge from $GUROBI_URL"
> BTW thanks for your efforts in getting CVXR on CRAN, that is really 
> important work!
> Toby
>
>
> On Wed, Sep 9, 2020 at 10:40 AM Balasubramanian Narasimhan 
> mailto:na...@stanford.edu>> wrote:
>
> We've been struggling to get past CRAN's rejections for a new
> upload of
> CVXR.  The new version makes essentially one change to the existing
> version on CRAN: the addition of a DOI to an article to appear in
> JSS.
> We realize that CRAN may tighten policies in the meantime forcing
> some
> changes to be made, which we are happy to do. But we are not sure
> what.
>
> The automated check
> 
> 
>
> came back with 2 notes on Debian and Windows, both addressed in
> replies
> and submission comments. (Solaris failures are expected, also noted.)
>
> The communications with CRAN indicates that the problem might be that
> our package (the current version too) _suggests_ solvers not
> available
> on CRAN. These are either on github or on vendor websites (free to
> academics after login).  One reply from CRAN suggested that we either
> use the "Additional_repositories" field or provide some text in
> Description. The former is not applicable---these are not CRAN-like
> repositories---so we added text in the description with URL links.
>
> What could we be missing?
>
> Thanks.
>
> -Naras
>
> __
> R-package-devel@r-project.org
>  mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


[R-pkg-devel] Fixing travis build fail due to fftwtools fatal error (fftw3.h: No such file or directory)

2020-09-09 Thread Marta Karaś
Dear all,

I have been facing travis build fail on linux xenial due to *fftwtools
fatal error* (fftw3.h: No such file or directory) with my R package. The
error appeared at a random time a few months ago (at a random time := I do
not link it with any fftwtools-function related change commit I did) and
persists.

There is not much I achieved in googling and trying to decipher it, sadly;
I am hoping maybe some Community members saw a similar error with their dev
work and can suggest a hint/solution?

Package GitHub: https://github.com/martakarass/runstats
Failed Travis job log:
https://travis-ci.com/github/martakarass/runstats/jobs/383037333

Error excerpt:

* installing *source* package ‘fftwtools’ ...
** package ‘fftwtools’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/opt/R/4.0.2/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic
 -g -O2  -c fftwtools.c -o fftwtools.o
fftwtools.c:28:18: fatal error: fftw3.h: No such file or directory
compilation terminated.
/opt/R/4.0.2/lib/R/etc/Makeconf:167: recipe for target 'fftwtools.o' failed
make: *** [fftwtools.o] Error 1
ERROR: compilation failed for package ‘fftwtools’
* removing ‘/home/travis/R/Library/fftwtools’
Error in i.p(...) :
  (converted from warning) installation of package ‘fftwtools’ had non-zero
exit status
Calls:  ... with_rprofile_user -> with_envvar -> force -> force
-> i.p
Execution halted
The command "Rscript -e 'deps <- remotes::dev_package_deps(dependencies =
NA);remotes::install_deps(dependencies = TRUE);if (!all(deps$package %in%
installed.packages())) { message("missing: ", paste(setdiff(deps$package,
installed.packages()), collapse=", ")); q(status = 1, save = "no")}'"
failed and exited with 1 during .
Your build has been stopped.


Thank you,

Marta

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel


Re: [R-pkg-devel] Fixing travis build fail due to fftwtools fatal error (fftw3.h: No such file or directory)

2020-09-09 Thread Max Turgeon
Hi Marta,

One change I can see from your Git history that seems to match the first failed 
build on Travis is when you added "Imports: fftwtools" to your DESCRIPTION 
file. And it makes sense, because if we look at its DESCRIPTION file, we can 
see that it has fftw3 as a SystemRequirements. In other words, it needs to be 
installed on Travis before you can run the checks on your package.

As for solutions, I can see that Karim wrote a short description of how to 
install the library on Linux, and there's a link for Mac; all this is on the 
Github repo: https://github.com/krahim/fftwtools

I also noticed that there is an R package wrapping fftw on CRAN 
(https://cran.r-project.org/package=fftw) and I can see that it's a Suggested 
package for fftwtools. I haven't tried it, but presumably you could install the 
fftw R package, instead of the fftw3 library.

HTH,


Max Turgeon
Assistant Professor
Department of Statistics
Department of Computer Science
University of Manitoba
maxturgeon.ca




From: R-package-devel  on behalf of 
Marta Kara� 
Sent: Wednesday, September 9, 2020 9:09 PM
To: package-develop 
Cc: karim.ra...@queensu.ca 
Subject: [R-pkg-devel] Fixing travis build fail due to fftwtools fatal error 
(fftw3.h: No such file or directory)


Caution: This message was sent from outside the University of Manitoba.


Dear all,

I have been facing travis build fail on linux xenial due to *fftwtools
fatal error* (fftw3.h: No such file or directory) with my R package. The
error appeared at a random time a few months ago (at a random time := I do
not link it with any fftwtools-function related change commit I did) and
persists.

There is not much I achieved in googling and trying to decipher it, sadly;
I am hoping maybe some Community members saw a similar error with their dev
work and can suggest a hint/solution?

Package GitHub: https://github.com/martakarass/runstats
Failed Travis job log:
https://travis-ci.com/github/martakarass/runstats/jobs/383037333

Error excerpt:

* installing *source* package �fftwtools� ...
** package �fftwtools� successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/opt/R/4.0.2/lib/R/include" -DNDEBUG   -I/usr/local/include   -fpic
 -g -O2  -c fftwtools.c -o fftwtools.o
fftwtools.c:28:18: fatal error: fftw3.h: No such file or directory
compilation terminated.
/opt/R/4.0.2/lib/R/etc/Makeconf:167: recipe for target 'fftwtools.o' failed
make: *** [fftwtools.o] Error 1
ERROR: compilation failed for package �fftwtools�
* removing �/home/travis/R/Library/fftwtools�
Error in i.p(...) :
  (converted from warning) installation of package �fftwtools� had non-zero
exit status
Calls:  ... with_rprofile_user -> with_envvar -> force -> force
-> i.p
Execution halted
The command "Rscript -e 'deps <- remotes::dev_package_deps(dependencies =
NA);remotes::install_deps(dependencies = TRUE);if (!all(deps$package %in%
installed.packages())) { message("missing: ", paste(setdiff(deps$package,
installed.packages()), collapse=", ")); q(status = 1, save = "no")}'"
failed and exited with 1 during .
Your build has been stopped.


Thank you,

Marta

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel

[[alternative HTML version deleted]]

__
R-package-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-package-devel