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

From: Stéphane Dray <dray_at_biomserv.univ-lyon1.fr>
Date: Mon 08 Jan 2007 - 17:01:53 GMT

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 dllversion.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@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

R-help@stat.math.ethz.ch mailing list
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Received on Tue Jan 09 04:24:32 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 09 Jan 2007 - 06:30:29 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.