title: brew cask install meld: 'cannot import GTK+': what's wrong with my library?
body: <p>I tried to install meld on my iMac running OS/X 10.13.1 High Sierra.</p>
  
  <pre><code>brew cask install meld
  </code></pre>
  
  <p>and <code>homebrew</code> completed without error, but when I tried to run it I saw</p>
  
  <pre><code>$ meld check1ping.sh check2pings.sh
  frozen: ImportError
  Cannot import: GTK+
  dlopen(/Applications/Meld.app/Contents/Resources/lib/python2.7/gi/_gi.so, 2): Symbol not found: _inflateValidate
    Referenced from: /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
    Expected in: /Applications/Meld.app/Contents/Frameworks/libz.1.dylib
   in /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib
  </code></pre>
  
  <p>I note the questions <a href="https://stackoverflow.com/questions/28657717/how-do-i-fix-melds-cannot-import-gtk-error-caused-by-missing-gi-repository?noredirect=1&amp;lq=1">How do I fix melds &#39;Cannot import: GTK+&#39; error caused by missing &#39;gi.repository&#39;?</a> and <a href="https://stackoverflow.com/questions/34401677/meld-error-cannot-import-gtk-no-module-named-repository?noredirect=1&amp;lq=1">Meld error &quot;Cannot import: GTK+; No module named repository&quot;</a> but this problem seems to be different.</p>
  
  <p>I found <a href="https://answers.splunk.com/answers/585512/importerror-symbol-not-found-inflatevalidate-when.html" rel="nofollow noreferrer">this page</a> which suggests that <code>/Applications/Meld.app/Contents/Frameworks/libz.1.dylib</code> is out of date. This is what I saw in <code>/Applications/Meld.app/Contents/Frameworks</code>:</p>
  
  <pre><code>-rwxr-xr-x  1 myusername  staff   127692  4 May  2016 libz.1.2.8.dylib
  lrwxr-xr-x  1 myusername  staff       16 16 Nov 15:24 libz.1.dylib -&gt; libz.1.2.8.dylib
  </code></pre>
  
  <p>Looking for a replacement, I found:</p>
  
  <pre><code>lrwxr-xr-x  1 root  wheel      12 11 Nov 09:57 /usr/lib/libz.1.1.3.dylib -&gt; libz.1.dylib
  lrwxr-xr-x  1 root  wheel      12 11 Nov 09:57 /usr/lib/libz.1.2.11.dylib -&gt; libz.1.dylib
  lrwxr-xr-x  1 root  wheel      12 11 Nov 09:57 /usr/lib/libz.1.2.5.dylib -&gt; libz.1.dylib
  lrwxr-xr-x  1 root  wheel      12 11 Nov 09:57 /usr/lib/libz.1.2.8.dylib -&gt; libz.1.dylib
  -rwxr-xr-x  1 root  wheel  186432 25 Oct 17:37 /usr/lib/libz.1.dylib
  lrwxr-xr-x  1 root  wheel      12 11 Nov 09:57 /usr/lib/libz.dylib -&gt; libz.1.dylib
  </code></pre>
  
  <p>and when I replaced the libz.1.dylib in my <code>meld</code> app with this one, everything magically worked.</p>
  
  <p>My question is: <strong>how do I fix homebrew so that it picks up the correct version of the library, so future users don't have this problem?</strong></p>
  
  <p>I see that <code>brew cask</code> <a href="https://apple.stackexchange.com/questions/266703/build-cask-formula-from-source">cannot build from source</a> and always installs from a binary, so I'm a bit surprised that it seems to have the wrong library version. I found the <a href="https://github.com/caskroom/homebrew-cask/blob/master/Casks/meld.rb" rel="nofollow noreferrer">meld ruby file</a> but am none the wiser. I know nothing about specifying brew or cask builds, I'm afraid.</p>
  
  <p>Thanks!</p>