From simon.urbanek at r-project.org  Fri Jan 19 21:51:42 2007
From: simon.urbanek at r-project.org (Simon Urbanek)
Date: Fri, 19 Jan 2007 15:51:42 -0500
Subject: [Rd] Cross-compile errors under R-2.4.0 and R-2.4.1
In-Reply-To: <45B11E50.8020007@cimr.cam.ac.uk>
References: <f13f1c9c0701190046n4c487253l2925427712155002@mail.gmail.com>
	<Pine.LNX.4.64.0701191829070.31465@gannet.stats.ox.ac.uk>
	<45B11E50.8020007@cimr.cam.ac.uk>
Message-ID: <EF6CE7F1-8027-486A-B9E0-8267B54F46B3@r-project.org>


On Jan 19, 2007, at 2:38 PM, Hin-Tak Leung wrote:

> Prof Brian Ripley wrote:
>> The 2.4.0 issue has been well documented only last week, in the  
>> thread
>>
>> https://stat.ethz.ch/pipermail/r-help/2007-January/123303.html
>>
>> as well as in an answer I had already posted.
>>
>> I am almost certain the issue for 2.4.1 is user error.  Remember  
>> you need
>> to set in MkRules
>>
>> ## =================== cross-compilation settings  =================
>>
>> ...
>>
>> # path (possibly full path) to same version of R on the host system
>> # R_EXE=R
>>
>> R 2.4.1 does have seq_along, so it must not be the same version.
>
> I feel that one point in the cross-build related documentation  
> wasn't emphasized enough, and may have caused this sort of error  
> when one tries to build multiple versions of R: the version of  
> native R used *must* match the version of cross R one intends to  
> build.
>

In fact, there is even one more caveat which I don't remember seeing  
mentioned - it *must* be a build without r_arch set, otherwise the  
cross-build fails as well (despite a correct version). I got bitten  
by this recently when trying to use the OS X binary for cross-building..

And while we are at cross-building, it is possible to generate chm  
manuals via hhc through wine, but you have to use original itss.dll  
instead of the one supplied by wine. The hhw path in MkRules must  
then point to the local directory on the host (because it's used for  
the headers files) and you'll have to create shell-wrapper for hhc  
that looks somewhat like "wine hhc.exe $*".

Cheers,
Simon

>
>> On Fri, 19 Jan 2007, Daniel Berg wrote:
>>
>>> Dear all,
>>>
>>> I already posted a question regarding this to an existing thread:
>>> http://tolstoy.newcastle.edu.au/R/e2/devel/06/10/0852.html#start
>>>
>>> I apologize for the double posting but I have some further  
>>> information
>>> that might be illuminating.
>>>
>>> I am trying to cross-compile my R-package under ubuntu linux, kernel
>>> 2.6.17-10-generic, on an IBM T60.
>>>
>>> I am following the suggested steps in
>>> http://cran.r-project.org/doc/contrib/cross-build.pdf
>>>
>>> I have tried changing R = R-x.x.x (2.3.1, 2.4.0 and 2.4.1) in
>>> http://cran.ii.uib.no/doc/contrib/Makefile-rcb
>>>
>>> 1) For R-2.3.1 everything works fine
>>> 2) For R-2.4.0 I receive the following error messages from 'make R':
>>>
>>> ../extra/pcre/libpcre.a(pcre_dfa_exec.o):pcre_dfa_exec.c:(.text 
>>> +0x1f2a):
>>> more undefined references to `__pcre_ucp_findprop' follow
>>> collect2: ld returned 1 exit status
>>> make[4]: *** [R.dll] Error 1
>>> make[3]: *** [../../bin/R.dll] Error 2
>>> make[2]: *** [rbuild] Error 2
>>> make[1]: *** [all] Error 2
>>> make[1]: Leaving directory
>>>
>>> There is already a post that seems to address the same error:
>>> http://tolstoy.newcastle.edu.au/R/e2/devel/06/10/0852.html#start
>>>
>>> However, I have tried the suggestions there with no further success
>>> and I am awaiting further instructions before pursuing that  
>>> solution.
>>>
>>> 3) For R-2.4.1 I receive the following error message from 'make R',
>>> under 'Making package tools':
>>>
>>> preparing package tools for lazy loading
>>> Error in makeLazyLoadDB(ns, dbbase) : could not find function  
>>> "seq_along"
>>> Execution halted
>>>
>>>
>>> Hope this is illuminating and that the 'bugs', whether it is in R or
>>> in PCRE, can be resolved for the next release, this would be highly
>>> appreciated. Meanwhile, any suggestions as to how I can cross- 
>>> compile
>>> successfully under R-2.4.1 are most welcome.
>>>
>>> Best wishes,
>>> Daniel Berg
>>>
>>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
>



[Rd] Cross-compile errors under R-2.4.0 and R-2.4.1
Simon Urbanek