title: pngfix.c:2151: undefined reference to `inflateReset2'
body: <p>My platform:</p>
  
  <p>Centos 6.X, Matplotlib-1.3.1, Numpy-1.8.0, Scipy 0.14.0.dev-bb608ba</p>
  
  <p>I am trying to install libpng-1.6.6 to show .png files but when trying to <code>make</code> it is failing giving the below error. </p>
  
  <p>NOTE: I have successfully pre-installed zlib (as well as freetype2) which is supposedly the error is pointing at.</p>
  
  <pre><code>pngfix.o: In function `zlib_reset':
  /usr/lib/hue/libpng-1.6.6/contrib/tools/pngfix.c:2151: undefined reference to `inflateReset2'
  collect2: ld returned 1 exit status
  make[1]: *** [pngfix] Error 1
  make[1]: Leaving directory `/usr/lib/hue/libpng-1.6.6'
  make: *** [all] Error 2
  </code></pre>
  
  <p>Please see the link to my original thread <a href="https://stackoverflow.com/questions/19721385/matplotlib-pyplot-does-not-show-output-no-error">matplotlib-pyplot-does-not-show-output-no-error</a></p>
  
  <p>I checked the 2151 line of pngfix.c. It is the zlib_reset function and has something to do with the rc settings. Is it pointing to change some matplotlibrc settings?</p>
  
  <pre><code>   2136 zlib_reset(struct zlib *zlib, int window_bits)
     2137    /* Reinitializes a zlib with a different window_bits */
     2138 {
     2139    assert(zlib-&gt;state &gt;= 0); /* initialized by zlib_init */
     2140
     2141    zlib-&gt;z.next_in = Z_NULL;
     2142    zlib-&gt;z.avail_in = 0;
     2143    zlib-&gt;z.next_out = Z_NULL;
     2144    zlib-&gt;z.avail_out = 0;
     2145
     2146    zlib-&gt;window_bits = window_bits;
     2147    zlib-&gt;compressed_digits = 0;
     2148    zlib-&gt;uncompressed_digits = 0;
     2149
     2150    zlib-&gt;state = 0; /* initialized, once */
     2151    zlib-&gt;rc = inflateReset2(&amp;zlib-&gt;z, 0);
     2152    if (zlib-&gt;rc != Z_OK)
     2153    {
     2154       zlib_message(zlib, 1/*unexpected*/);
     2155       return 0;
     2156    }
     2157
     2158    return 1;
     2159 }
  </code></pre>