:observer.start() broken after updating wxWidgets

I have the same issue with Erlang/23.3.2, Elixir 1.11.4 on macOS BigSur 11.2.3, since wxWidgets fixed this macOS issue within 3.1.* but the available version from wxmac — Homebrew Formulae is 3.0.5.1 , we have to manually modify local wxmac.rb file to use with the current latest version 3.1.5 of wxWidgets, here are my steps to resolve this issue, hope it can be useful for your reference.

1, run brew edit wxmac after changed as below:

index 60dd92c233..c94feb8e9c 100644
--- a/Formula/wxmac.rb
+++ b/Formula/wxmac.rb
@@ -1,10 +1,9 @@
 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.0.5.1/wxWidgets-3.0.5.1.tar.bz2"
-  sha256 "440f6e73cf5afb2cbf9af10cec8da6cdd3d3998d527598a53db87099524ac807"
+  url "https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.tar.bz2"
+  sha256 "d7b3666de33aa5c10ea41bb9405c40326e1aeb74ee725bb88f90f1d50270a224"
   license "wxWindows"
-  revision 1
   head "https://github.com/wxWidgets/wxWidgets.git"

   livecheck do
@@ -31,6 +30,7 @@ class Wxmac < Formula
   def install
     args = [
       "--prefix=#{prefix}",
+      "--enable-compat28",
       "--enable-clipboard",
       "--enable-controls",
       "--enable-dataviewctrl",
@@ -40,7 +40,7 @@ class Wxmac < Formula
       "--enable-std_string",
       "--enable-svg",
       "--enable-unicode",
-      "--enable-webkit",
+      #"--enable-webkit",
       "--enable-webview",
       "--with-expat",
       "--with-libjpeg",

2, run brew upgrade wxmac --build-from-source to upgrade

3, you may need to reinstall Erlang/Elixir via brew.

4, Make sure the completed Xcode tool installed.

After the above operations, I can run :observer.start() in mix shell now.

2 Likes