[R] if zlib version >= 1.2.5... no

David Winsemius dwinsemius at comcast.net
Wed Jan 4 19:43:36 CET 2017


> On Jan 4, 2017, at 8:09 AM, bastl73 <bastl73 at freenet.de> wrote:
> 
> Configuring R

Which "R" would that be?


> with zlib-1.2.10 I get this error:
> 
> 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
> 
> So I asked Mark from zlib about this problem and he wrote back:
> 
>> exit(strncmp(ZLIB_VERSION, "1.2.5", 5) < 0);
> 
> strcmp("1.2.10", "1.2.5") will indicate incorrectly that the 1.2.10 is *less* than 
> 1.2.5. This is why there is ZLIB_VERNUM, which is a number that can be compared. So 
> it should be simply:
> 
>    exit(ZLIB_VERNUM < 0x1250);

I'm thinking this must be the world's shortest attempt at a bug report. I can find that code in a couple of places with a Google search:

A copy of material labelled as "part of R"

https://github.com/rho-devel/rho/blob/master/m4/R.m4

A diff file submitted by Ingo Feinerer to bsdports:

https://marc.info/?l=openbsd-ports&m=146229312201237&w=2

And using the Google advanced search function (since Google does not apparently index the R source):

https://svn.r-project.org/R/trunk/m4/R.m4

It appears the current version already has the code suggested as the correction:

https://svn.r-project.org/R/trunk/m4/R.m4

A bit below the section header :

## R_ZLIB

We see this code (which appears to be exactly the suggested edit by your correspondent.)

int main() {
#ifdef ZLIB_VERNUM
  if (ZLIB_VERNUM < 0x1250) {
    exit(1);
  }
  exit(0);

So you should check that you are working with the most recent version of R. If you are, and you still think this is a bug, then you should post a much, much more complete "trial bug report" to the R-devel at r-project.org mailing list. It should include a complete description of what you are attempting and full log files. Posting bug reports to r-help is just the wrong place and posting incorrect bug reports to bugzilla just annoys the maintainers.


> 
> bastl
> 

-- 

David Winsemius
Alameda, CA, USA



More information about the R-help mailing list