Skip to content

R installation problems...

18 messages · M. Edward (Ed) Borasky, Martyn Plummer, Peter Kleiweg +3 more

#
Dear all

I already posted this problem to r-help in mid-decembre; see

  http://www.r-project.org/nocvs/mail/r-help/2000/3876.html

But, up to now it did not manage to get R properly working.

I reinstalled R-1.0.0, R-1.1.1 and R-1.2.0 from scratch, and 
always run into the same error message:

  ...
  [Previously saved workspace restored]

  now dyn.load(/usr/R/lib/R/library/ctest/libs/ctest.so)..
  >R_ReplConsole(): before "for(;;)" {main.c}
  Segmentation fault (core dumped)

Note that within each directory (i.e. /usr/R-1.0.0, /usr/R-1.1.1 
or /usr/R-1.2.0) I did the following commands:

   $ ./configure --with-f2c --prefix=/usr/R 
   $ make 

and R was configured with

  Source directory:          .
  Installation directory:    /usr/R
  C compiler:                gcc  -mieee-fp -D__NO_MATH_INLINES -g -O2
  C++ compiler:              c++  -mieee-fp -g -O2
  FORTRAN compiler:          f2c 
  X11 support:               yes
  Gnome support:             no
  Tcl/Tk support:            yes
  R profiling support:       yes
  R as a shared library:     no
 
Before each call of "make install", I cleaned the "/usr/R" directory. 
Each time I used the command

  $ /usr/R/bin/R

I even tried to install the RPMS and SRPMS, but I always get the same
error message :-(

There's sth. strange going on and I would appreciate any help.

Greets

  Diego
#
Peter Dalgaard BSA wrote:
Most packages are upgraded on a regular basis (incl. kernel), and
so the term "RedHat 6.0" may be vague on my PC. For instance the 
version of gcc is 2.7.2.3, GNU ld is version 2.9.1, and glibc is
version 2.1.3.
But, how comes that I always worked before, i.e. with releases
smaller than 1.0.0 and even with 1.0.0 it worked some time ago.

Greets + thanks for your help.

  Diego
#
Diego Kuonen <Diego at kuonen.com> writes:
...
Is this still RedHat 6.0? Have you considered an upgrade?
I wouldn't be too surprised if e.g. glibc had an error affecting dynamic
loading in that particular version.
#
Sequence of events:

1. I loaded a two-processor Pentium Pro system with Red Hat Linux 7.0. I
loaded *everything*.

2. I downloaded R-base-1.1.1-3.i386.rpm from the CRAN archive and
installed it with no problems.

3. Then I spotted R-base-1.2.0-2.i386.rpm and downloaded it. It
installed fine, but when I tried to execute the "demo("graphics")"
command it gave some errors.

4. Then I downloaded R-base-1.2.0-3.src.rpm and tried to build it. The
build job blew up.

5. Finally, I downloaded the latest gcc (2.96-69) and latest glibc (2.2-9)
from Red Hat and installed them.

6. Now the R-base-1.2.0-3.src.rpm builds successfully, and the resulting
R-base-1.2.0-3.i386.rpm installs and the 'demo("graphics")' runs to
completion.
--
znmeb at teleport.com (M. Edward Borasky) http://www.borasky-research.com

How to Stop A Folksinger Cold # 3
"If you miss the train I'm on..."
Tough.

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
I'm sorry you had so much difficulty getting R to install on Red Hat
Linux 7.0.  The moral of this story is that you should keep your box up
to date with the latest official updates from Red Hat. Specifically

- To run R, you should upgrade glibc.  The version that comes "out
  of the box" on RH7.0 is a pre-release version of glibc 2.2 and is
  buggy.

- To build R yourself, you should upgrade gcc. The version that comes
  with RH7.0 is contains two bugs that prevent R from working correctly.
  These are detailed at
  ftp://calvin.iarc.fr/pub/R/RedHat/7.x/i386/DIY/ReadMe
  gcc-2.96-65 and above contains patches for these bugs.

Martyn
On 09-Jan-01 znmeb at borasky-research.com wrote:
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Martyn Plummer skriver...
I built R 1.1.0 and R 1.2.0 without problems on RedHat 5.0,
with gcc version 2.7.2.3.
#
On 10-Jan-01 Peter Kleiweg wrote:
My comments were specific to Red Hat 7.0.  I'm sorry if this
wasn't clear.

Martyn
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Martyn Plummer skriver...
You wrote: "The moral of this story is that you should keep your
box up to date with the latest official updates from Red Hat."
#
On 10-Jan-01 Peter Kleiweg wrote:
And so you should.  But an update is not the same thing as an upgrade.
Red Hat releases security fixes, bug fixes and package enhancements for
each release. See

http://www.redhat.com/errata

This is what I am referring to. They are equivalent to the "service packs"
released by Microsoft. There are about 80 updates for Red Hat 5.0.

Martyn

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
#
Peter Dalgaard BSA wrote:
With regard to Martyn Plummer's recent posting (thanks 2 Martyn 4 this), 
I just updated to gcc 2.96-69 and glibc 2.2-9 from Red Hat, but I run 
exactly into the same error messages. What's strange is that the

  make check

works without any problems! Moreover, I get plenty of 

  warning: nothing can be pasted after this token 
 
when compiling. I read Paul Johnson's comments on this: 

  http://www.ens.gu.edu.au/robertk/R/help/00b/1121.html

but I already took the updated cpp version as explained
on

  ftp://calvin.iarc.fr/pub/R/RedHat/7.x/i386/DIY/ReadMe

or

  http://www.redhat.com/support/errata/RHBA-2000-132.html

I also tried Luke Tierney's suggestion

  http://www.ens.gu.edu.au/robertk/R/help/00b/1058.html

but did not get sth. like

  ".""so" 

Once again, note that "make check" worked properly!

I tried this with R-1.1.1 and R-1.2.0.

Do I need to downgrade to gcc 2.95? 

I appreciate any help.

Sincerely

  Diego Kuonen
#
On Wed, 10 Jan 2001, Diego Kuonen wrote:

            
Those are just warnings.  I am convinced that the R code was right
(according to C99 at least) but I don't think the gcc maintainers have
been.

Could you please try R-patched.  This has a workaround for this, and as
1.2.1 is due next week, we would be happy to know if the warnings go away.
Also, you will get a better R using R-patched.

[...]
But don't trust RH7.0 either!
#
Diego Kuonen <Diego at kuonen.com> writes:
I think we settled that these are (annoying but) benign.
Somehow I don't think that would help. If "make" can run R, so can
you! Something else must be getting in the way. Can you run "/path/to/R
--vanilla"? Do you perhaps have any strange environment variables? 
Can you run the version of R that is in your build directory?
#
Peter Dalgaard BSA wrote:
Within the build directories:

   $ /usr2/R-1.0.0/bin/R --verbose --vanilla
   R : Copyright 2000, The R Development Core Team
   Version 1.0.0  (February 29, 2000)
   ...
   >R_ReplConsole(): before "for(;;)" {main.c}
   Segmentation fault


   $ /usr2/R-1.1.1/bin/R --verbose --vanilla
   R : Copyright 2000, The R Development Core Team
   Version 1.1.1  (August 15, 2000)
   ...
   >R_ReplConsole(): before "for(;;)" {main.c}
   Segmentation fault


   $ /usr2/R-1.2.0/bin/R --verbose --vanilla
   R : Copyright 2000, The R Development Core Team
   Version 1.2.0  (2000-12-15)
   ...
   now dyn.load(/usr2/R-1.2.0/library/ctest/libs/ctest.so)..
   >R_ReplConsole(): before "for(;;)" {main.c}
   Segmentation fault


I configured all version with 

   ./configure --with-f2c --prefix=/usr/R 

and before "make install" I always performed a "make check" and
removed all files in "/usr/R", except all contributed libraries.

I get the same error messages as above, and the "make check" always
worked properly.

Thanks for your help.

Greets

  Diego
#
Prof Brian Ripley wrote:
Ok. Thanks. After downloading the latest R-patched from

  http://cran.r-project.org/src/devel/

I did

  $ gzip -dc R-patched.tar.gz | tar xvf -
  $ cd R-patched/
  $ ./configure --prefix=/usr/R
  ...
  R is now configured for i686-pc-linux-gnu

    Source directory:          .
    Installation directory:    /usr/R
    C compiler:                gcc  -mieee-fp -D__NO_MATH_INLINES -g -O2
    C++ compiler:              c++  -mieee-fp -g -O2
    FORTRAN compiler:          g77  -g -O2

    X11 support:               yes
    Gnome support:             no
    Tcl/Tk support:            yes

    R profiling support:       yes
    R as a shared library:     no
  $ make
  ...

And, indeed, all warnings went away :-) 

The "make" performed properly as well as the "make check", but:

  $ /usr2/R-patched/bin/R --verbose --vanilla
  R : Copyright 2001, The R Development Core Team
  Version 1.2.0 Patched (2001-01-09)
  ...
  now dyn.load(/usr2/R-patched/library/ctest/libs/ctest.so)..
  >R_ReplConsole(): before "for(;;)" {main.c}
  Segmentation fault

After a "make install" nothing changes:

  $ /usr/R/bin/R --verbose --vanilla
  R : Copyright 2001, The R Development Core Team
  Version 1.2.0 Patched (2001-01-09)
  ...
  now dyn.load(/usr/R/lib/R/library/ctest/libs/ctest.so)..
  >R_ReplConsole(): before "for(;;)" {main.c}
  Segmentation fault

:-(
:-) that's a good point :-)

Greets + thanks...

  Diego
#
Diego Kuonen <Diego at kuonen.com> writes:
This is perplexing! Could you please try "/path/to/R -d gdb" and
inside gdb do 

run  --verbose --vanilla

then at the point of the crash do a "bt" command and tell us what it
says.

One thing that could cause trouble is if some higher directory (eg
/usr/R) is not readable, since make is generally using relative paths.
#
Peter Dalgaard BSA wrote:
$ /usr2/R-patched/bin/R -d gdb 
  GNU gdb 4.17
  ...
  (gdb) run  --verbose --vanilla
  Starting program: /usr2/R-patched/bin/R.bin --verbose --vanilla
  R : Copyright 2001, The R Development Core Team
  Version 1.2.0 Patched (2001-01-09)
  ...
  now dyn.load(/usr2/R-patched/library/ctest/libs/ctest.so)..
  >R_ReplConsole(): before "for(;;)" {main.c}

  Program received signal SIGSEGV, Segmentation fault.
  0x4011e1d1 in _IO_fflush (fp=0x401cce60) at iofflush.c:41
  iofflush.c:41: No such file or directory.
  (gdb) bt
  #0  0x4011e1d1 in _IO_fflush (fp=0x401cce60) at iofflush.c:41
  #1  0x4004e738 in rl_prep_terminal ()
  #2  0x4005835b in _rl_callback_newline ()
  #3  0x400583c1 in rl_callback_handler_install ()
  #4  0x80ec24e in Rstd_ReadConsole (prompt=0x81e3c00 "> ", buf=0xbfffec90 "", 
      len=1024, addtohistory=1) at sys-std.c:369
  #5  0x80e9c14 in R_ReadConsole (prompt=0x81e3c00 "> ", buf=0xbfffec90 "", len=1024, 
      addtohistory=1) at system.c:61
  #6  0x80990b1 in R_ReplConsole (rho=0x81e5a6c, savestack=0, browselevel=0)
      at main.c:135
  #7  0x80998e1 in run_Rmainloop () at main.c:491
  #8  0x8099914 in Rf_mainloop () at main.c:505
  #9  0x80e9cd6 in main (ac=3, av=0xbffff164) at system.c:88
  #10 0x400cdbfc in __libc_start_main (main=0x80e9cc0 <main>, argc=3, 
      ubp_av=0xbffff164, init=0x8056568 <_init>, fini=0x8125c6c <_fini>, 
      rtld_fini=0x4000d674 <_dl_fini>, stack_end=0xbffff15c)
      at ../sysdeps/generic/libc-start.c:118
  (gdb) quit


With R-1.2.0 (release) I get exactly the same messages.
Everything is owned by root, and I'm running R as root, so this should
not be the case.

Greets + many thanks for your help.

  Diego Kuonen
#
Diego Kuonen <Diego at kuonen.com> writes:
Aha. I think you need to look at your readline library installation.
Can you run R --no-readline ?
#
Peter Dalgaard BSA wrote:
So cool: "R --no-readline" works properly :-)

I just upgraded to readline version 4.1-5, but even after an entire
recompilation of R-patched it still dumps without the "--no-readline"
flag. Do I need to upgrade other packages as well?

I appreciate your help.

Greets

  Diego