[R] Shared Library Error

Prof Brian Ripley ripley at stats.ox.ac.uk
Sat May 24 09:30:28 CEST 2008


The problem is that underscore is an illegal symbol in a Fortran 77 name 
(and R only requires a Fortran 77 compiler).

You have not told us your OS nor R version nor compiler+version (because 
what a compiler does with this is a compiler-specific extension).

You should not be using the trailing underscore in .Fortran, so the 
failure was correct.

Some changes have been made fairly recently, and my belief is that this 
does work correctly in R-patched, even for old compilers such as gcc3's 
g77.  But it is not portable and not really supported.

So either try a current version of R-patched or write legal Fortran 77.


On Fri, 23 May 2008, what's in the name? wrote:

> Can anyone help me resolve this? A part of the R function looks like this:
>
>       print(is.loaded('merge_xtabs_patterns_file'))
>       print(is.loaded('merge_xtabs_patterns_file_'))
>
> .Fortran('merge_xtabs_patterns_file_',ydim[1],ydim[2],x=as.integer(as.matrix(y)),na=as.integer(c),
>
> maxD=as.integer(maxD),lrowmem=length(rowmem),rowmem=as.integer(rowmem),
>
> sequential=as.integer(Sequential),nclust=as.integer(nclust))
>
>
>
>
> The corresponding output:
>
> [1] FALSE
> [1] TRUE
> Error in .Fortran("merge_xtabs_patterns_file_", ydim[1], ydim[2], x =
> as.integer(as.matrix(y)),  :
>  Fortran symbol name "merge_xtabs_patterns_file_" not in load table
>
>
>
>
>
> Why is it that I get a TRUE for is.loaded with the same symbol, but when
> using that under .Fortran I get the above error?
>
>
> I also tried replacing the third line with the following (removing the last
> underscore from the symbol name):
>
> .Fortran('merge_xtabs_patterns_file',ydim[1],ydim[2],x=as.integer(as.matrix(y)),na=as.integer(c),
>
> maxD=as.integer(maxD),lrowmem=length(rowmem),rowmem=as.integer(rowmem),
>
> sequential=as.integer(Sequential),nclust=as.integer(nclust))
>
>
> The corresponding error:
>
> Error in .Fortran("merge_xtabs_patterns_file", ydim[1], ydim[2], x =
> as.integer(as.matrix(y)),  :
>  Fortran symbol name "merge_xtabs_patterns_file" not in load table
>
>
>
> Can anyone help?
>
> Thanks,
> A
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> 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



More information about the R-help mailing list