[Rd] Fortran underscore problem persists on Linux x86/64 (PR#11206)

Prof Brian Ripley ripley at stats.ox.ac.uk
Sun Apr 20 11:34:22 CEST 2008


And your machine is? -- you haven't given the 'at a minimum' information 
asked for in the posting guide.

Neither example is reproducible on my Fedora 8 x86_64 systems (nor in the 
case of tripack, on CRAN's).  It will need someone with an affected system 
to debug this.  One possibility is that they are using double underscores, 
where the code does not look right to me -- but few systems do and this 
code is the same as in 2.6.2.

For the record, 'iniaqua' is a not a valid Fortran entry point, and all 
these issues will go away if you register your package's symbols.

What does nm -g report on the affected DSOs?


On Sun, 20 Apr 2008, Thibaut Jombart wrote:

> thomas.petzoldt at tu-dresden.de wrote:
>
>> Full_Name: Thomas Petzoldt
>> Version: R 2.8.0 devel, svn version 45389
>> OS: Linux x86/64 Ubuntu 7.1
>> Submission from: (NULL) (217.235.62.12)
>>
>>
>> In contrast to all other tested operating systems a call of Fortran functions on
>> Linux x86/64 requires an appended underscore.
>>
>> The problem occured with package deSolve
>> (http://r-forge.r-project.org/projects/desolve/)
>>
>>
>> See also:
>>
>> http://tolstoy.newcastle.edu.au/R/e4/devel/08/04/1224.html
>>
>> Relevant code snippets
>>
>> In R:
>>
>>
>>
>>> getNativeSymbolInfo("iniaqua", PACKAGE = "deSolve")$address
>>>
>>>
>> Error in FUN("iniaqua"[[1L]], ...) :
>>   no such symbol iniaqua in package deSolve
>>> getNativeSymbolInfo("iniaqua_", PACKAGE = "deSolve")$address
>> <pointer: 0x2b5cd3aa3960>
>> attr(,"class")
>> [1] "NativeSymbol"
>>
>>
>> In Aquaphy.f:
>>
>>     subroutine iniaqua(odeparms)
>>
>>      external odeparms
>>      double precision pars(19)
>>      common /myparms/pars
>>
>>       call odeparms(19, pars)
>>
>>      return
>>      end
>>cd //
>> ______________________________________________
>> R-devel at r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-devel
>>
>>
>>
>>
> Well, thanks Thomas, I fell less alone now...
> I seemingly had the same problem:
>
> ####
> > library(tripack)
> > example(tri.mesh)
>
> tr.msh> data(tritest)
>
> tr.msh> tritest.tr<-tri.mesh(tritest$x,tritest$y)
> Erreur dans .Fortran("trmesh", as.integer(n), x = as.double(x1), y =
> as.double(y1),  :
>  le nom Fortran de symbole "trmesh" est introuvable dans la DLL pour le
> package "tripack"
>
> ## (error says that "trmesh" cannot be found in the tripack DLL
> ## this does not happen on the same machine/OS with R.2.6.2
>
> > getNativeSymbolInfo("trmesh", PACKAGE = "tripack")
> Erreur dans FUN("trmesh"[[1L]], ...) :
>  no such symbol trmesh in package tripack
>
> > getNativeSymbolInfo("trmesh_", PACKAGE = "tripack")
> $name
> [1] "trmesh_"
>
> $address
> <pointer: 0x2aaaac271080>
> attr(,"class")
> [1] "NativeSymbol"
>
> $package
> DLL name: tripack
> Filename: /usr/local/lib64/R-rc/library/tripack/libs/tripack.so
> Dynamic lookup: TRUE
>
> attr(,"class")
> [1] "NativeSymbolInfo"
>
> > sessionInfo()
> R version 2.7.0 RC (2008-04-15 r45347)
> x86_64-unknown-linux-gnu
>
> locale:
> LC_CTYPE=fr_FR.UTF-8;LC_NUMERIC=C;LC_TIME=fr_FR.UTF-8;LC_COLLATE=fr_FR.UTF-8;LC_MONETARY=C;LC_MESSAGES=fr_FR.UTF-8;LC_PAPER=fr_FR.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=fr_FR.UTF-8;LC_IDENTIFICATION=C
>
> attached base packages:
> [1] stats     graphics  grDevices utils     datasets  methods   base
>
> other attached packages:
> [1] tripack_1.2-11
>
> loaded via a namespace (and not attached):
> [1] tools_2.7.0
> ###
>
> Best regards,
>
> Thibaut.
>
> -- 
> ######################################
> Thibaut JOMBART
> CNRS UMR 5558 - Laboratoire de Biométrie et Biologie Evolutive
> Universite Lyon 1
> 43 bd du 11 novembre 1918
> 69622 Villeurbanne Cedex
> Tél. : 04.72.43.29.35
> Fax : 04.72.43.13.88
> jombart at biomserv.univ-lyon1.fr
> http://lbbe.univ-lyon1.fr/-Jombart-Thibaut-.html?lang=en
> http://adegenet.r-forge.r-project.org/
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
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-devel mailing list