[R] Cross compiling R

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Feb 2 12:34:23 CET 2015


Cross-building is not supported (building R is more than just compiling 
and needs a working R executable).

And (see the posting guide) this was not the right list for such a question.

On 02/02/2015 07:16, Vivek Rangi wrote:
> Hi!
>
>        I am cross compiling R-3.1.2 for Galileo board with the source code. I am able to configure R-3.1.2 without any errors with the following command :
>
> ./configure --host=i586-poky-linux-uclibc CC=i586-poky-linux-uclibc-gcc CXX=i586-poky-linux-uclibc-g++ F77=i586-poky-linux-uclibc-gfortran CPPFLAGS=-I/opt/clanton-tiny/1.4.2/sysroots/i586-poky-linux-uclibc/usr/include/ LDFLAGS="-L/opt/clanton-tiny/1.4.2/sysroots/i586-poky-linux-uclibc/usr/lib/ --sysroot=/opt/clanton-tiny/1.4.2/sysroots/i586-poky-linux-uclibc" --prefix=/home/vivek/Smart_Tracker/R/R-3.1.2/vivek --with-readline=no --with-x=no
>
>
> But when I am cross compiling R, I am getting following error :
>
> i586-poky-linux-uclibc-gcc -std=gnu99 -I../../../../include -DNDEBUG -I../../../include -I../../../../src/include -DHAVE_CONFIG_H -I../../../../src/main -I/opt/clanton-tiny/1.4.2/sysroots/i586-poky-linux-uclibc/usr/include/   -fvisibility=hidden -fpic  -O2 -pipe -g -feliminate-unused-debug-types  -c gramRd.c -o gramRd.o
> i586-poky-linux-uclibc-gcc -std=gnu99 -shared -L/opt/clanton-tiny/1.4.2/sysroots/i586-poky-linux-uclibc/usr/lib/ --sysroot=/opt/clanton-tiny/1.4.2/sysroots/i586-poky-linux-uclibc -o tools.so text.o init.o Rmd5.o md5.o signals.o install.o getfmts.o http.o gramLatex.o gramRd.o
> make[6]: Entering directory `/home/vivek/Smart_Tracker/R/R-3.1.2/src/library/tools/src'
> mkdir -p -- ../../../../library/tools/libs
> make[6]: Leaving directory `/home/vivek/Smart_Tracker/R/R-3.1.2/src/library/tools/src'
> make[5]: Leaving directory `/home/vivek/Smart_Tracker/R/R-3.1.2/src/library/tools/src'
> make[4]: Leaving directory `/home/vivek/Smart_Tracker/R/R-3.1.2/src/library/tools'
> ../../../bin/R: line 259: /home/vivek/Smart_Tracker/R/R-3.1.2/bin/exec/R: No such file or directory
> make[3]: *** [all] Error 127
> make[3]: Leaving directory `/home/vivek/Smart_Tracker/R/R-3.1.2/src/library/tools'
> make[2]: *** [R] Error 1
> make[2]: Leaving directory `/home/vivek/Smart_Tracker/R/R-3.1.2/src/library'
> make[1]: *** [R] Error 1
> make[1]: Leaving directory `/home/vivek/Smart_Tracker/R/R-3.1.2/src'
> make: *** [R] Error 1
>
>
> "/home/vivek/Smart_Tracker/R/R-3.1.2/bin/exec/R" exits in the system. It seems it generates the "R" executable for the Galileo board and also, it tries to run the executable to generate the base packages for R. Since the "R" executable (/home/vivek/Smart_Tracker/R/R-3.1.2/bin/exec/R) is not for x86 system but for Galileo board, it is not able to execute it and hence the error.  Can somebody guide me as how to cross compile R?
>
> Regards,
> Vivek


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Emeritus Professor of Applied Statistics, University of Oxford
1 South Parks Road, Oxford OX1 3TG, UK



More information about the R-help mailing list