1
votes

After running :observer.start in iex I received the follwing messages. I tried uninstalling and reinstalling both Elixir and Homebrew but to no avail.

objc[58977]: Class wxNSProgressIndicator is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x1f5e9fc0) and /usr/local/opt/wxmac/lib/libwx_osx_cocoau_core-3.0.dylib (0x1ef61fc0). One of the two will be used. Which one is undefined.

objc[58977]: Class wxNSTableDataSource is implemented in both /usr/local/Cellar/wxmac/3.0.5.1_1/lib/libwx_osx_cocoau_core-3.0.0.5.0.dylib (0x1f5ea038) and /usr/local/opt/wxmac/lib/libwx_osxzsh: segmentation fault

4

4 Answers

3
votes

I uninstall the wxmac:

brew uninstall wxmac

and reinstalled to build wxmac locally instead of installing already built binary using the extra flag:

brew install --build-from-source wxmac

Update the plugin erlang for asdf:

asdf plugin-update erlang

and then install the last version of the Erlang:

asdf install erlang latest

and now when I try to run the :observer.start() it work's!

1
votes

Observer uses WXwidgets to render the window and the controls on your platform. As the error suggests you have 2 installations, not sure how you handle such errors on mac but I suppose deleting one of the versions will solve the error.

To make your life easier, there is now a new option to run observer in browser called Phoenix Live Dashboard that does not require any local renderer dependencies installed.

1
votes

Pass extra flag to brew install to build wxmac locally instead of installing already built binary.(There seems to be a bug in bigsur wxmac bottle). Elixir has dependency on Erlang which in turn has dependency on wxmac to show observer window. So execute this first before installing erlang or elixir.

brew install --build-from-source wxmac
0
votes

It seems like all of the dylib files are exact duplicates of each other in /usr/local/opt/wxmac/lib. This might be a problem with how the dylibs are installed for wxmac but I don't have the patience to follow up on that right now. Perhaps someone with more knowledge than I knows how to fix the wxmac brew formula?

It's a bit of a hack but I found that manually symlinking all of the dylib's in the directory fixed the problem for me. For example,

cd /usr/local/opt/wxmac/lib
rm libwx_osx_cocoau_core-3.0.dylib
ln -s libwx_osx_cocoau_core-3.0.0.5.0.dylib libwx_osx_cocoau_core-3.0.dylib
# repeat for any/all libs that are a problem (I did all of them)