[R] bug? nlme 3.1-88 compilation under linx

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat Apr 5 21:03:02 CEST 2008


On Sat, 5 Apr 2008, Larry Snyder wrote:

> On Sat, 5 Apr 2008, Prof Brian Ripley wrote:
>
>> Why are you asking here if you should submit a bug report on your compiler?
>
> I was asking so that I'd get exactly this answer back!
>
> More seriously, I thought there was a chance that the problem was specific to 
> the particular compilation, but I know nothing about gcc
> and R compilation, so I'm happy to take your word that -
>
>> This is not a bug in R, but in your compilation enviroment.
>
>
>> If you update your compiler you may well need to reinstall R -- you did not 
>> mention that you did so.
>
> I didn't do that.  That shouldn't have anything to do with this problem 
> though, right?  But I suppose it's a good idea regardless.  Thanks.

It should.  One of the things recorded during the build is if
-fvisibility=hidden works.  So if the compiler has changed, that may have 
changed (but gcc 4.2.3 should support it).  Another thing that is recorded 
is various paths, and quite possibly the reason this fails is because you 
are getting the wrong 'cc1' as a result.  And definitely if you change 
your Fortran compiler you need to at least re-configure R, as the Fortran 
library paths are recorded -- so compiling any package with Fortran code 
would most likely not work.

(I have actually updated a compiler and found that -fvisibility=hidden was 
not longer supported -- but that was in the days of gcc3 and extensive 
RedHat modifications.)

>> BTW, R is not setting '-mcpu=i686 -pipe', but your Linux distro may be.
>
> Thanks for that, too!
>
> larry
>
>
>
>> 
>> 
>> On Sat, 5 Apr 2008, Larry Snyder wrote:
>> 
>>> 
>>>> From http://bugs.r-project.org/cgi-bin/R:
>>>
>>>   If you are not sure whether you have observed a bug or not, it is a good
>>>   idea to ask on the mailing list R-Help by sending an e-mail to
>>>   r-help at stat.math.ethz.ch rather than submitting a bug report.
>>> 
>>> I'm wondering whether to submit a bug report on this:
>>> 
>>> ==============================================================
>>>> install.packages("nlme")
>>>   ((several lines removed))
>>> * Installing *source* package 'nlme' ...
>>> ** libs
>>> i686-pc-linux-gnu-gcc -I/usr/lib/R/include -I/usr/lib/R/include
>>> -I/usr/local/include   -fvisibility=hidden -fPIC  -O2 -mcpu=i686 -pipe
>>> -std=gnu99 -c corStruct.c -o corStruct.o
>>> cc1: error: unrecognized option `-fvisibility=hidden'
>>> make: *** [corStruct.o] Error 1
>>> ERROR: compilation failed for package 'nlme'
>>> ==============================================================
>>> 
>>> Here's my configuration:
>>> 
>>>> uname -a
>>>> Linux conception.wustl.edu 2.6.12-gentoo-r9 #3 SMP Mon Aug 29 14:00:05
>>>> CDT 2005 i686 Intel(R) Pentium(R) 4 CPU 2.80GHz GenuineIntel GNU/Linux
>>> 
>>> This error occurred after I upgraded my gcc to the newest version (it
>>> also occurred with the previous version):
>>> 
>>>> gcc-config -c
>>>> i686-pc-linux-gnu-4.2.3
>>> 
>>> To see if the "-fvisibility=hidden" problem was a bug in gcc, I tried
>>> using it in a toy compilation:
>>> 
>>>> echo 'main() { }' > in.c
>>>> gcc  -fvisibility=hidden in.c
>>> 
>>> This returned without an error.
>>> 
>>> Then I tried:
>>> 
>>>> i686-pc-linux-gnu-gcc -I/usr/lib/R/include -I/usr/lib/R/include
>>>   -I/usr/local/include   -fvisibility=hidden -fPIC  -O2 -mcpu=i686 -pipe
>>>   -std=gnu99 -c in.c
>>>> `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
>>>> in.c:1: warning: return type defaults to 'int'
>>> 
>>> Conclusion: my gcc seems to accept -fvisibility=hidden.
>>> 
>>> So: Should I submit a bug report on this?  Thanks -
>>> 
>>> larry
>>> 
>>> 
>>> 
>>> --
>>> Larry Snyder                                  larry at eye-hand.wustl.edu
>>> Associate Professor of Neurobiology             www.eye-hand.wustl.edu
>>> Washington University, School of Medicine      Office:  (314) 747-3530
>>> Dept of Anatomy & Neurobiology,  Box 8108      Lab:     (314) 747-4095
>>> 660 S Euclid Ave, St. Louis, MO 63110          Fax:     (314) 747-4370
>>> 
>>> ______________________________________________
>>> R-help at r-project.org mailing list
>>> https://stat.ethz.ch/mailman/listinfo/r-help
>>> PLEASE do read the posting guide 
>>> http://www.R-project.org/posting-guide.html
>>> and provide commented, minimal, self-contained, reproducible code.
>>> 
>> 
>> -- 
>> 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
>> 
>
> -- 
> Larry Snyder                                  larry at eye-hand.wustl.edu
> Associate Professor of Neurobiology             www.eye-hand.wustl.edu
> Washington University, School of Medicine      Office:  (314) 747-3530
> Dept of Anatomy & Neurobiology,  Box 8108      Lab:     (314) 747-4095
> 660 S Euclid Ave, St. Louis, MO 63110          Fax:     (314) 747-4370
>

-- 
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



More information about the R-help mailing list