WestKeys

WestKeys

:observer.start() broken after updating wxWidgets

:observer’s color scheme was off for Dark Mode on Big Sur, so I googled and followed the steps here to fix it.

Afterwards when running iex I started getting:

>iex /usr/local/Cellar/elixir/1.11.3/bin/elixir: line 230: exec: erl: not found

I then ran brew reinstall elixir

Running iex now worked, however :observer.start() didn’t.

Any ideas?

>iex
Erlang/OTP 23 [erts-11.1.6] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [hipe] [dtrace]

Interactive Elixir (1.11.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> :observer.start()

18:44:04.539 [error] WX Failed loading 'wxe_driver'@'/usr/local/Cellar/erlang/23.2.2/lib/erlang/lib/wx-1.9.2/priv'

{:error,
 {{:load_driver,
   'dlopen(/usr/local/Cellar/erlang/23.2.2/lib/erlang/lib/wx-1.9.2/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.2.2/lib/erlang/lib/wx-1.9.2/priv/wxe_driver.so\n  Reason: image not found'},
  [
    {:wxe_server, :start, 1, [file: 'wxe_server.erl', line: 65]},
    {:wx, :new, 1, [file: 'wx.erl', line: 115]},
    {:observer_wx, :init, 1, [file: 'observer_wx.erl', line: 107]},
    {:wx_object, :init_it, 6, [file: 'wx_object.erl', line: 404]},
    {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 226]}
  ]}}

Marked As Solved

WestKeys

WestKeys

Discovered asdf while troubleshooting. Reinstalled erlang, elixir using asdf and it seems to be working now.

Also Liked

xinz

xinz

FYI, upgrade to erlang/otp 24.

After remove wxmac and reinstall it via:

brew install wxmac --build-from-source,

it will also reinstall erlang@24 as a dependance, here are outputs:

➜  opt brew install wxmac --build-from-source
==> Downloading https://github.com/wxWidgets/wxWidgets/releases/download/v3.1.5/wxWidgets-3.1.5.tar.bz2
Already downloaded: /Users/xinz/Library/Caches/Homebrew/downloads/e710ca0c81f73106f235183a47ded957ebdaaea78b907e0bc30bfa1818b7b4ba--wxWidgets-3.1.5.tar.bz2
==> ./configure --prefix=/usr/local/Cellar/wxmac/3.1.5 --enable-compat28 --enable-clipboard --enable-controls --enable-dataviewctrl --enable-display --enable-dnd --enable-graphics_ctx -
==> make install
🍺  /usr/local/Cellar/wxmac/3.1.5: 827 files, 24.9MB, built in 3 minutes 48 seconds
Removing: /Users/xinz/Library/Caches/Homebrew/wxmac--3.0.5.1_1... (17.7MB)
==> No outdated dependents to upgrade!
==> Checking for dependents of upgraded formulae...
==> Reinstalling 1 broken dependent from source:
erlang
==> Downloading https://www.erlang.org/download/otp_doc_html_24.0.tar.gz
Already downloaded: /Users/xinz/Library/Caches/Homebrew/downloads/a774f4bf5144fbeefd4c3cd4266aac993a05385bcd9481186c21c1a7e8dd4656--otp_doc_html_24.0.tar.gz
==> Downloading https://github.com/erlang/otp/releases/download/OTP-24.0/otp_src_24.0.tar.gz
Already downloaded: /Users/xinz/Library/Caches/Homebrew/downloads/0fc28fdc3874040568c7cc887b496b65109863d413557394db44cc4e4befef4f--otp_src_24.0.tar.gz
==> Reinstalling erlang
==> ./configure --prefix=/usr/local/Cellar/erlang/24.0 --enable-dynamic-ssl-lib --enable-hipe --enable-shared-zlib --enable-smp-support --enable-threads --enable-wx --with-ssl=/usr/loca
==> make
==> make install
==> make docs DOC_TARGETS=chunks
==> make install-docs
==> Caveats
Man pages can be found in:
  /usr/local/opt/erlang/lib/erlang/man

Access them with `erl -man`, or add this directory to MANPATH.
==> Summary
🍺  /usr/local/Cellar/erlang/24.0: 7,618 files, 483.3MB, built in 6 minutes 27 seconds
==> Caveats
==> erlang
Man pages can be found in:
  /usr/local/opt/erlang/lib/erlang/man

Access them with `erl -man`, or add this directory to MANPATH.
➜  opt

It works for me to upgrade to erlang@24 by use brew.

xinz

xinz

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 https://formulae.brew.sh/formula/wxmac 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.

xinz

xinz

FYI,

About 2 days ago, brew formula wxmac renamed as wxwidgets and upgrade to use wxWidgets-3.1.5, if you had manually edited the wxmac.rb refer the above mentioned in your local path /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula, please remember to revert the changes in that folder, and then use brew to update and upgrade erlang will keep the :observer works well.

Where Next?

Popular in Questions Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Lily
In templates/appointment/index.html.eex: &lt;%= for appointment &lt;- @appointments do %&gt; &lt;tr&gt; &lt;td&gt;&lt;%= appoi...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36820 110
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44265 214
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement