From ripley at stats.ox.ac.uk  Tue Jun 13 14:11:54 2006
From: ripley at stats.ox.ac.uk (Prof Brian Ripley)
Date: Tue, 13 Jun 2006 13:11:54 +0100 (BST)
Subject: [Rd] normalizePath() warning
In-Reply-To: <448EAA54.30004@jhsph.edu>
References: <448DD44B.60204@jhsph.edu> <448E20BE.9090701@stats.uwo.ca>
	<Pine.LNX.4.64.0606130712030.24883@gannet.stats.ox.ac.uk>
	<448EAA54.30004@jhsph.edu>
Message-ID: <Pine.LNX.4.64.0606131309210.27228@gannet.stats.ox.ac.uk>

On Tue, 13 Jun 2006, Roger D. Peng wrote:

>
>
> Prof Brian Ripley wrote:
>> On Mon, 12 Jun 2006, Duncan Murdoch wrote:
>> 
>>> On 6/12/2006 4:53 PM, Roger D. Peng wrote:
>>>> I've been getting the following warning after running 
>>>> 'install.packages()' recently:
>>>> 
>>>> Warning message:
>>>> insufficient OS support on this platform in: normalizePath(path)
>>>> 
>>>> Does anyone know what this means?  And does anyone know how I can get rid 
>>>> of the
>>>> warning?  I've just installed R on a fresh FC5 system so I feel I might 
>>>> have
>>>> forgotten to install a package/library or something.
>>> 
>>> This is printed when your R source was compiled without these defines:
>>> 
>>> #if defined(HAVE_GETCWD) && defined(HAVE_REALPATH)
>>> 
>>> I guess you can look in your config log to see why you don't have those.
>> 
>> This worked for me on a vanilla FC5 system.  I guess the issue is likely to 
>> be realpath, whose definition is enclosed by
>> 
>> #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
>> #endif
>> 
>> so I would review the compiler options used:  -std=gnu99 is recommended 
>> (and selected by default).  I do get the warning with -std=c89 and 
>> -std=c99.
>
> Indeed, my modification of CFLAGS was the problem.  However, if I may offer a 
> meager defense, the comments for CFLAGS in 'config.site' say:
>
> 	If unspecified, defaults to '-g -O2 -std=c99' for gcc

Thanks, will update that.  I've also made the code try harder to find 
realpath even if the header has hidden it.

-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



[Rd] normalizePath() warning
Prof Brian Ripley