building R: --with-libtiff not enabling TIFF capab

2019-07-25 05:06发布

问题:

Compiling R-3.3.2 from source. My flags include --with-libtiff. They are: ./configure --with-system-tre --with-blas --with-lapack --with-libtiff --enable-R-shlib --enable-lto --prefix=/opt/new.R

I do have libtiff4 and libtiff4-dev. However:

R is now configured for i686-pc-linux-gnu

  Source directory:          .
  Installation directory:    /opt/new.R

  C compiler:                gcc  -g -O2
  Fortran 77 compiler:       f95  -g -O2

  C++ compiler:              g++  -g -O2
  C++11 compiler:            g++  -std=c++11 -g -O2
  Fortran 90/95 compiler:    gfortran -g -O2
  Obj-C compiler:        gcc -g -O2 -fobjc-exceptions

  Interfaces supported:      X11, tcltk
  External libraries:        readline, BLAS(generic), LAPACK(generic), curl
  Additional capabilities:   PNG, JPEG, NLS, cairo, ICU
  Options enabled:           shared R library, R profiling, strict barrier

  Capabilities skipped:      TIFF
  Options not enabled:       shared BLAS, memory profiling

  Recommended packages:      yes

The TIFF capability has been skipped. Why, and how can I force it to be enabled?

回答1:

I had the same problem. The R configure script tests for the presence of tiff with pkg-config, but doesn't provide any feedback when this fails.

I resolved it by setting the PKG_CONFIG environment variable to point to the directory containing the file libtiff-4.pc.