Skip to content

if zlib version >= 1.2.5... no

3 messages · bastl73, Peter Dalgaard, David Winsemius

#
Configuring R 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:
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);


bastl
#
This was fixed (independently?) in r-devel today:

Peter-Dalgaards-MacBook-Air:R pd$ svn log m4/R.m4 | head
------------------------------------------------------------------------
r71889 | lawrence | 2017-01-04 04:57:31 +0100 (Wed, 04 Jan 2017) | 4 lines

R_ZLIB macro tests ZLIB_VERNUM to handle zlib 1.2.10 (6 chars)

Thanks to George Hartzell for the fix.
---

-pd

  
    
#
Which "R" would that be?
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.