R 3.3.2 fails to configure if zlib 1.2.10 is installed: checking zlib.h usability... yes checking zlib.h presence... yes checking for zlib.h... yes checking if zlib version >= 1.2.5... no checking whether zlib support suffices... configure: error: zlib library and headers are required From configure.log I can see that it does a string comparison: int main() { #ifdef ZLIB_VERSION /* Work around Debian bug: it uses 1.2.3.4 even though there was no such version on the master site zlib.net */ exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0); #else exit(1); #endif } As 1.2.10 sorts before 1.2.5 in a string comparison, this check fails. The source of this appears to be the macro _R_HEADER_ZLIB in m4/R.m4. Looking into zlib.h I see these macros which might help with a better check: #define ZLIB_VERSION "1.2.10" #define ZLIB_VERNUM 0x12a0 #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 #define ZLIB_VER_REVISION 10 #define ZLIB_VER_SUBREVISION 0 So one easy way would be comparing by ZLIB_VERNUM, but if version components were to exceed 15 that might break in some way, too. It seems upstream has decided to use that approach nevertheless, though: svn log --diff -r71889:71889 https://svn.r-project.org/R/trunk retrieves a commit (dated from today!) which does address this very problem. So I suggest you simply include that as a patch for the ebuild.
Created attachment 458772 [details, diff] svn commit 71889
Here is one way to apply the patch locally before the ebuild gets adjusted. # ebuild /usr/portage/dev-lang/R/R-3.3.2.ebuild clean unpack # svn log --diff -r71889:71889 https://svn.r-project.org/R/trunk \ | patch -p0 -d /var/tmp/portage/dev-lang/R-3.3.2/work/R-3.3.2/ # ebuild /usr/portage/dev-lang/R/R-3.3.2.ebuild merge I'm now past the configure phase, and expect the build to succeed eventually.
commit 17331c2f15ee02bc370d3e2e6a596d377552eb42 Author: Justin Lecher <jlec@gentoo.org> Date: Thu Jan 5 19:25:46 2017 +0000 dev-lang/R: Backport patch for zlib-1.2.10 compatibility Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=604676 Package-Manager: Portage-2.3.3, Repoman-2.3.1 Signed-off-by: Justin Lecher <jlec@gentoo.org> https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=17331c2f15ee02bc370d3e2e6a596d377552eb42
Fixed? If so, why is it that the ebuild of R 3.3.2 in portage fails to build, precisely due to this?
(In reply to P.B. Lecavalier from comment #4) > Fixed? If so, why is it that the ebuild of R 3.3.2 in portage fails to > build, precisely due to this? please add a build.log.
My bad, I was referring to 3.3.1. The issue for 3.3.1 is identical. Might want to fix this ebuild as well or take it off the tree. ~3.3.2 is indeed building past the zlib issue, so it works for me.