Asdf-erlang: Could not find `wxe_driver.so`

Created on 3 Jun 2017  路  14Comments  路  Source: asdf-vm/asdf-erlang

I want to be able to use the GUI drivers that are built-in in Erlang, which depend on WX, for instance observer:start()..

However, the version of Erlang that Asdf installs, will, when running some command that should start a WX-driven GUI, crash with the following error trace:

{error,{{load_driver,"No driver 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,104}]},
         {wx_object,init_it,6,[{file,"wx_object.erl"},{line,355}]},
         {proc_lib,init_p_do_apply,3,
                   [{file,"proc_lib.erl"},{line,247}]}]}}

=ERROR REPORT==== 3-Jun-2017::10:02:45 ===
ERROR: Could not find 'wxe_driver.so' in: /home/qqwy/.asdf/installs/erlang/19.3/lib/erlang/lib/wx-1.8/priv

So it seems that this dependency is not installed when installing Erlang through Asdf. I have no idea to resolve this, but since observer is very useful to introspect a running system (if you don't know it, it basically is a task manager for Erlang), I would like to get this working.

Most helpful comment

Having the same problem with asdf here. I'm using Ubuntu. wx-config --version works just fine:

ivan@z11:~$ wx-config --version
3.0.0

But starting the observer doesn't:

ivan@z11:~$ iex
Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]

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

09:28:57.703 [error] ERROR: Could not find 'wxe_driver.so' in: /home/ivan/.asdf/installs/erlang/20.1/lib/erlang/lib/wx-1.8.2/priv

{:error,
 {{:load_driver, 'No driver 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: 98]},
   {:wx_object, :init_it, 6, [file: 'wx_object.erl', line: 372]},
   {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]}}

SOLUTION (for me at least)

  1. Remove your current asdf erlang installation: Example: asdf unistall erlang 20.1
  2. Make sure all dependencies and Libraries Requiered for ASDF are installed acording to your OS. (thanks to Stratus3D)
  3. Reinstall erlang using asdf. Example: asdf install erlang 20.1

All 14 comments

Hi @Qqwy , this shouldn't be too hard to resolve. All you really need is to make sure WX is installed on your system. Check the readme for the right dependencies for your OS (https://github.com/asdf-vm/asdf-erlang#before-asdf-install). Once WX is installed you should be able to run wx-config --version to verify it's installed properly.

Thank you. Using the explanation there, I was able to get it working without problems. :heart:

Great!

Facing the same issue in CentOS 7. I tried installing every corresponding package from yum or dnf but some packages are not available. Any suggestions for getting rid of this is much appreciated.

Having the same problem with asdf here. I'm using Ubuntu. wx-config --version works just fine:

ivan@z11:~$ wx-config --version
3.0.0

But starting the observer doesn't:

ivan@z11:~$ iex
Erlang/OTP 20 [erts-9.1] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:10] [hipe] [kernel-poll:false]

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

09:28:57.703 [error] ERROR: Could not find 'wxe_driver.so' in: /home/ivan/.asdf/installs/erlang/20.1/lib/erlang/lib/wx-1.8.2/priv

{:error,
 {{:load_driver, 'No driver 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: 98]},
   {:wx_object, :init_it, 6, [file: 'wx_object.erl', line: 372]},
   {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 247]}]}}

SOLUTION (for me at least)

  1. Remove your current asdf erlang installation: Example: asdf unistall erlang 20.1
  2. Make sure all dependencies and Libraries Requiered for ASDF are installed acording to your OS. (thanks to Stratus3D)
  3. Reinstall erlang using asdf. Example: asdf install erlang 20.1

@ihinojal thanks for the comment. Yes, those are the steps everyone should take when addressing this issue. During step number 2 you may have to deal with some issues getting WX installed and configured properly, but if done correct the steps you've listed should solve the problem.

Feel free to add this to the wiki!

Feel free to add this to the wiki!

@Stratus3D Just added! Change the format, page or wathever you may consider if you like.

For those on Arch Linux, you want to install wxgtk2 instead of wxgtk3 before installing erlang with asdf:

pacman -S wxgtk2
asdf uninstall erlang 20.1
asdf install erlang 20.1

@Viddi Thank you! I recently installed Arch Linux over here, and was currently wondering about exactly this :smile: .

For anyone running an arch-based linux distro getting the error in IEx, this is what worked for me (I am not using asdf but all google searches seem to lead here):
https://brainlid.org/elixir/2015/11/27/linux-elixir-observer-start.html

TL;DR: run pacman -S erlang and choose Y to replace the headless erlang-nox package with the full version of erlang. After that :observer.start will work.

@christophermlne Interesting! Does this not interfere with asdf's managed erlang version? (i.e. do you sidestep asdf by performing this step or not?)

Stratus3D commented on Jun 4, 2017
wx-config --version
after this command the installation commands are displayed automatically.
run the commands.
ivanxuu commented on Nov 27, 2017
Then reinstall your erlang with asdf. may be erlang 20.3 version.
Solution given by this guys worked for me.
Thanks.

Facing the same issue in CentOS 7. I tried installing every corresponding package from yum or dnf but some packages are not available. Any suggestions for getting rid of this is much appreciated.
you can try to install the EPEL lib and then try to intsall that cant install packages again

Placing this solution here for future reference.

CentOS 7

Source of the problem:

wx-config by default is only provided in the /usr/bin path by wxGTK-devel (version 2.8), which is the only version that is read during the autoconf step. The build process will bring up a warning and not add in wx unless a compatibility flag is added, which I could not figure out how to add from the asdf install erlang $ERLANG_VER command. Even with version 3.0 installed wx-config --version=$WX_VER will not change the version used.

Solution:

Install wxGTK3-devel and set the PATH for the build environment to have /usr/libexec/wxGTK3/ before the rest of the path; such that export PATH=/usr/libexec/wxGTK3/:$PATH. Autoconf _should_ run this wx-config under the shell rules for path precedence. If configured right it should compile with the wx driver and :observer.start() will launch a GUI.

Was this page helpful?
0 / 5 - 0 ratings