Re: [Rd] Compiling 64bit static library for Windows (Rtools33, MSYS2, cross-compile on linux)

2015-06-01 Thread Sue McDonald
Thank you all for the suggestions.

I was finally able to get everything to work using msys + Rtools-gcc-4.6.3.
I could be wrong, but it seems that a complete 32+64 bit R-must be
installed to get a 64bit static library compiled.

MSYS while not as complete as MSYS2 does provide a shell that is identical
to linux.  The structure of Rtools-gcc with 'multilib'  is somewhat
confusing as compared to other current "mingw64" downloads, including
MSYS2.  It must be a Herculean task to ensure that 'things-just-work' for
all 4000+ packages -  with every new version!  I understand that Rtools
must control the entire process. I am grateful for all the work that goes
into it. That said, it would be nice, if Rtools could be packaged more like
MSYS2 - which after-all has very similar goals that apply to any linux
package.

Thanks again, SM

On Sat, May 30, 2015 at 2:06 PM, Prof Brian Ripley 
wrote:

> On 30/05/2015 13:14, Duncan Murdoch wrote:
>
>> On 29/05/2015 4:16 PM, Sue McDonald wrote:
>>
>>> My apologies for cross-posting. I found this site, after I had posted on
>>> stack-overflow.
>>>
>>> I need to compile several static libraries (C & Fortran) which will later
>>> be linked with an R package. Rtools33 directory includes
>>> /i686-w64-mingw32
>>> directory which I understand creates 32 bit binaries. Yet, there are
>>> other
>>> 64 bit directories as well.
>>>
>>
>> The current Rtools is set up for multilib operation.  You only need to
>> use the binaries in Rtools/gcc-4.6.3/bin.  The executables there will
>> choose files from the other directories depending on the -m32 or -m64
>> flag, for 32 bit or 64 bit operation.
>>
>>
>>> I have three related questions:
>>>
>>> 1.
>>>
>>> Can Rtools33 be used to compile static libraries as a separate step
>>> using -m64 flag?
>>>
>>
>> Yes, I believe so.  They would be 64 bit static libraries.
>>
>>  2.
>>>
>>> MSYS2 is very convenient for compiling many of these libraries. Can a
>>> static library compiled with x86_64-w64-mingw32 (gcc 4.9.2) be used
>>> with
>>> Rtools33 (v 4.6.2)?
>>>
>>
>> Rtools uses 4.6.3, not 4.6.2.  I would assume the runtime libraries are
>> different between 4.6.3 and 4.9.2, so you won't be able to mix versions
>> like that.
>>
>> However, you should be able to use your MSYS2 system for all
>> compilation, if you create a MkRules.local file with the right settings.
>>   You will need to compile R and all packages and libraries using that
>> system, don't expect to be able to mix binaries from different versions
>> of gcc.
>>
>>
>>  3.
>>>
>>> Can a static library compiled using x86_64-w64-mingw32-gcc
>>> cross-compiler (v 4.6.2) on linux be used with Rtools33?
>>>
>>
>> Some libraries used by packages are compiled by Brian Ripley using a
>> cross-compiler on linux.  I'd assume he's using 4.6.3 as with the Rtools
>> build, but I'm not sure about that.
>>
>
> Correct, I used the cross-compiler that was used to compile the native
> compilers in Rtools.
>
> My experience (this had to work for thousands of packages for CRAN) is
> that only an exact match for the cross-compiler to the compiler used to
> compile R works reliably.  Even very slightly different builds can cause
> segfaults.
>
> --
> Brian D. Ripley,  rip...@stats.ox.ac.uk
> Emeritus Professor of Applied Statistics, University of Oxford
> 1 South Parks Road, Oxford OX1 3TG, UK
>

[[alternative HTML version deleted]]

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


Re: [Rd] NEWS.md support on CRAN

2015-06-01 Thread Kurt Hornik
> peter dalgaard writes:

>> On 30 May 2015, at 01:20 , Imanuel Costigan  wrote:
>> 
>> So I assume this commit means NEWS.md is now no longer on blacklist? 
>> 

> in the development version. Not true of released versions.

Now also in r-patched.

-k

> -pd


>> https://github.com/wch/r-source/commit/9ffe87264a1cd59a31a829f72d57af0f1bfa327a
>> 
>> Sent from my iPad
>> 
>> On 23 May 2015, at 6:05 pm, Kurt Hornik  wrote:
>> 
 Duncan Murdoch writes:
>>> 
> On 22/05/2015 8:49 PM, Imanuel Costigan wrote:
> Are there any plans for CRAN to support NEWS files in markdown? Bit of a 
> hassle to go the the package’s Github (or other like) site to read NEWS.
>>> 
 Not as far as I know.  There have been discussions about increasing the
 support of Markdown, but so far the conclusion has been that it's too
 hard to do -- the support is not stable enough on all the platforms
 where R runs.
>>> 
>>> There are actually two issues here.
>>> 
>>> For CRAN, we could in principle take inst/NEWS.md files, convert these
>>> to HTML using pandoc, and use the HTML for the package web page.  (Would
>>> need the CRAN incoming checks to be taught about inst/NEWS.md.)
>>> 
>>> However, we cannot use such files for utils::news() because we do not
>>> (yet?) know how to reliably parse such files and extract the news items
>>> (and hence cannot really compute on the news information).
>>> 
>>> Btw, currently only one package on CRAN has inst/NEWS.md (another one
>>> has NEWS.md at top level).
>>> 
>>> Best
>>> -k
>>> 
 Markdown is allowed for vignettes (because the package author processes
 those), so I'd suggest putting your news into a vignette instead of a
 news file.  Put in a token news file that points to the vignette so
 users can find it.
>>> 
 Duncan Murdoch
>>> 
 __
 R-devel@r-project.org mailing list
 https://stat.ethz.ch/mailman/listinfo/r-devel
>> 
>> [[alternative HTML version deleted]]
>> 
>> __
>> R-devel@r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel

> -- 
> Peter Dalgaard, Professor,
> Center for Statistics, Copenhagen Business School
> Solbjerg Plads 3, 2000 Frederiksberg, Denmark
> Phone: (+45)38153501
> Email: pd@cbs.dk  Priv: pda...@gmail.com

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

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