[R] Cross-compilation of R and ld bug ?

Stéphane Dray dray at biomserv.univ-lyon1.fr
Mon Jan 8 18:01:53 CET 2007

Hello list,

I would like to cross-compile R packages using R 2.4.0. I am working on 
Linux Debian and cross-compiled (windows binaries) without problems with 
older R version.
I have used the doc of Yan and Rossini in the contributed section of the 
R documentation (same version of MinGW...).
When I try to cross-compile R (make R), the procedure stopped and returns :
i586-mingw32-windres  --include-dir ../include -i dllversion.rc -o 
i586-mingw32-gcc  -shared -s -mwindows -o R.dll R.def console.o 
dataentry.o dynl oad.o edit.o editor.o embeddedR.o extra.o opt.o pager.o 
preferences.o psignal.o rhome.o rui.o run.o shext.o sys-win32.o system.o 
e_pow.o malloc.o ../main/libmai n.a ../appl/libappl.a 
../nmath/libnmath.a graphapp/ga.a getline/gl.a ../extra/xd r/libxdr.a 
../extra/zlib/libz.a ../extra/pcre/libpcre.a ../extra/bzip2/libbz2.a 
../extra/intl/libintl.a ../extra/trio/libtrio.a dllversion.o -L. -lg2c 
-lRblas - lcomctl32 -lversion
undefin ed reference to `__pcre_ucp_findprop'
undefin ed reference to `__pcre_ucp_findprop'
undefin ed reference to `__pcre_ucp_findprop'
undefin ed reference to `__pcre_ucp_findprop'
undefin ed reference to `__pcre_ucp_findprop'
more un defined references to `__pcre_ucp_findprop' follow
collect2: ld returned 1 exit status
make[4]: *** [R.dll] Erreur 1
make[3]: *** [../../bin/R.dll] Erreur 2
make[2]: *** [rbuild] Erreur 2
make[1]: *** [all] Erreur 2
make[1]: quittant le répertoire « 
/home/stephane/Rdev/CrossCompileBuild/WinR/R-2 .4.0/src/gnuwin32 »
I have read (http://www.murdoch-sutherland.com/Rtools/) that a bug 
exists for ld version 2.16.91 20050827 and that Prof Ripley produced a 
patched version. It seems that my problem is also related to ld (and I 
have the same version). So I wonder if the same bug could be responsible 
of the error in the cross-compiler.
Two questions:
- Are they other people which have the same problem when cross-compiling 
R on Linux
- Is it possible that the problem is related to ld. If yes, is it 
possible to obtain a patched version ?

Thanks in advance.

Stéphane DRAY (dray at biomserv.univ-lyon1.fr )
Laboratoire BBE-CNRS-UMR-5558, Univ. C. Bernard - Lyon I
43, Bd du 11 Novembre 1918, 69622 Villeurbanne Cedex, France
Tel: 33 4 72 43 27 57       Fax: 33 4 72 43 13 88

More information about the R-help mailing list