“zsh: killed” — problem in shell, or my own Xcode build?
I have recently moved from a 2014 laptop running Big Sur to a 2021 M1 running Monterey. To make it more complicated I chose this moment to switch from bash to zsh. I am trying to get my own experimental code (“texsyn”) running again.
“texsyn” is a unix executable (command line tool), a c++ program which links to OpenCV. It runs fine using Xcode’s ⌘R command. But it no longer runs from the command line. There I see:
> texsyn
zsh: killed texsyn
I poked a bit:
> which texsyn
/usr/local/bin/texsyn
> echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin
> /usr/local/bin/texsyn
zsh: killed /usr/local/bin/texsyn
> ls -l /usr/local/bin/texsyn
-rwxr-xr-x 1 cwr admin 937960 Jun 29 10:28 /usr/local/bin/texsyn
Which seemed fine. I found a discussion from about four months ago: zsh: killed - Apple Community
The answer by MrHoffman made sense, and indeed I found 8 year old command in my .zshrc apparently left over from an old project. As MrHoffman suggested I: closed Terminal, set aside the old zsh dot files (.zshrc, .zprofile, and .zlogin), and relaunched Terminal.
The symptom was unchanged “texsyn” → “zsh: killed”.
It dawned on me that I had only seen this symptom with my own executable so that maybe the problem was with my build/install in Xcode?
Does anyone recognize this symptom? Or have a suggestion where to look next?
MacBook Pro Apple Silicon