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

2020-09-07 Thread bill
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, 

 

"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


Re: [R-pkg-devel] CRAN, API packages, Keys and tests

2020-09-07 Thread Rainer M Krug
Hi Josh,

Thanks for the thumbs-up for CRAN.

With the secure variable on Travis - that is exactly what I am doing.

Thanks a lot,

Rainer


> On 4 Sep 2020, at 16:22, Joshua Ulrich  wrote:
> 
> On Fri, Sep 4, 2020 at 9:20 AM Joshua Ulrich  > wrote:
>> 
>> Hi Rainer,
>> 
>> You could set an environment variable with the API key, and only run
>> the tests if the variable is set.
>> 
> Sorry, I missed that you're already doing this.  I confirm that it
> works for CRAN.  I also set my API key as a private/secure variable on
> TravisCI, so the tests will run there.
> 
> IIRC, testthat does something similar. You could look at that pattern,
> since it works on CRAN for many packages.
> 
>> Here's an example that I use:
>> https://github.com/joshuaulrich/quantmod/blob/master/tests/test_getSymbols.R#L4
>> 
>> Best,
>> Josh
>> 
>> On Fri, Sep 4, 2020 at 3:25 AM Rainer M Krug  wrote:
>>> 
>>> I know this has been asked a few times - but I can’t find anything which 
>>> might help me.
>>> 
>>> I have a package (https://github.com/rkrug/ROriginStamp) which wraps around 
>>> API calls to OriginStamp (https://originstamp.com) to obtain trusted time 
>>> stamps.
>>> 
>>> The package works, but the tests are the problem on remote machines.
>>> 
>>> My question is:
>>> 
>>> 1) I have disabled all tests and all examples if there is no environmental 
>>> variable set with the API Key - is this OK for CRAN?
>>> 2) If not, how can I make this CRAN compliant?
>>> 
>>> Thanks,
>>> 
>>> Rainer
>>> 
>>> 
>>> --
>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
>>> UCT), Dipl. Phys. (Germany)
>>> 
>>> Orcid ID: -0002-7490-0066
>>> 
>>> Department of Evolutionary Biology and Environmental Studies
>>> University of Zürich
>>> Office Y34-J-74
>>> Winterthurerstrasse 190
>>> 8075 Zürich
>>> Switzerland
>>> 
>>> Office: +41 (0)44 635 47 64
>>> Cell:   +41 (0)78 630 66 57
>>> email:  rainer.k...@uzh.ch
>>>rai...@krugs.de
>>> Skype: RMkrug
>>> 
>>> PGP: 0x0F52F982
>>> 
>>> 
>>> 
>>> 
>>> 
>>> --
>>> Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
>>> UCT), Dipl. Phys. (Germany)
>>> 
>>> Orcid ID: -0002-7490-0066
>>> 
>>> Department of Evolutionary Biology and Environmental Studies
>>> University of Zürich
>>> Office Y34-J-74
>>> Winterthurerstrasse 190
>>> 8075 Zürich
>>> Switzerland
>>> 
>>> Office: +41 (0)44 635 47 64
>>> Cell:   +41 (0)78 630 66 57
>>> email:  rainer.k...@uzh.ch
>>>rai...@krugs.de
>>> Skype: RMkrug
>>> 
>>> PGP: 0x0F52F982
>>> 
>>> __
>>> R-package-devel@r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-package-devel
>> 
>> 
>> 
>> --
>> Joshua Ulrich  |  about.me/joshuaulrich
>> FOSS Trading  |  www.fosstrading.com
> 
> 
> 
> -- 
> Joshua Ulrich  |  about.me/joshuaulrich 
> FOSS Trading  |  www.fosstrading.com 
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, 
UCT), Dipl. Phys. (Germany)

Orcid ID: -0002-7490-0066

Department of Evolutionary Biology and Environmental Studies
University of Zürich
Office Y34-J-74
Winterthurerstrasse 190
8075 Zürich
Switzerland

Office: +41 (0)44 635 47 64
Cell:   +41 (0)78 630 66 57
email:  rainer.k...@uzh.ch
rai...@krugs.de
Skype: RMkrug

PGP: 0x0F52F982




[[alternative HTML version deleted]]

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