From ripley at stats.ox.ac.uk  Mon Jun 21 20:39:31 2004
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Mon Jun 21 20:39:34 2004
Subject: [Rd] Re: [R] Cross build Makefile
In-Reply-To: <1087840534.2858.25.camel@xurelo>
Message-ID: <Pine.LNX.4.44.0406211937180.27620-100000@gannet.stats>

On Mon, 21 Jun 2004, Iago Mosqueira wrote:

> O Lun, 2004-06-21 ?s 08:00, Prof Brian Ripley escribiu:
> 
> > On Mon, 21 Jun 2004, Iago Mosqueira wrote:
> > 
> > > Hello,
> > > 
> > > I am trying to use Yan and Rossini's Makefile for cross building Windows
> > > versions of R packages in Linux with R 1.9.0. When compiling R with the
> > > mingw tools I get an error about expm1 being undeclared when first found
> > > at src/main/arithmetic.c:1019
> > > 
> > > If I fiddle a bit with it later on I also get errors about log1p bein
> > > undeclared.
> > > 
> > > Any idea what should I look for?
> > > 
> > > I am using R 1.9.0 in Debian, with R-mathlib avaliable, and gcc 3.3.
> > 
> > Did you build your own cross-compiler, or where did you get it from?
> 
> No, I got it following their indications, and I think it is from your
> webpage, is that recent enough?

Mine is now, but a copy of what was there a few months ago might not be.
Specifically

-rw-r--r--    1 ripley   bdr       6549268 Apr  2 16:04 mingw-cross2.tar.bz2

is fine.

> > log1p is definitely declared in math.h these days, but it used not to be, 
> > so that one might be due to using too old a cross-compiler.
> > 
> > For expm1, the Windows config.h has /* #undef HAVE_EXPM1 */ which means it 
> > is declared in Rmath.h and compiled up as part of libnmath.a.  Here all I 
> > can suggest is that you check the headers files are correct and that you 
> > are finding the ones for cross-compiling and not for Linux compiling 
> > (which can be a problem if the cross-compiler was built incorrectly or you 
> > configured R in that source tree without the right options).
> 
> I'll check it out. Thanks,

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595


[Rd] Re: [R] Cross build Makefile
Prof Brian Ripley