[Rd] Undefined symbol "Rf_pythag" while loading spatstat

Rainer Hurling rhurlin at gwdg.de
Sat Mar 19 17:02:27 CET 2011


On 19.03.2011 15:52 (UTC+1), Prof Brian Ripley wrote:
> On Sat, 19 Mar 2011, Rainer Hurling wrote:
>
>> Today I installed the newest R develepment branch
>> R version 2.14.0 Under development (unstable) (2011-03-18 r54866)
>> on FreeBSD 9.0-CURRENT (amd64). All seems fine so far.
>
> But that is very raw: testing on 2.13.0 alpha would be more useful at
> this point.

Yes, it is raw. But I need it for some reason.

Testing of 2.13.0 alpha (r54865) on FreeBSD 9.0-CURRENT (amd64) shows no 
problems so far. For testing purposes, I customized the port math/R from 
b.f. and built from that port, so R installed correct on FreeBSD with 
gcc45 and gfortran45.

As to be expected, I had no problems with R packages using pythag on 
2.13.0 alpha. All needed packages could beinstalled. Also, some of my 
more complicated R scripts (with database access, spatial computings and 
pdf production) work fine.

>> After that I updated my R packages with option 'checkBuilt=TRUE'.
>> There are four packages (spatstat, pscl, adehabitatLT, adehabitatHR)
>> which gives an error like this:
>>
>> Error in dyn.load(file, DLLpath = DLLpath, ...) :
>> kann shared object
>> '/usr/local/lib/R/library/spatstat/libs/spatstat.so' nicht laden:
>> /usr/local/lib/R/library/spatstat/libs/spatstat.so: Undefined symbol
>> "Rf_pythag"
>> Fehler: loading failed
>> Ausführung angehalten
>> Fehler: loading failed
>>
>>
>> Searching around I found a hint in
>> http://developer.r-project.org/R_svnlog_2011 about upcoming changes
>> with 'Rf_pythag':
>>
>> ------------------------------------------------------------------------
>> r54767 | ripley | 2011-03-13 07:30:32 -0400 (Sun, 13 Mar 2011) | 1 line
>> Changed paths:
>> M /trunk/doc/NEWS.Rd
>> M /trunk/src/include/Rmath.h0.in
>> M /trunk/src/nmath/imax2.c
>>
>> keep Rf_pythag for a little longer
>> ------------------------------------------------------------------------
>>
>>
>> R News of newest devel has three entries about the change:
>>
>> CHANGES IN R VERSION 2.14.0:
>> DEPRECATED AND DEFUNCT:
>> o The entry point pythag formerly in Rmath.h is defunct: use
>> instead the C99 function hypot.
>> CHANGES IN R VERSION 2.13.0:
>> C-LEVEL FACILITIES:
>> o pythag duplicated the C99 function hypot. It is no longer
>> provided, but is used a substitute for hypot in the very unlikely
>> event that the latter is not available.
>> DEPRECATED & DEFUNCT:
>> o The entry point pythag in Rmath.h is deprecated in favour of the
>> C99 function hypot. A wrapper for hypot is provided for R 2.13.x
>> only.
>>
>>
>> Because of that informations I attempted to change 'pythag' against
>> 'hypot' in spatstat/src/lookup.c and it works. Is this the only
>> required adaption which has to be done on the four named packages?
>
> For adehabitatLT, adehabitatHR, simply update. For pscl, spatstat,
> change pythag to hypot -- the maintainers have been asked for updates.

Ok, as I suspected. You had been aware of these packages before ;-)

> You can see CRAN R-devel test results on the CRAN check page. There are
> a number of other failures due to deprecated -> defunct changes (we make
> them very early in the development cycle).

I know of this page. It is very useful for identifying problems with 
packages, especially on Windows, Linux, OSX and Solaris. Understandably 
it does not support my 'rare' platform FreeBSD directly ;-)

Thanks for anwsering and clearing up my request,
Rainer Hurling



More information about the R-devel mailing list