Skip to content

Optional libraries (libtiff, etc) not found

1 message · David Winsemius

#
There is sufficient circumstantial evidence to suggest you are posting  
in the wrong mailing list. Follow-up should go there.  You also have  
not posted sessionInfo() output or the error messages you are getting  
when <what-ever-it-is-that-you-have-done> that "didn't work". You  
should post in R-SIG-Mac and include the appropriate information  
requested in the Posting Guide (sessionInfo(), console output prior to  
error message, and error messages).
On Sep 27, 2009, at 10:23 AM, Wayne F wrote:

            
There is a binary package called devpack4 at:

http://cran.r-project.org/bin/macosx/tools/

I don't see libtiff in there, but libjpeg which biOps requires  
(according to the docs) is in there. If you are going to compile from  
sources you should read that information carefully.
I got this error when I tried to load the binary installed package:
 > library(biOps)
Error in dyn.load(file, DLLpath = DLLpath, ...) :
   unable to load shared library '/Library/Frameworks/R.framework/ 
Resources/library/biOps/libs/x86_64/biOps.so':
   dlopen(/Library/Frameworks/R.framework/Resources/library/biOps/libs/ 
x86_64/biOps.so, 6): Symbol not found: _TIFFClose
   Referenced from: /Library/Frameworks/R.framework/Resources/library/ 
biOps/libs/x86_64/biOps.so
   Expected in: dynamic lookup

Compiling from sources using the GUI Package Installer succeeded and  
the package loaded without error.

I did encounter some warnings in the check phase:

checking fftw3.h usability... no
checking fftw3.h presence... no
checking for fftw3.h... no
checking jpeglib.h usability... configure: WARNING: Can't find fftw3  
header
yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking tiff.h usability... no
checking tiff.h presence... no
checking for tiff.h... no
configure: WARNING: Can't find libtiff header

My scan of the compilation messages suggested that the lack of tiff  
support was not remedied in the process but I cannot be sure about  
that (see below). In the past (say a year ago) I generally needed to  
compile from sources if I were using the 64-bit GUI, but that is an  
unusual occurrence more recently. Being a UNIX-noob, I cannot tell  
whether this error was due to my being in the 64 bit configuration.   
Whether the package will do anything useful now, I cannot say:

capabilities() still reported FALSE for tiff

The first example in hte documentation produces a black square
 > jpeg()
 > p <- q <- seq(-1, 1, length=20)
 > r <- 1 - outer(p^2, q^2, "+") / 2
 > plot(imagedata(r))
 > dev.off()
null device
           1

The second example I tried produced a very pretty picture of a flower:

 > x <- readJpeg(system.file("samples", "violet.jpg", package="biOps"))
 > cat("Image Type", imageType(x))
Image Type rgb
 >
 > x
size:  499 x 333
type:  rgb
 > plot(x)

(And plotting to the tiff device produces a nice flower, despite what  
capabilities says.)

Best of luck;