[R] Can't compile rtiff for OSX
Prof Brian Ripley
ripley at stats.ox.ac.uk
Mon Jun 6 08:19:15 CEST 2011
On Sun, 5 Jun 2011, Robert Baruch wrote:
> I have libtiff installed from macports, and it is sitting there in
> /opt/local/lib:
Well, you haven't told us which build of R you used, but it looks like
it is not the one from MacPorts (maybe the one from CRAN?).
/opt/local is not a standard location on Mac OS X (nor any other
Unix-alike that I have access to).
Please see the posting guide: this is a not a suitable question for
R-help, and you are asked to post question about Mac OS X on
r-sig-mac. The answer involves
'discussion unintelligible to non-programmers'
to quote the posting guide. The version of tiff which matches the
CRAN build of R is at http://r.research.att.com/libs/ -- it works for
me.
>
> $ ls -l /opt/local/lib/*tiff*
> -rwxr-xr-x 2 root admin 796684 Jun 4 22:13 /opt/local/lib/libtiff.3.dylib
> -rw-r--r-- 2 root admin 990296 Jun 4 22:13 /opt/local/lib/libtiff.a
> lrwxr-xr-x 1 root admin 15 Jun 4 22:14 /opt/local/lib/libtiff.dylib -> libtiff.3.dylib
> -rwxr-xr-x 2 root admin 960 Jun 4 22:13 /opt/local/lib/libtiff.la
> -rwxr-xr-x 2 root admin 35400 Jun 4 22:13 /opt/local/lib/libtiffxx.3.dylib
> -rw-r--r-- 2 root admin 17280 Jun 4 22:13 /opt/local/lib/libtiffxx.a
> lrwxr-xr-x 1 root admin 17 Jun 4 22:14 /opt/local/lib/libtiffxx.dylib -> libtiffxx.3.dylib
> -rwxr-xr-x 2 root admin 998 Jun 4 22:13 /opt/local/lib/libtiffxx.la
>
> $ ls -l /opt/local/include/*tiff*
> -rw-r--r-- 2 root admin 33813 Jun 4 22:13 /opt/local/include/tiff.h
> -rw-r--r-- 2 root admin 3020 Jun 4 22:13 /opt/local/include/tiffconf.h
> -rw-r--r-- 2 root admin 20514 Jun 4 22:13 /opt/local/include/tiffio.h
> -rw-r--r-- 2 root admin 1706 Jun 4 22:13 /opt/local/include/tiffio.hxx
> -rw-r--r-- 2 root admin 410 Jun 4 22:13 /opt/local/include/tiffvers.h
>
> However, when I try to install rtiff, R is not picking up libtiff:
>
> $ R CMD INSTALL ~/Downloads/rtiff_1.4.1.tar.gz
> * installing to library ‘/Library/Frameworks/R.framework/Versions/2.13/Resources/library’
> * installing *source* package ‘rtiff’ ...
> checking for gcc... gcc
> checking for C compiler default output file name... a.out
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables...
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for gcc option to accept ANSI C... none needed
> checking for TIFFOpen in -ltiff... no
> Error: Could not find libtiff.
> ERROR: configuration failed for package ‘rtiff’
> * removing ‘/Library/Frameworks/R.framework/Versions/2.13/Resources/library/rtiff’
>
> TIFFOpen is in libtiff:
>
> $ nm /opt/local/lib/libtiff.dylib | grep TIFFOpen
> 0000000000030740 T _TIFFOpen
>
> So I think the conclusion is that R isn't even looking in /opt/local/lib. Seems like a basic question, but how do I get R to look in /opt/local/{lib|include}?
>
> Thanks for any help!
>
> --Rob
>
> ______________________________________________
> 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