`:observer.start` crashes Erlang VM

I changed the fields as suggested:

class Wxmac < Formula
  desc "Cross-platform C++ GUI toolkit (wxWidgets for macOS)"
  homepage "https://www.wxwidgets.org"
  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.4/wxWidgets-3.1.4.tar.bz2"
  sha256 "3ca3a19a14b407d0cdda507a7930c2e84ae1c8e74f946e0144d2fa7d881f1a94"
  # etc. etc.
end

but got the error

Error: Failed to download resource "wxmac"
Download failed: https://homebrew.bintray.com/bottles/wxmac-3.1.4_1.big_sur.bottle.tar.gz

I fixed it by forcing brew to install from source: brew install -s wxmac.

I guess this is the same problem @georgesboris solved by removing the bottle do block.

I had the same problem, but installing v3.1.4 (even from source) still didn’t fix the problem. It ended up giving a new error:

'dlopen(/usr/local/Cellar/erlang/23.3.1/lib/erlang/lib/wx-1.9.3/priv/wxe_driver.so, 2): Library not loaded: /usr/local/opt/wxmac/lib/libwx_osx_cocoau_stc-3.0.dylib\n  Referenced from: /usr/local/Cellar/erlang/23.3.1/lib/erlang/lib/wx-1.9.3/priv/wxe_driver.so\n  Reason: image not found'},

I was, however, able to get it working using asdf to install Erlang and Elixir, as recommended here.

1 Like

Hello there,

me and my team experience the same behaviour. Has anyone more insight into this? I would like to avoid installing asdf.

Today I will try and build the whole elixir/erlang/wx stuff from source.
I will keep you posted with my results :slight_smile:

Why? Installing Elixir and Erlang from Homebrew isn’t the best approach out there.

Why? Installing Elixir and Erlang from Homebrew isn’t the best approach out there.

Because the current approach for my team is to use brew for this. i do not like to add another tool just to install elixir/erlang/nodejs. Beyond that I the homebrew approach worked great for us so far (until the problem at hand occurred)

After some hours of fierce analytics (okay, okay, I was just fiddling around), here are my results:

I have got the impression, that the current erlang bottle and wxmac bottle are not compatible with each other.

The work around for me is to install these from source. So what I did exactly was the following:

brew update-reset # resets all brew changes
brew uninstall elixir erlang wxmac # remove current installation
brew install -s wxmac erlang elixir # build wxmac, erlang and elixir from source

On the way I noticed that the way described by michaelwm allows you to use the observer in darkmode. :slight_smile:

If someone more adapt in homebrew reads this: Maybe the bottles should be upgraded. :slight_smile:

4 Likes

Afaik erlang needs a version of wxwidgets with compatibility layer for an older API. Homebrews bottle recipe might not have the needed flag to enable this.

I’m new to HomeBrew and Elixir/Erlang and after carefully following the steps shared here I (astonishingly) got my :observer.start to work in darkmode. Thanks everyone!

2 Likes

Read this
Maybe this will help you?