Bjørn-Helge Mevik
2019-Feb-25 10:11 UTC
[Rd] Is libtiff >= 4.0.0 now required by R for TIFF support?
We recently discovered that since R 3.3.0, on our CentOS 6 based cluster, R gets built without TIFF support. The last version where TIFF support was built, was 3.2.5. We have libtiff 3.9.4 installed: $ rpm -q libtiff-devel libtiff-devel-3.9.4-21.el6_8.x86_64 (Since CentOS 6 is so old, we have manually installed newer versions of some dependencies: curl 7.46.0, zlib 1.2.8, bzip2 1.0.6, xz 5.2.2 and pcre 8.38.) We configure R like this: BLAS=--with-blas='-mkl=parallel' LAPACK=--with-lapack ./configure --prefix=$destdir "$BLAS" "$LAPACK" --enable-BLAS-shlib --enable-R-shlib (and build with Intel compilers.) The tiff-related output of the configure script in R 3.2.5 was $ grep -i tiff _log_3.2.5 checking tiffio.h usability... yes checking tiffio.h presence... yes checking for tiffio.h... yes checking for TIFFOpen in -ltiff... yes Additional capabilities: PNG, JPEG, TIFF, NLS, cairo Beginning with R 3.3.0, it was just $ grep -i tiff _log_3.3.0 Capabilities skipped: TIFF, ICU (This has been the output for all versions we've installed since 3.3.0.) I looked at the configure script, and in 3.2.5, the tests for libtiff starts like this (I've adjusted the indentation): if test "${use_libtiff}" = yes; then for ac_header in tiffio.h do : ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" if test "x$ac_cv_header_tiffio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TIFFIO_H 1 _ACEOF From 3.3.0 on, it starts like this (with indentation adjusted): if test "${use_libtiff}" = yes; then mod ## pkg-config support was introduced in libtiff 4.0.0 ## I guess the module name might change in future, so ## program defensively here. if "${PKGCONF}" --exists libtiff-4; then mod=libtiff-4 fi if test -n "${mod}"; then save_CPPFLAGS=${CPPFLAGS} TIF_CPPFLAGS=`"${PKGCONF}" --cflags ${mod}` CPPFLAGS="${CPPFLAGS} ${TIF_CPPFLAGS}" for ac_header in tiffio.h do : ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" if test "x$ac_cv_header_tiffio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_TIFFIO_H 1 _ACEOF And all the rest of the tests for libtiff are within the "if test -n "${mod}"; then" branch. As I read it, this means that if you don't have libtiff >= 4.0.0 installed, the tests for libtiff will not be run, and support for TIFF disabled. On the other hand, Appendix A.2 "Useful libraries and programs" in https://cran.r-project.org/doc/manuals/r-release/R-admin.html says "The bitmapped graphics devices jpeg(), png() and tiff() need the appropriate headers and libraries installed: jpeg (version 6b or later, or libjpeg-turbo) or libpng (version 1.2.7 or later) and zlib or libtiff (any recent version ? 3.9.[4-7] and 4.0.[2-10] have been tested) respectively." which seems to imply that libtiff 3.9.4 should be fine. Is there a bug in the configure script, is the "R Installation and Administration" not up to date, or is it me that misunderstands something here? -- Regards, Bj?rn-Helge Mevik -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-devel/attachments/20190225/6d7bd230/attachment.sig>
Jeroen Ooms
2019-Feb-25 12:29 UTC
[Rd] Is libtiff >= 4.0.0 now required by R for TIFF support?
On Mon, Feb 25, 2019 at 11:11 AM Bj?rn-Helge Mevik <b.h.mevik at usit.uio.no> wrote:> > We recently discovered that since R 3.3.0, on our CentOS 6 based > cluster, R gets built without TIFF support. The last version where TIFF > support was built, was 3.2.5.It looks like the official R from EPEL6 also lacks tiff support: yum install epel-release yum install R-devel R -e 'capabilities()'> capabilities()jpeg png tiff tcltk X11 aqua TRUE TRUE FALSE TRUE FALSE FALSE http/ftp sockets libxml fifo cledit iconv TRUE TRUE TRUE TRUE FALSE TRUE NLS profmem cairo ICU long.double libcurl TRUE FALSE TRUE TRUE TRUE TRUE So your hypothesis that autoconf doesn't find libtiff < 4 is probably correct.