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

Peter Dalgaard p.dalgaard at biostat.ku.dk
Sun Apr 20 13:31:50 CEST 2008

Prof Brian Ripley wrote:
> On Sun, 20 Apr 2008, Thibaut Jombart wrote:
>> Prof Brian Ripley wrote:
>>> 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?
>> My mistake, I thought sessionInfo() would be enough. My system is an 
>> Ubuntu Dapper Drake (6.06.2 LTS, 64 bits version). R installed from 
>> the sources, same for the packages, using install.packages (one 
>> warning for tripack: an unmatched right brace in a manpage). My 
>> fortran and C compilers are respectively g77 and gcc:
>>> g77 -dumpversion
>> GNU Fortran (GCC) 3.4.6 (Ubuntu 3.4.6-1ubuntu2)
>>> gcc --version
>> gcc (GCC) 4.0.3 (Ubuntu 4.0.3-1ubuntu5)
> Thanks, for code-compilation problems we need that level of detail.
> Your problem appears to be that you are mixing gcc4 and g77 (not 
> recommended), and g77 does use extra underscores, I believe.  I have
> /* Define if your Fortran compiler appends an extra_underscore to 
> external
>    names containing an underscore. */
> /* #undef HAVE_F77_EXTRA_UNDERSCORE */
> /* Define if your Fortran compiler appends an underscore to external 
> names. */
> #define HAVE_F77_UNDERSCORE 1
> in src/include/config.h.  If the first of these is defined, please try 
> commenting it out and rebuilding R.
> I've found an old Solaris box that still has g77 on, and I can 
> reproduce this there.  I will patch the sources after further testing, 
> but altering src/include/config.h worked for me.
> I was certainly not expecting Ubuntu 7.07 to be using g77, so we need 
> the same details from Thomas Petzoldt.
Is this perhaps an installation issue (missing gfortran)?

more `R RHOME`/etc/Makeconf

should tell you which compilers R itself was built with. In my 
experience, it just doesn't work to mix v.3.x and 4.x compilers (Brian 
might correct me on that though).

   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark      Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)              FAX: (+45) 35327907

More information about the R-devel mailing list