Re: [R] Shared Library Error

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Sat, 24 May 2008 08:30:28 +0100 (BST)

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

______________________________________________
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.
Received on Sat 24 May 2008 - 07:35:12 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 24 May 2008 - 09:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive