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 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.

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

bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
Jim
As a follow up to my earlier question: I have the code compiling and running but not getting a successful login from the rest server. ...
New
polypush135
As many of you may have realized by now (sorry for all the posts here) I’ve been working on a db problem where I’m trying to aggregate a ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
Fl4m3Ph03n1x
Background Let’s assume I have a typical GenServer that receives messages as requests, does some operation in a DB and returns responses....
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New

Other popular topics Top

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
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
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 42633 214
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New

We're in Beta

About us Mission Statement