[R] Can't compile rtiff for OSX

Robert Baruch robert.c.baruch at gmail.com
Mon Jun 6 01:02:27 CEST 2011


I have libtiff installed from macports, and it is sitting there in /opt/local/lib:

$ 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



More information about the R-help mailing list