From cosi1 at tlen.pl  Wed Sep  7 20:50:25 2016
From: cosi1 at tlen.pl (=?UTF-8?Q?Pawe=C5=82_Pi=C4=85tkowski?=)
Date: Wed, 07 Sep 2016 20:50:25 +0200
Subject: [Rd] =?utf-8?q?Building_R_under_Linux_-_library_dependencies?=
In-Reply-To: <22480.20131.781988.142009@max.nulle.part>
References: <62ff6ef3.6e95b7a5.57d031ed.7e18d@tlen.pl>
	<22480.20131.781988.142009@max.nulle.part>
Message-ID: <3092aed4.f96460.57d06171.56abc@tlen.pl>

> | Is there a way to overcome this problem? Precompiled versions of R can be installed on various system configurations, so I guess that there should be a way to compile it in a version-agnostic manner.
> 
> Yes, for example by
> 
>   -- using a Docker container which is portable across OSs (!!) and versions

Docker R containers are north of 250 MB. I have checked experimentally that you can trim R down to 16 MB (!) and you'll still be able to execute it (though with warnings). That *is* quite a difference, especially when deploying small applications.

>   -- relying on package management which is what every Linux distro does
> 
> (...)
> 
> PS For the latter point, our .deb based R package currently shows this:
> 
> (...)
> 
> Depends: zip, unzip, libpaper-utils, xdg-utils, libblas3 | libblas.so.3, libbz2-1.0, libc6 (>= 2.23), libcairo2 (>= 1.6.0), libcurl3 (>= 7.28.0), libglib2.0-0 (>= 2.12.0), libgomp1 (>= 4.9), libjpeg8 (>= 8c), liblapack3 | liblapack.so.3, liblzma5 (>= 5.1.1alpha+20120614), libpango-1.0-0 (>= 1.14.0), libpangocairo-1.0-0 (>= 1.14.0), libpcre3, libpng12-0 (>= 1.2.13-4), libreadline6 (>= 6.0), libtcl8.6 (>= 8.6.0), libtiff5 (>= 4.0.3), libtk8.6 (>= 8.6.0), libx11-6, libxt6, zlib1g (>= 1:1.1.4), ucf (>= 3.0), ca-certificates

Sure, package dependencies would be great as well - at least you'd be sure that users of, say, Debian-based distros will be able to run this portable R, as long as they've installed the required libraries. But notice that in your example package versions equal *or greater* than listed are required - so if someone has upgraded their system, they still will be able to run that R. With a version built from source you need *exactly* the same version as on the machine where R was compiled. Hence my question: how come the precompiled distribution of R has "less strict" library requirements than manually compiled versions?

Best,
Pawel



[Rd] =?utf-8?q?Building_R_under_Linux_-_library_dependencies?=
=?UTF-8?Q?Pawe=C5=82_Pi=C4=85tkowski?=