[MacPorts] #67986: openssh @9.4p1: build fails with zlib @1.3 installed

MacPorts noreply at macports.org
Fri Aug 18 21:53:58 UTC 2023


#67986: openssh @9.4p1: build fails with zlib @1.3 installed
-------------------------+----------------------
  Reporter:  fabianwenk  |      Owner:  artkiver
      Type:  defect      |     Status:  assigned
  Priority:  Normal      |  Milestone:
 Component:  ports       |    Version:
Resolution:              |   Keywords:
      Port:  artkiver    |
-------------------------+----------------------

Comment (by artkiver):

 After a preliminary set of experiments, I am certainly able to reproduce
 an error of the sort below:

 {{{
 checking for library containing basename... none required
 checking for zlib... yes
 checking for zlib.h... yes
 checking for deflate in -lz... yes
 checking for possibly buggy zlib... yes
 configure: error: *** zlib too old - check config.log ***
 Your reported zlib version has known security problems.  It's possible
 your
 vendor has fixed these problems without changing the version number.  If
 you
 are sure this is the case, you can disable the check by running
 "./configure --without-zlib-version-check".
 If you are in doubt, upgrade zlib to version 1.2.3 or greater.
 See http://www.gzip.org/zlib/ for details.
 }}}

 As suggested, make does seem to complete if appending

 {{{
  --without-zlib-version-check
 }}}

 to the ./configure parameters, but that doesn't really seem as if it is an
 ideal fix.

 I yoinked the following:

 {{{
 #define HAVE_BASENAME 1
 #define WITH_ZLIB 1
 #define HAVE_LIBZ 1
  /* end confdefs.h.  */

  #include <stdio.h>
  #include <stdlib.h>
  #include <zlib.h>

  int
  main (void)
  {

        int a=0, b=0, c=0, d=0, n, v;
        n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
        if (n != 3 && n != 4)
                exit(1);
        v = a*1000000 + b*10000 + c*100 + d;
        fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);

        /* 1.1.4 is OK */
        if (a == 1 && b == 1 && c >= 4)
                exit(0);

        /* 1.2.3 and up are OK */
        if (v >= 1020300)
                exit(0);

        exit(2);

    ;
    return 0;
  }
 }}}

 And compiled and ran it as follows:

 {{{
 % cc zlibcheck.c
 % ./a.out
 found zlib version 1.2.11 (1021100)
 }}}

 Which, isn't really what I was expecting. Perhaps it's checking a
 different zlib.h than the 1.3 version installed via MacPorts?

 For reference, here is some output as related to zlib versions I have
 installed on one of my systems via MacPorts at present:

 {{{
 port installed |grep zlib
   zlib @1.2.13_0
   zlib @1.3_0 (active)
 }}}

 I'll keep exploring, but before going much further I felt it was
 worthwhile to share:
 1. confirmation of your bug (yay for reproducibility?)
 2. preliminary perspective into how it may be sourcing zlib.h for its
 version check.

-- 
Ticket URL: <https://trac.macports.org/ticket/67986#comment:4>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list