rocker-org / rocker

R configurations for Docker
https://rocker-project.org
GNU General Public License v2.0
1.45k stars 273 forks source link

Missing jpeglib.h and tiff.h #382

Closed marioem closed 4 years ago

marioem commented 4 years ago

Hi,

please consider adding tiff and jpeglib to the image so that it would be possible to install graphics packages like imager, jpeg and tiff from sources.

rocker/tidyverse:latest | 2.2 GB | 2020-01-29 01:18:56

> install.packages("jpeg")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://cran.rstudio.com/src/contrib/jpeg_0.1-8.1.tar.gz'
Content type 'application/x-gzip' length 18116 bytes (17 KB)
==================================================
downloaded 17 KB

* installing *source* package ‘jpeg’ ...
** package ‘jpeg’ successfully unpacked and MD5 sums checked
** using staged installation
** libs
gcc -I"/usr/local/lib/R/include" -DNDEBUG   -I/usr/local/include  -fpic  -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g  -c read.c -o read.o
In file included from read.c:1:
rjcommon.h:11:10: fatal error: jpeglib.h: No such file or directory
 #include <jpeglib.h>
          ^~~~~~~~~~~
compilation terminated.
make: *** [/usr/local/lib/R/etc/Makeconf:168: read.o] Error 1
ERROR: compilation failed for package ‘jpeg’
* removing ‘/usr/local/lib/R/site-library/jpeg’
Warning in install.packages :
  installation of package ‘jpeg’ had non-zero exit status

BRs,

Mariusz

eddelbuettel commented 4 years ago

Wrong repo. Please report tidyverse bugs here: https://github.com/rocker-org/rocker-versioned

Bigger issue that this is not really a bug. The question has come up (repeatedly). The goal is not to install each and every dependency. The goal is to provide a base you can customize to your needs. E.g. by installing these two dev packages.

Lastly, sudo apt-get install r-cran-jpeg is even quicker.

marioem commented 4 years ago

Went to that repo and the first note in readme.md reads

do not use apt-get install r-cran-* to install R packages on this stack.

:-). So I guess I need to figure out which system libs provide those headers.

marioem commented 4 years ago

For collective google memory

apt-get install libtiff-dev
apt-get install libjpeg-dev
eddelbuettel commented 4 years ago

Darn, forgot about that one -- yes because of the way the versioned stack is designed. So thanks for catching that.

But two more:

1) You can install both at once: sudo apt-get install libtiff-dev libjpeg-dev

2) Because they are so common they should also be implied by r-base-dev to maybe just install that one.

I think we can close this though.

cboettig commented 4 years ago

@marioem Thanks for the report. We'll add libtiff-dev libjpeg-dev to rocker/verse maybe? (currently verse extends tidyverse, though we are working on a modular system so you can swap the order of these, tidyverse is obviously focused on tidyverse, but verse is more intended as the 'batteries-included' one stop shop of commonly used libraries.