Weechat on OSX

This is recording how I got weechat on OSX updated to 4.0.4, and how I fixed /script to work as well, thanks to some helpful folks on IRC.

One of the slight annoyances with using weechat on OSX is that the Homebrew version is still 3.8 or so. I have multiple systems, with weechat on all of them, and OSX is the outlier in being outdated.

The #weechat channel on libera was horribly useful, and got everything straightened out, with first updating to 4.0.4, and then fixing a problem with scripts. I’m writing up what I did here, so it’s easily searchable.

First, the upgrade to 4.0.4. It’s important to know that while I did all this, I didn’t originate any of it. I can’t claim credit, and don’t. I was doing things that others suggested. (The users in question were trygveaa and R2robot; I don’t know them outside of those names.)

The first thing I did was run brew edit weechat, to edit the weechat recipe file for Homebrew. The values I needed to change were the url and hash values for the downloaded file; they’re lines 4 and 5 for me, and this is what I changed them to:

url "https://weechat.org/files/src/weechat-4.0.4.tar.xz" sha256 "ae5f4979b5ada0339b84e741d5f7e481ee91e3fecd40a09907b64751829eb6f6"

After that, it’s a simple matter of running:
brew reinstall -s weechat
… which should download weechat from source (and thus get 4.0.4) and install it from there.

Now, running weechat gives me 4.0.4; that’s one problem down!

~ > weechat -v
~ >

The other problem was that /script didn’t work; it would tell me it was trying to download the scripts from an external server, and… that’s it. No progress. No scripts window, no nothing. That’s suboptimal, because there are a few scripts I find highly useful.

I got it working by setting an environment variable. I actually tried two of them, but only one turned out to be significant:


With that set, /script downloaded the list of scripts, and I could install, autoload, et cetera. I had also tried setting WEECHAT_HOME to a different location (also a suggestion), and that worked as long as I had the fork safety disabled – and removing WEECHAT_HOME left my configuration where it was “supposed to be” (the default) and /script still worked, so the OBJC_DISABLE_INITIALIZE_FORK_SAFETY is what made the difference.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: