[R] Trouble compiling R-1.3.0 under Tru64

Duncan Temple Lang duncan at research.bell-labs.com
Wed Jun 27 01:36:49 CEST 2001


Peter Dalgaard BSA wrote:
> The GVText function from the vfonts module, cf. vfonts_Init. Looks
> like R_FindSymbol is malfunctioning. You might be able to catch the
> problem by tracing into R_FindSymbol from vfonts_Init with gdb.

I took a quick look at this. (Anything with R_FindSymbol sparks an
sense of responsibility :-)).  I'm running on a Linux box so my
diagnostics may not apply. However, what I see is the following:
Rf_GVText is in both modules/vfonts.so and also R.bin.
Depending on the behaviour of dlopen(), the call
   R_FindSymbol("Rf_GVText", "vfonts", NULL))
may resolve to the one in R.bin rather than the one in vfonts.so
defined in g_alab_her.c. That would explain the infinite recursion.

A quick look using nm gives
eeyore[modules-82]>nm vfonts.so | grep GVText
0001622c T Rf_GVText
eeyore[modules-83]>nm ../bin/R.bin | grep GVText
080f5794 T Rf_GVText
081858d0 b ptr_GVText     

illustrating the duplication and the potential for incorrect resolution
by dlsym().


If this is a correct diagnosis (and I think it is), it is a further
reason to use the newly introduced registration mechanism for native
routines in shared libraries, both in built-in modules and also
packages.

I'd appreciate knowing if this is in fact the cause of the problem.
Perhaps looking at the address of the Rf_GVText in R.bin and the value
of ptr_GVText to see if these are the same will provide an answer.

Feel free to mail me directly rather than the whole list to see if we
can sort this out.

 D.



> Brad McNeney <mcneney at cs.sfu.ca> writes:
> 
> > (gdb) up
> > #1  0x120126398 in Rf_GVText (x=6.7951783804802162, y=7.1803429085253221, 
> >     unit=13, s=0x141222120 "a", typeface=0, fontindex=1, x_justify=0.5, 
> >     y_justify=NaN(0x7a2), rotation=0, dd=0x1411da000) at vfonts.c:93
> > (gdb) up
> > #2  0x120126398 in Rf_GVText (x=6.7951783804802162, y=7.1803429085253221, 
> >     unit=13, s=0x141222120 "a", typeface=0, fontindex=1, x_justify=0.5, 
> >     y_justify=NaN(0x7a2), rotation=0, dd=0x1411da000) at vfonts.c:93
> > 
> > ... and so on. 
> > 
> > From vfonts.c the definition of GVText is:
> > 
> > void GVText (double x, double y, int unit, char *s, 
> > 	     int typeface, int fontindex,
> > 	     double x_justify, double y_justify, double rotation,
> > 	     DevDesc *dd)
> > {
> >     if(!initialized) vfonts_Init();
> >     if(initialized > 0)
> > 	(*ptr_GVText)(x, y, unit, s, typeface, fontindex, 
> > 		      x_justify, y_justify, rotation, dd);
> >     else
> > 	error("Hershey fonts cannot be loaded");
> > }
> > 
> > and 
> > 
> > (gdb) p (*ptr_GVText)
> > $1 = {void *()} 0x120126310 <Rf_GVText>
> > 
> > hence the infinite recursion. Can anyone tell me what was intended here
> > for ptr_GVText? 
> 
> The GVText function from the vfonts module, cf. vfonts_Init. Looks
> like R_FindSymbol is malfunctioning. You might be able to catch the
> problem by tracing into R_FindSymbol from vfonts_Init with gdb.
> 
> (Not that I'm open for helping you out with gdb the next couple of
> weeks. This is just an evasion from the stuff I *ought* to be
> doing...) 
> 
> -- 
>    O__  ---- Peter Dalgaard             Blegdamsvej 3  
>   c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
>  (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
> ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907
> -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
> 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
> _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._

-- 
_______________________________________________________________

Duncan Temple Lang                duncan at research.bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-3217
700 Mountain Avenue, Room 2C-259  fax:    (908)582-3340
Murray Hill, NJ  07974-2070       
         http://cm.bell-labs.com/stat/duncan
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list