[R-SIG-Mac] any advice on libtiff? (and rtiff)

cgw at witthoft.com cgw at witthoft.com
Thu Apr 29 16:39:50 CEST 2010

OK, I've got libtiff installed -- the libraries are sitting in /usr/local/lib .  Do I need to copy them somewhere else for R to be able to find them?

Or (I'm trying this under OS X 10.4.11,  i686-apple-darwin8-gcc-4.0.1 ) do I have incompatible support tools?

Thanks for your help

Here's the error message I get after %R CMD INSTALL rtiff.... :

* installing to library '/Library/Frameworks/R.framework/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... yes
configure: creating ./config.status
config.status: creating src/Makevars
** libs
** arch - i386
gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386  -I/usr/local/include    -fPIC  -g -O2 -c rtiff.c -o rtiff.o
gcc -arch i386 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -mmacosx-version-min=10.4 -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o rtiff.so rtiff.o -ltiff -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation
/usr/bin/libtool: for architecture cputype (16777223) cpusubtype (3) object: /usr/local/lib/libgcc_s.10.4.dylib malformed object (unknown load command 4)
make: *** [rtiff.so] Error 1
ERROR: compilation failed for package 'rtiff'
* removing '/Library/Frameworks/R.framework/Resources/library/rtiff'
Apr 29, 2010 01:52:21 AM, ripley at stats.ox.ac.uk wrote:


On Wed, 28 Apr 2010, Carl Witthoft wrote:

> Hi, I know rtiff does not compile 'cause it can't find libtiff (per cran 
> check logs).
> I'm just wondering if anyone has successfully installed libtiff, either from 
> source or via MacPorts?  And if so,  is it then possible to build rtiff from 
> the source and have everything work?

Yes, yes.  Simon and I have (separately) installed libtiff from the 
sources and the static-library build is what is used for the CRAN R 
distribution (at my behest).

When I tried rtiff it simply worked:

tystie% R CMD INSTALL rtiff_1.4.1.tar.gz
* installing to library ‘/Users/ripley/R/Library’
* installing *source* package ‘rtiff’ ...
checking for gcc... gcc
** testing if installed package can be loaded

* DONE (rtiff)

One arch only, as the package has a configure script.  Add others with

tystie% R --arch=x86_64 CMD INSTALL --libs-only rtiff_1.4.1.tar.gz

> So far I've (naively) tried building libtiff3.9.2 from sources, but even 
> though "make" seems to happily complete its job,  nothing seems to be 
> installed anywhere useful.

Well, the latter is what 'make install' does, just like just about all 
other Open Source packages.

But see http://r.research.att.com/libs/ for Simon's build.

> Or should I just bite the bullet and install the Gtk tiff tools and that big 
> graphics package (something-BE, I forget the name just now)?
> thanks
> Carl

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-SIG-Mac mailing list