[R] cross compiling R for Windows under Linux

Lars Schouw schouwla at yahoo.com
Fri Apr 15 09:03:44 CEST 2005


After trying all day here in Tokyo.
I foudn a word around for the problem copying the
header files from 
mingw/i586-mingw32/include 
to 
mingw/include

so at least I can compile that part...

Strugelling with tcl right now..
But it looks better now ;)

Lars


--- Lars Schouw <schouwla at yahoo.com> wrote:

> Professor Ripley
> 
> I am very hourned to use R after all your hard work.
> 
> It looks as if I can't see the paths
> /users/ripley/mingw even though I have set the
> HEADER
> correct.
> 
> POINT:
> I tried to include the missing header file float.h
> from dynload.c directly. It can't see the file!!!
> 
> Is looks as if I have to run confgure myself again
> to
> set the --prefix correct.
> 
> Whan I added --verbose to the make flags I get this:
> 
> i586-mingw32-gcc -isystem
> /home/schouwl/unpack/mingw/include --verbose -O2
> -Wall
> -pedantic -I../include -I. -DHAVE_CONFIG_H
> -DR_DLL_BUILD  -c dynload.c -o dynload.o
> Reading specs from
>
/export/home/schouwl/unpack/mingw/bin/../lib/gcc/i586-mingw32/3.4.2/specs
> Configured with: ../configure
> --prefix=/users/ripley/mingw --target=i586-mingw32
> --enable-threads --enable-hash-synchronization
> --disable-nls
> Thread model: win32
> gcc version 3.4.2 (mingw-special)
> 
>
/export/home/schouwl/unpack/mingw/bin/../libexec/gcc/i586-mingw32/3.4.2/cc1
> -quiet -v -I../include -I. -iprefix
>
/export/home/schouwl/unpack/mingw/bin/../lib/gcc/i586-mingw32/3.4.2/
> -DHAVE_CONFIG_H -DR_DLL_BUILD -isystem
> /home/schouwl/unpack/mingw/include dynload.c -quiet
> -dumpbase dynload.c -mtune=pentium -auxbase-strip
> dynload.o -O2 -Wall -pedantic -version -o
> /tmp/ccGf2Nz4.s
> ignoring nonexistent directory
>
"/export/home/schouwl/unpack/mingw/bin/../lib/gcc/i586-mingw32/3.4.2/../../../../i586-mingw32/sys-include"
> ignoring nonexistent directory
>
"/users/ripley/mingw/lib/gcc/i586-mingw32/3.4.2/include"
> ignoring nonexistent directory
> "/users/ripley/mingw/i586-mingw32/sys-include"
> ignoring nonexistent directory
> "/users/ripley/mingw/i586-mingw32/include"
> #include "..." search starts here:
> #include <...> search starts here:
>  ../include
>  .
>  /home/schouwl/unpack/mingw/include
> 
>
/export/home/schouwl/unpack/mingw/bin/../lib/gcc/i586-mingw32/3.4.2/include
> 
>
/export/home/schouwl/unpack/mingw/bin/../lib/gcc/i586-mingw32/3.4.2/../../../../i586-mingw32/include
> End of search list.
> GNU C version 3.4.2 (mingw-special) (i586-mingw32)
>         compiled by GNU C version 3.4.2.
> GGC heuristics: --param ggc-min-expand=100 --param
> ggc-min-heapsize=131072
> dynload.c: In function `R_loadLibrary':
> dynload.c:97: warning: implicit declaration of
> function `_controlfp'
> dynload.c:97: error: `_MCW_IC' undeclared (first use
> in this function)
> dynload.c:97: error: (Each undeclared identifier is
> reported only once
> dynload.c:97: error: for each function it appears
> in.)
> dynload.c:98: warning: implicit declaration of
> function `_clearfp'
> dynload.c:102: error: `_MCW_EM' undeclared (first
> use
> in this function)
> dynload.c:102: error: `_MCW_RC' undeclared (first
> use
> in this function)
> dynload.c:102: error: `_MCW_PC' undeclared (first
> use
> in this function)
> make[3]: *** [dynload.o] Error 1
> make[2]: *** [../../bin/R.dll] Error 2
> make[1]: *** [rbuild] Error 2
> make: *** [all] Error 2
> 
> I then tried to have the sysadm create a soft link
> from  /users/ripley/mingw to
> /export/home/schouwl/unpack/mingw
> It did also not help.
> 
> Regards
> Lars Schouw
> 
> --- Prof Brian Ripley <ripley at stats.ox.ac.uk> wrote:
> > *If* you really have the header paths set
> correctly
> > it does work, and has 
> > been tested by several people.
> > 
> > Do read MkRules more carefully and think about how
> > your setting differs 
> > from the example given.  You have *not* as you
> claim
> > 
> > # Set this to where the mingw32 include files are.
> > It must be accurate.
> >
>
HEADER=/users/ripley/R/cross-tools4/i586-mingw32/include
> > 
> > if you used my cross-compiler build (and gave no
> > credit).  Hint: float.h 
> > is a `mingw32 include file'.
> > 
> > As the comment says, user error here is
> disastrous,
> > so please take the 
> > hint.
> > 
> > On Thu, 14 Apr 2005, Lars Schouw wrote:
> > 
> > > Hi
> > >
> > > I tried to cross compile R under Linux but get
> an
> > > error.
> > >
> > > i586-mingw32-gcc -isystem
> > > /home/schouwl/unpack/mingw/include -O2 -Wall
> > -pedantic
> > > -I../include -I. -DHAVE_CONFIG_H -DR_DLL_BUILD 
> -c
> > > dynload.c -o dynload.o
> > > dynload.c: In function `R_loadLibrary':
> > > dynload.c:94: warning: implicit declaration of
> > > function `_controlfp'
> > > dynload.c:94: error: `_MCW_IC' undeclared (first
> > use
> > > in this function)
> > > dynload.c:94: error: (Each undeclared identifier
> > is
> > > reported only once
> > > dynload.c:94: error: for each function it
> appears
> > in.)
> > > dynload.c:95: warning: implicit declaration of
> > > function `_clearfp'
> > > dynload.c:99: error: `_MCW_EM' undeclared (first
> > use
> > > in this function)
> > > dynload.c:99: error: `_MCW_RC' undeclared (first
> > use
> > > in this function)
> > > dynload.c:99: error: `_MCW_PC' undeclared (first
> > use
> > > in this function)
> > > make[3]: *** [dynload.o] Error 1
> > > make[2]: *** [../../bin/R.dll] Error 2
> > > make[1]: *** [rbuild] Error 2
> > > make: *** [all] Error 2
> > >
> > >
> > > This is the that was reported in the mailing
> list
> > > before.
> > >
> >
>
http://tolstoy.newcastle.edu.au/R/devel/04/12/1571.html
> > >
> > > I have set the HEADER correct in MkRules
> > 
> > No, you did not.
> > 
> > > HEADER=/home/schouwl/unpack/mingw/include
> > > The file float.h is located in the
> > > ../i586-mingw32/include/float.h
> > > from there.
> > >
> > > I am cross compiling R 2.0.1 source code.
> > >
> > > Help would be appreciated..
> > 
> > 
> > -- 
> > Brian D. Ripley,                 
> > ripley at 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
> > 
> 
> __________________________________________________

> protection 
=== message truncated ===




More information about the R-help mailing list