Homebrew-core: zsh 5.4.2 aborting on some commands

Created on 21 Sep 2017  路  4Comments  路  Source: Homebrew/homebrew-core

  • [x] brew update up to date
  • [x] brew doctor clean
  • [x] brew gist-logs zsh gist

Earlier today, the zsh formula was updated to 5.4.2. (commit, bottles)

After a brew update and brew upgrade today, my zsh was exiting immediately on startup. I tracked the problem down to a line in oh-my-zsh's gitfast plugin.

Running the command above manually with zsh -x, I get the following (gist):

$ printf -v __git_printf_supports_v -- '%s'
<snip>
+zsh:2> printf -v __git_printf_supports_v -- %s
dyld: lazy symbol binding failed: Symbol not found: _open_memstream
  Referenced from: /usr/local/bin/zsh
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _open_memstream
  Referenced from: /usr/local/bin/zsh
  Expected in: /usr/lib/libSystem.B.dylib

[1]    63774 abort      zsh -x

I'm on the latest Command Line Tools for Xcode (9.0) and Xcode (9.0). This occurs whether zsh is poured or built from source.


Steps to reproduce:

  • brew install zsh (version 5.4.2)
  • zsh
  • printf -v -- '' or printf -v bupkis -- '%s'
  • zsh aborts

If I can provide any additional info, please let me know.

Most helpful comment

All 4 comments

Just want to echo that I've seen identical behavior, but in my case it was caused by sourceing the git-prompt.sh bash completion script (which also contains a number of calls to printf -v ...).

Thanks very much for the quick fix! Really appreciate it.

@justinkim you're welcome!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jyutzler picture jyutzler  路  4Comments

Thirudhas picture Thirudhas  路  4Comments

daviderestivo picture daviderestivo  路  4Comments

BluePawDev picture BluePawDev  路  3Comments

ghost picture ghost  路  4Comments