title: ld: archive has no table of contents file error with homebrew
body: <p>I'm trying to compile weechat,</p>
  
  <pre><code>%&gt; brew upgrade weechat --debug
  ...
  
  [ 86%] Built target weechat_gui_curses_normal
  [ 87%] Building C object src/gui/curses/normal/CMakeFiles/weechat.dir/main.o
  [ 87%] Linking C executable weechat
  ld: archive has no table of contents file '../../../plugins/libweechat_plugins.a' for architecture x86_64
  clang: error: unable to execute command: Segmentation fault: 11
  clang: error: linker command failed due to signal (use -v to see invocation)
  make[2]: *** [src/gui/curses/normal/weechat] Error 254
  make[1]: *** [src/gui/curses/normal/CMakeFiles/weechat.dir/all] Error 2
  make: *** [all] Error 2
  bash-3.2$ exit
  </code></pre>
  
  <p>It fails with <code>archive has no table of contents file for architecture x86_64</code>, it seem to be a generic error, as it happens with mysql@5.5 and many other packages.</p>
  
  <p>I also see ranlib errors</p>
  
  <pre><code>/usr/local/homebrew/bin/ranlib: libweechat_gui_curses_normal.a(gui-curses-term.o): unknown load command 0x32
  </code></pre>
  
  <p>Any ideas?</p>