[BioC] Problem installing hexbin?

David Henderson dnadave at insightful.com
Wed Apr 26 20:09:17 CEST 2006


Hi Robert:

> it seems fine on our Suse Box with
> rgentlem at gladstone:~> gfortran --version
> GNU Fortran 95 (GCC 4.0.2 20050901 (prerelease) (SUSE Linux))
> Copyright (C) 2005 Free Software Foundation, Inc.
> and:
>   gfortran -fPIC -c hbin.f -o hbin.o
> 
> does what I think it is supposed to do.
> So I suspect that something else is wrong.

Here's what I see on my SuSE 10.0 laptop:

minime{david}103: gfortran --version
GNU Fortran 95 (GCC 4.0.2 20050901 (prerelease) (SUSE Linux))
Copyright (C) 2005 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING
minime{david}104: R CMD INSTALL hexbin_1.4.0.tar.gz
* Installing *source* package 'hexbin' ...
** libs
gfortran   -fPIC  -O2 -c hbin.f -o hbin.o
 In file hbin.f:1

       subroutine hbin(x,y,cell,cnt,xcm,ycm, size, shape,
                                                       1
Error: Symbol 'shape' at (1) has no IMPLICIT type
make: *** [hbin.o] Error 1
ERROR: compilation failed for package 'hexbin'
** Removing '/usr/local/lib/R/library/hexbin'
** Restoring previous '/usr/local/lib/R/library/hexbin'

> I do see tabs not spaces in the file (which could cause some problems I 
> suspect).
> 
> To find the source down load the package, untar it and look in
> hexbin/src
> you could try changing all tabs to the right number of spaces and see if 
> that fixes things.
> 
> note the file also declares
>          implicit none
> and then does define a type for shape.

Here's a snippet from the code in hbin.f viewed in vi:

        double precision x(n), y(n), xcm(*),ycm(*), rx(2),ry(2),
size,shape
        integer i, i1, i2, iinc
        integer j1, j2, jinc
        integer L, lmax, lat
        double precision c1, c2, con1, con2, dist1
        double precision sx, sy, xmin, ymin, xr, yr
"hbin.f" 87L, 1938C                                    18,63-70      Top

The 18,63-70 on the last line indicates that I have my cursor on column
70 of line 18.  The cursor is in fact placed upon the comma right before
the shape parameter is defined to be a double precision variable.

I'll perform one edit to the file as follows:

        double precision x(n), y(n), xcm(*),ycm(*), rx(2),ry(2),
size,shape

will change to:

        double precision x(n), y(n), xcm(*),ycm(*), rx(2),ry(2), size
        double precision shape

Now, here's the result of trying to install hexbin on my laptop
following the above edit:

minime{david}113: R CMD INSTALL hexbin
* Installing *source* package 'hexbin' ...
** libs
gfortran   -fPIC  -O2 -c hbin.f -o hbin.o
gfortran   -fPIC  -O2 -c hcell.f -o hcell.o
gfortran   -fPIC  -O2 -c herode.f -o herode.o
gfortran   -fPIC  -O2 -c hsm.f -o hsm.o
gcc -shared -L/usr/local/lib -o hexbin.so hbin.o hcell.o herode.o hsm.o
-lgfortran -lm -lgcc_s
** R
** data
** inst
** preparing package for lazy loading
Creating a new generic function for 'plot' in 'hexbin'
Creating a new generic function for 'summary' in 'hexbin'

** help
 >>> Building/Updating help pages for package 'hexbin'
     Formats: text html latex example
** building package indices ...
* DONE (hexbin)

I've written to the maintainer in the past and he indicated that this
would be fixed in new versions.  Evidently it has not.

There is likely a compiler flag that allows for sloppy column widths in
fortran programs and I'll bet that you used this to compile R which is
why it works for you and notfor me or Sander.

Thanks!!

Dave H
-- 
David A. Henderson, Ph.D. 
Research Scientist 
Insightful Corporation 
1700 Westlake Avenue North, Suite 500 
Seattle, WA 98109-3044 
Tel: 206-802-2307 
Fax: 206-283-8691 
DNADave at Insightful.Com
http://www.insightful.com



More information about the Bioconductor mailing list