[Rd] OpenBSD-alpha and R-1.7.1 problem

Peter Rye prye at shiraz.apana.org.au
Tue Jul 29 13:19:04 MEST 2003


I'm trying to get R running on OpenBSD/alpha.

I've applied some configure patches which I've previously sent to the
R-devel list to allow R to compile on an OpenBSD ELF platform (which
OpenBSD/alpha is, as the i386 port soon will be).

The patched source compiles without problems, and appears to run and
perform properly apart from two (possibly unrelated) problems.

1) On startup there are complaints about mismatched symbol sizes (see
   below). This error message comes from the OpenBSD ld.so, and doesn't
   occur on OpenBSD/i386.

   On further investigation this seems to occur when the modreg and ts
   packages are loaded together. In both packages, the R_*MethodDef arrays
   are declared globally rather than "static const". Changing these
   declarations to static const results in the warning disappearing. I
   think this is *probably* a correct fix. Am I missing something or am I
   talking/writing garbage. The patch is straightforward, I can send it to
   one of you if you wish - then again perhaps it's not the right fix.

2) The second problem is that R core dumps with a SIGFPE on any attempt to
   access a graphics device. The source was compiled with -mieee and again
   with -mieee-with-inexact using gcc. I have tried turning off
   optimisation and turning off the "stack-protector" (which I think is an
   OpenBSD thing) with no improvement. Unfortunately I am having trouble
   finding the location of the FPE. This may not be entirely an R problem,
   but if anyone can shed any light on where to go from here, I would be
   grateful. See below for some other details.

Regards,
Peter Rye



=====================
Startup errors
=====================

shiraz:/var/tmp/R-1.7.1/bin$ ./R

R : Copyright 2003, The R Development Core Team
Version 1.7.1  (2003-06-16)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type `license()' or `licence()' for distribution details.

R is a collaborative project with many contributors.
Type `contributors()' for more information.

Type `demo()' for some demos, `help()' for on-line help, or
`help.start()' for a HTML browser interface to help.
Type `q()' to quit R.

[Previously saved workspace restored]

/var/tmp/R-1.7.1/bin/R.bin: /var/tmp/R-1.7.1/library/ts/libs/ts.so : WARNING: symbol(FortEntries) size mismatch relink your program
/var/tmp/R-1.7.1/bin/R.bin: /var/tmp/R-1.7.1/library/ts/libs/ts.so : WARNING: symbol(CallEntries) size mismatch relink your program
/var/tmp/R-1.7.1/bin/R.bin: /var/tmp/R-1.7.1/library/ts/libs/ts.so : WARNING: symbol(CEntries) size mismatch relink your program
> search()
[1] ".GlobalEnv"      "package:methods" "package:ctest"   "package:mva"    
[5] "package:modreg"  "package:nls"     "package:ts"      "Autoloads"      
[9] "package:base"   
> q() 
Save workspace image? [y/n/c]: n



=======================================================
Minimum packages which trigger the error modreg and ts:
=======================================================

shiraz:/var/tmp/R-1.7.1/bin$ R_DEFAULT_PACKAGES="modreg, ts" ./R --silent    
/var/tmp/R-1.7.1/bin/R.bin: /var/tmp/R-1.7.1/library/modreg/libs/modreg.so : WARNING: symbol(FortEntries) size mismatch relink your program
/var/tmp/R-1.7.1/bin/R.bin: /var/tmp/R-1.7.1/library/modreg/libs/modreg.so : WARNING: symbol(CallEntries) size mismatch relink your program
/var/tmp/R-1.7.1/bin/R.bin: /var/tmp/R-1.7.1/library/modreg/libs/modreg.so : WARNING: symbol(CEntries) size mismatch relink your program
> search()
[1] ".GlobalEnv"     "package:ts"     "package:modreg" "Autoloads"     
[5] "package:base"  
> q()
Save workspace image? [y/n/c]: n



=======================================================
If either modreg or ts are left unloaded - no warning!
=======================================================

shiraz:/var/tmp/R-1.7.1/bin$ R_DEFAULT_PACKAGES="modreg, nls, mva, ctest, methods" ./R --silent
> search()
[1] ".GlobalEnv"      "package:methods" "package:ctest"   "package:mva"    
[5] "package:nls"     "package:modreg"  "Autoloads"       "package:base"   
> q()
Save workspace image? [y/n/c]: n





=======================================================
SIGFPE on executing graphics routine
=======================================================

shiraz:/var/tmp/R-1.7.1$ bin/R

R : Copyright 2003, The R Development Core Team
Version 1.7.1  (2003-06-16)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type `license()' or `licence()' for distribution details.

R is a collaborative project with many contributors.
Type `contributors()' for more information.

Type `demo()' for some demos, `help()' for on-line help, or
`help.start()' for a HTML browser interface to help.
Type `q()' to quit R.

> postscript()
> plot(1:10)
Floating point exception (core dumped) 
> q()
Save workspace image? [y/n/c]: n

[ An empty Rplots.ps file is created prior to the core dump ]


shiraz:/var/tmp/R-1.7.1/bin$ ./R

R : Copyright 2003, The R Development Core Team
Version 1.7.1  (2003-06-16)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type `license()' or `licence()' for distribution details.

R is a collaborative project with many contributors.
Type `contributors()' for more information.

Type `demo()' for some demos, `help()' for on-line help, or
`help.start()' for a HTML browser interface to help.
Type `q()' to quit R.

[Previously saved workspace restored]

> search()
[1] ".GlobalEnv"      "package:methods" "package:ctest"   "package:mva"    
[5] "package:modreg"  "package:nls"     "package:ts"      "Autoloads"      
[9] "package:base"   
> plot(1:10)
Floating point exception (core dumped) 
> q()
Save workspace image? [y/n/c]: n

[ An empty X11 Graphics window is created prior to the core dump ]



shiraz:/var/tmp/R-1.7.1/bin$ gdb
GNU gdb 4.16.1
(gdb) set heuristic-fence-post 10
(gdb) file R.bin
Reading symbols from R.bin...done.
(gdb) core ../R.bin.core              <= This is using postscript()
Core was generated by `R.bin'.
Program terminated with signal 8, Floating point exception.
Cannot access memory at address 0x16039252c.
(gdb) core R.bin.core                 <= This is using x11()
Core was generated by `R.bin'.
Program terminated with signal 8, Floating point exception.
Cannot access memory at address 0x16039252c.



More information about the R-devel mailing list